Gutenberg - Version 12.3.0

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version 12.3.0
Comparing to
See all releases

Code changes from version 12.2.0 to 12.3.0

build/block-editor/index.js CHANGED
@@ -2215,6 +2215,7 @@ __webpack_require__.d(__webpack_exports__, {
2215
  "__experimentalBorderRadiusControl": function() { return /* reexport */ BorderRadiusControl; },
2216
  "__experimentalBorderStyleControl": function() { return /* reexport */ BorderStyleControl; },
2217
  "__experimentalColorGradientControl": function() { return /* reexport */ control; },
 
2218
  "__experimentalDuotoneControl": function() { return /* reexport */ duotone_control; },
2219
  "__experimentalFontAppearanceControl": function() { return /* reexport */ FontAppearanceControl; },
2220
  "__experimentalFontFamilyControl": function() { return /* reexport */ FontFamilyControl; },
@@ -3399,6 +3400,29 @@ const withSaveReusableBlock = reducer => (state, action) => {
3399
 
3400
  return reducer(state, action);
3401
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3402
  /**
3403
  * Reducer returning the blocks state.
3404
  *
@@ -3412,7 +3436,7 @@ const withSaveReusableBlock = reducer => (state, action) => {
3412
  const blocks = (0,external_lodash_namespaceObject.flow)(external_wp_data_namespaceObject.combineReducers, withSaveReusableBlock, // needs to be before withBlockCache
3413
  withBlockTree, // needs to be before withInnerBlocksRemoveCascade
3414
  withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
3415
- withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
3416
  byClientId() {
3417
  let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3418
  let action = arguments.length > 1 ? arguments[1] : undefined;
@@ -5529,14 +5553,14 @@ function getBlockOrder(state, rootClientId) {
5529
  * Returns the index at which the block corresponding to the specified client
5530
  * ID occurs within the block order, or `-1` if the block does not exist.
5531
  *
5532
- * @param {Object} state Editor state.
5533
- * @param {string} clientId Block client ID.
5534
- * @param {?string} rootClientId Optional root client ID of block list.
5535
  *
5536
  * @return {number} Index at which block exists in order.
5537
  */
5538
 
5539
- function getBlockIndex(state, clientId, rootClientId) {
 
5540
  return getBlockOrder(state, rootClientId).indexOf(clientId);
5541
  }
5542
  /**
@@ -8032,7 +8056,7 @@ const duplicateBlocks = function (clientIds) {
8032
  }
8033
 
8034
  const rootClientId = select.getBlockRootClientId(clientIds[0]);
8035
- const lastSelectedIndex = select.getBlockIndex((0,external_lodash_namespaceObject.last)((0,external_lodash_namespaceObject.castArray)(clientIds)), rootClientId);
8036
  const clonedBlocks = blocks.map(block => (0,external_wp_blocks_namespaceObject.__experimentalCloneSanitizedBlock)(block));
8037
  dispatch.insertBlocks(clonedBlocks, lastSelectedIndex + 1, rootClientId, updateSelection);
8038
 
@@ -8066,7 +8090,7 @@ const insertBeforeBlock = clientId => _ref18 => {
8066
  return;
8067
  }
8068
 
8069
- const firstSelectedIndex = select.getBlockIndex(clientId, rootClientId);
8070
  return dispatch.insertDefaultBlock({}, rootClientId, firstSelectedIndex);
8071
  };
8072
  /**
@@ -8092,7 +8116,7 @@ const insertAfterBlock = clientId => _ref19 => {
8092
  return;
8093
  }
8094
 
8095
- const firstSelectedIndex = select.getBlockIndex(clientId, rootClientId);
8096
  return dispatch.insertDefaultBlock({}, rootClientId, firstSelectedIndex + 1);
8097
  };
8098
  /**
@@ -8615,6 +8639,7 @@ function appendSelectors(selectors) {
8615
 
8616
 
8617
 
 
8618
  const deprecatedFlags = {
8619
  'color.palette': settings => settings.colors === undefined ? undefined : settings.colors,
8620
  'color.gradients': settings => settings.gradients === undefined ? undefined : settings.gradients,
@@ -8695,6 +8720,12 @@ function useSetting(path) {
8695
  const setting = (0,external_wp_data_namespaceObject.useSelect)(select => {
8696
  var _get;
8697
 
 
 
 
 
 
 
8698
  const settings = select(store).getSettings(); // 1 - Use __experimental features, if available.
8699
  // We cascade to the all value if the block one is not available.
8700
 
@@ -8899,55 +8930,35 @@ const flexWrapOptions = ['wrap', 'nowrap'];
8899
  }));
8900
  },
8901
  save: function FlexLayoutStyle(_ref3) {
 
 
8902
  let {
8903
  selector,
8904
- layout
 
8905
  } = _ref3;
8906
  const {
8907
- orientation = 'horizontal',
8908
- setCascadingProperties = false
8909
  } = layout;
8910
  const blockGapSupport = useSetting('spacing.blockGap');
8911
  const hasBlockGapStylesSupport = blockGapSupport !== null;
 
8912
  const justifyContent = justifyContentMap[layout.justifyContent] || justifyContentMap.left;
8913
  const flexWrap = flexWrapOptions.includes(layout.flexWrap) ? layout.flexWrap : 'wrap';
8914
- let rowOrientation = `
8915
  flex-direction: row;
8916
  align-items: center;
8917
  justify-content: ${justifyContent};
8918
  `;
8919
-
8920
- if (setCascadingProperties) {
8921
- // --layout-justification-setting allows children to inherit the value
8922
- // regardless or row or column direction.
8923
- rowOrientation += `
8924
- --layout-justification-setting: ${justifyContent};
8925
- --layout-direction: row;
8926
- --layout-wrap: ${flexWrap};
8927
- --layout-justify: ${justifyContent};
8928
- --layout-align: center;
8929
- `;
8930
- }
8931
-
8932
  const alignItems = alignItemsMap[layout.justifyContent] || alignItemsMap.left;
8933
- let columnOrientation = `
8934
  flex-direction: column;
8935
  align-items: ${alignItems};
8936
  `;
8937
-
8938
- if (setCascadingProperties) {
8939
- columnOrientation += `
8940
- --layout-justification-setting: ${alignItems};
8941
- --layout-direction: column;
8942
- --layout-justify: initial;
8943
- --layout-align: ${alignItems};
8944
- `;
8945
- }
8946
-
8947
  return (0,external_wp_element_namespaceObject.createElement)("style", null, `
8948
  ${appendSelectors(selector)} {
8949
  display: flex;
8950
- gap: ${hasBlockGapStylesSupport ? 'var( --wp--style--block-gap, 0.5em )' : '0.5em'};
8951
  flex-wrap: ${flexWrap};
8952
  ${orientation === 'horizontal' ? rowOrientation : columnOrientation}
8953
  }
@@ -9207,9 +9218,12 @@ function Icon(_ref) {
9207
  return null;
9208
  },
9209
  save: function DefaultLayoutStyle(_ref2) {
 
 
9210
  let {
9211
  selector,
9212
- layout = {}
 
9213
  } = _ref2;
9214
  const {
9215
  contentSize,
@@ -9217,7 +9231,8 @@ function Icon(_ref) {
9217
  } = layout;
9218
  const blockGapSupport = useSetting('spacing.blockGap');
9219
  const hasBlockGapStylesSupport = blockGapSupport !== null;
9220
- let style = !!contentSize || !!wideSize ? `
 
9221
  ${appendSelectors(selector, '> *')} {
9222
  max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
9223
  margin-left: auto !important;
@@ -9232,7 +9247,7 @@ function Icon(_ref) {
9232
  max-width: none;
9233
  }
9234
  ` : '';
9235
- style += `
9236
  ${appendSelectors(selector, '> [data-align="left"]')} {
9237
  float: left;
9238
  margin-right: 2em;
@@ -9246,18 +9261,18 @@ function Icon(_ref) {
9246
  `;
9247
 
9248
  if (hasBlockGapStylesSupport) {
9249
- style += `
9250
  ${appendSelectors(selector, '> *')} {
9251
  margin-top: 0;
9252
  margin-bottom: 0;
9253
  }
9254
  ${appendSelectors(selector, '> * + *')} {
9255
- margin-top: var( --wp--style--block-gap );
9256
  }
9257
  `;
9258
  }
9259
 
9260
- return (0,external_wp_element_namespaceObject.createElement)("style", null, style);
9261
  },
9262
 
9263
  getOrientation() {
@@ -10020,17 +10035,41 @@ function BlockSupportToolsPanel(_ref) {
10020
  label
10021
  } = _ref;
10022
  const {
10023
- clientId,
10024
- attributes
 
10025
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
10026
  const {
10027
  getBlockAttributes,
10028
- getSelectedBlockClientId
10029
- } = select(store);
 
 
 
 
 
 
10030
  const selectedBlockClientId = getSelectedBlockClientId();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10031
  return {
10032
- clientId: selectedBlockClientId,
10033
- attributes: getBlockAttributes(selectedBlockClientId)
 
 
 
10034
  };
10035
  }, []);
10036
  const {
@@ -10039,30 +10078,34 @@ function BlockSupportToolsPanel(_ref) {
10039
 
10040
  const resetAll = function () {
10041
  let resetFilters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10042
- const {
10043
- style
10044
- } = attributes;
10045
- let newAttributes = {
10046
- style
10047
- };
10048
- resetFilters.forEach(resetFilter => {
10049
- newAttributes = { ...newAttributes,
10050
- ...resetFilter(newAttributes)
10051
  };
10052
- }); // Enforce a cleaned style object.
 
 
 
 
10053
 
10054
- newAttributes = { ...newAttributes,
10055
- style: cleanEmptyObject(newAttributes.style)
10056
- };
10057
- updateBlockAttributes(clientId, newAttributes);
 
 
10058
  };
10059
 
10060
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
10061
  className: `${group}-block-support-panel`,
10062
  label: label,
10063
  resetAll: resetAll,
10064
- key: clientId,
10065
- panelId: clientId,
10066
  hasInnerWrapper: true,
10067
  shouldRenderPlaceholderItems: true // Required to maintain fills ordering.
10068
 
@@ -16284,7 +16327,6 @@ function useBlockProps() {
16284
  enableAnimation
16285
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
16286
  const {
16287
- getBlockRootClientId,
16288
  getBlockIndex,
16289
  getBlockMode,
16290
  getBlockName,
@@ -16298,10 +16340,9 @@ function useBlockProps() {
16298
  const isSelected = isBlockSelected(clientId);
16299
  const isPartOfMultiSelection = isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId);
16300
  const blockName = getBlockName(clientId);
16301
- const rootClientId = getBlockRootClientId(clientId);
16302
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(blockName);
16303
  return {
16304
- index: getBlockIndex(clientId, rootClientId),
16305
  mode: getBlockMode(clientId),
16306
  name: blockName,
16307
  blockApiVersion: (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) || 1,
@@ -16612,7 +16653,7 @@ const applyWithDispatch = (0,external_wp_data_namespaceObject.withDispatch)((dis
16612
  const {
16613
  getBlockIndex
16614
  } = select(store);
16615
- const index = getBlockIndex(clientId, rootClientId);
16616
  insertBlocks(blocks, index + 1, rootClientId);
16617
  },
16618
 
@@ -16957,6 +16998,9 @@ function useBlockSync(_ref) {
16957
  getBlockName,
16958
  getBlocks
16959
  } = registry.select(store);
 
 
 
16960
  const pendingChanges = (0,external_wp_element_namespaceObject.useRef)({
16961
  incoming: null,
16962
  outgoing: []
@@ -16974,17 +17018,22 @@ function useBlockSync(_ref) {
16974
  __unstableMarkNextChangeAsNotPersistent();
16975
 
16976
  if (clientId) {
16977
- setHasControlledInnerBlocks(clientId, true);
16978
-
16979
- __unstableMarkNextChangeAsNotPersistent();
 
 
 
 
 
 
 
 
16980
 
16981
- const storeBlocks = controlledBlocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
16982
 
16983
- if (subscribed.current) {
16984
- pendingChanges.current.incoming = storeBlocks;
16985
- }
16986
-
16987
- replaceInnerBlocks(clientId, storeBlocks);
16988
  } else {
16989
  if (subscribed.current) {
16990
  pendingChanges.current.incoming = controlledBlocks;
@@ -17029,13 +17078,22 @@ function useBlockSync(_ref) {
17029
  }
17030
  }
17031
  }, [controlledBlocks, clientId]);
 
 
 
 
 
 
 
 
17032
  (0,external_wp_element_namespaceObject.useEffect)(() => {
17033
  const {
17034
  getSelectionStart,
17035
  getSelectionEnd,
17036
  getSelectedBlocksInitialCaretPosition,
17037
  isLastBlockChangePersistent,
17038
- __unstableIsLastBlockChangeIgnored
 
17039
  } = registry.select(store);
17040
  let blocks = getBlocks(clientId);
17041
  let isPersistent = isLastBlockChangePersistent();
@@ -17049,7 +17107,17 @@ function useBlockSync(_ref) {
17049
  // the subscription is triggering for a block (`clientId !== null`)
17050
  // and its block name can't be found because it's not on the list.
17051
  // (`getBlockName( clientId ) === null`).
17052
- if (clientId !== null && getBlockName(clientId) === null) return;
 
 
 
 
 
 
 
 
 
 
17053
  const newIsPersistent = isLastBlockChangePersistent();
17054
  const newBlocks = getBlocks(clientId);
17055
  const areBlocksDifferent = newBlocks !== blocks;
@@ -21040,10 +21108,10 @@ function useInsertionPoint(_ref) {
21040
  _destinationIndex = insertionIndex;
21041
  } else if (clientId) {
21042
  // Insert after a specific client ID.
21043
- _destinationIndex = getBlockIndex(clientId, _destinationRootClientId);
21044
  } else if (!isAppender && selectedBlockClientId) {
21045
  _destinationRootClientId = getBlockRootClientId(selectedBlockClientId);
21046
- _destinationIndex = getBlockIndex(selectedBlockClientId, _destinationRootClientId) + 1;
21047
  } else {
21048
  // Insert at the end of the list.
21049
  _destinationIndex = getBlockOrder(_destinationRootClientId).length;
@@ -22033,7 +22101,7 @@ function QuickInserter(_ref) {
22033
  getBlockIndex,
22034
  getBlockCount
22035
  } = select(store);
22036
- const index = getBlockIndex(clientId, rootClientId);
22037
  return {
22038
  setInserterIsOpened: getSettings().__experimentalSetIsInserterOpened,
22039
  insertionIndex: index === -1 ? getBlockCount() : index
@@ -22356,14 +22424,14 @@ class Inserter extends external_wp_element_namespaceObject.Component {
22356
  } = select(store); // If the clientId is defined, we insert at the position of the block.
22357
 
22358
  if (clientId) {
22359
- return getBlockIndex(clientId, rootClientId);
22360
  } // If there a selected block, we insert after the selected block.
22361
 
22362
 
22363
  const end = getBlockSelectionEnd();
22364
 
22365
  if (!isAppender && end && getBlockRootClientId(end) === rootClientId) {
22366
- return getBlockIndex(end, rootClientId) + 1;
22367
  } // Otherwise, we insert at the end of the current rootClientId
22368
 
22369
 
@@ -23197,7 +23265,7 @@ function useInBetweenInserter() {
23197
  return;
23198
  }
23199
 
23200
- const index = getBlockIndex(clientId, rootClientId); // Don't show the in-between inserter before the first block in
23201
  // the list (preserves the original behaviour).
23202
 
23203
  if (index === 0) {
@@ -23684,7 +23752,7 @@ function BlockSelectionButton(_ref) {
23684
  hasBlockMovingClientId,
23685
  getBlockListSettings
23686
  } = select(store);
23687
- const index = getBlockIndex(clientId, rootClientId);
23688
  const {
23689
  name,
23690
  attributes
@@ -23796,8 +23864,8 @@ function BlockSelectionButton(_ref) {
23796
  if ((isEnter || isSpace) && startingBlockClientId) {
23797
  const sourceRoot = getBlockRootClientId(startingBlockClientId);
23798
  const destRoot = getBlockRootClientId(selectedBlockClientId);
23799
- const sourceBlockIndex = getBlockIndex(startingBlockClientId, sourceRoot);
23800
- let destinationBlockIndex = getBlockIndex(selectedBlockClientId, destRoot);
23801
 
23802
  if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
23803
  destinationBlockIndex -= 1;
@@ -24342,8 +24410,8 @@ const BlockMoverButton = (0,external_wp_element_namespaceObject.forwardRef)((_re
24342
  const normalizedClientIds = (0,external_lodash_namespaceObject.castArray)(clientIds);
24343
  const firstClientId = (0,external_lodash_namespaceObject.first)(normalizedClientIds);
24344
  const blockRootClientId = getBlockRootClientId(firstClientId);
24345
- const firstBlockIndex = getBlockIndex(firstClientId, blockRootClientId);
24346
- const lastBlockIndex = getBlockIndex((0,external_lodash_namespaceObject.last)(normalizedClientIds), blockRootClientId);
24347
  const blockOrder = getBlockOrder(blockRootClientId);
24348
  const block = getBlock(firstClientId);
24349
  const isFirstBlock = firstBlockIndex === 0;
@@ -24506,8 +24574,8 @@ function BlockMover(_ref) {
24506
  const firstClientId = (0,external_lodash_namespaceObject.first)(normalizedClientIds);
24507
  const block = getBlock(firstClientId);
24508
  const rootClientId = getBlockRootClientId((0,external_lodash_namespaceObject.first)(normalizedClientIds));
24509
- const firstIndex = getBlockIndex(firstClientId, rootClientId);
24510
- const lastIndex = getBlockIndex((0,external_lodash_namespaceObject.last)(normalizedClientIds), rootClientId);
24511
  const blockOrder = getBlockOrder(rootClientId);
24512
  const isFirst = firstIndex === 0;
24513
  const isLast = lastIndex === blockOrder.length - 1;
@@ -24979,7 +25047,7 @@ function replaceActiveStyle(className, activeStyle, newStyle) {
24979
  * act as a fallback for when there is no active style applied to a block. The default item also serves
24980
  * as a switch on the frontend to deactivate non-default styles.
24981
  *
24982
- * @param {Array} styles Block style variations.
24983
  *
24984
  * @return {Array<Object?>} The style collection.
24985
  */
@@ -24998,7 +25066,7 @@ function getRenderedStyles(styles) {
24998
  /**
24999
  * Returns a style object from a collection of styles where that style object is the default block style.
25000
  *
25001
- * @param {Array} styles Block style variations.
25002
  *
25003
  * @return {Object?} The default style object, if found.
25004
  */
@@ -25052,7 +25120,7 @@ function useGenericPreviewBlock(block, type) {
25052
 
25053
  /**
25054
  *
25055
- * @param {useStylesForBlocksArguments} useStylesForBlocks arguments.
25056
  * @return {Object} Results of the select methods.
25057
  */
25058
 
@@ -27508,7 +27576,7 @@ function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getCli
27508
 
27509
 
27510
  if (dropType === 'block') {
27511
- const sourceBlockIndex = getBlockIndex(sourceClientIds[0], sourceRootClientId); // If the user is dropping to the same position, return early.
27512
 
27513
  if (sourceRootClientId === targetRootClientId && sourceBlockIndex === targetBlockIndex) {
27514
  return;
@@ -28287,6 +28355,83 @@ function ColorGradientControl(props) {
28287
 
28288
  /* harmony default export */ var control = (ColorGradientControl);
28289
  //# sourceMappingURL=control.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28290
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors-gradients/use-common-single-multiple-selects.js
28291
  /**
28292
  * Internal dependencies
@@ -28560,13 +28705,19 @@ function BorderColorEdit(props) {
28560
  });
28561
  };
28562
 
28563
- return (0,external_wp_element_namespaceObject.createElement)(control, _extends({
28564
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
28565
- colorValue: colorValue,
28566
  onColorChange: onChangeColor,
28567
- clearable: false,
 
 
 
 
 
 
28568
  __experimentalHasMultipleOrigins: true,
28569
- __experimentalIsRenderedInSidebar: true
 
28570
  }, colorGradientSettings));
28571
  }
28572
  /**
@@ -29725,7 +29876,6 @@ function getGradientSlugByValue(gradients, value) {
29725
 
29726
  return gradient && gradient.slug;
29727
  }
29728
- const EMPTY_OBJECT = {};
29729
  function __experimentalUseGradient() {
29730
  let {
29731
  gradientAttribute = 'gradient',
@@ -29734,8 +29884,10 @@ function __experimentalUseGradient() {
29734
  const {
29735
  clientId
29736
  } = useBlockEditContext();
29737
- const gradientsPerOrigin = useSetting('color.gradients') || EMPTY_OBJECT;
29738
- const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
 
 
29739
  const {
29740
  gradient,
29741
  customGradient
@@ -29885,59 +30037,19 @@ const PanelColorGradientSettingsInner = _ref3 => {
29885
  gradients: gradients,
29886
  settings: settings
29887
  }));
29888
- let dropdownPosition;
29889
- let popoverProps;
29890
-
29891
- if (__experimentalIsRenderedInSidebar) {
29892
- dropdownPosition = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'bottom right' : 'bottom left';
29893
- popoverProps = {
29894
- __unstableForcePosition: true
29895
- };
29896
- }
29897
-
29898
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, _extends({
29899
  className: classnames_default()('block-editor-panel-color-gradient-settings', className),
29900
  title: showTitle ? titleElement : undefined
29901
- }, props), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
29902
- isBordered: true,
29903
- isSeparated: true,
29904
- className: "block-editor-panel-color-gradient-settings__item-group"
29905
- }, settings.map((setting, index) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
29906
- position: dropdownPosition,
29907
- popoverProps: popoverProps,
29908
- className: "block-editor-panel-color-gradient-settings__dropdown",
29909
- key: index,
29910
- contentClassName: "block-editor-panel-color-gradient-settings__dropdown-content",
29911
- renderToggle: _ref4 => {
29912
- var _setting$gradientValu;
29913
-
29914
- let {
29915
- isOpen,
29916
- onToggle
29917
- } = _ref4;
29918
- return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItem, {
29919
- onClick: onToggle,
29920
- className: classnames_default()('block-editor-panel-color-gradient-settings__item', {
29921
- 'is-open': isOpen
29922
- })
29923
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
29924
- justify: "flex-start"
29925
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
29926
- className: "block-editor-panel-color-gradient-settings__color-indicator",
29927
- colorValue: (_setting$gradientValu = setting.gradientValue) !== null && _setting$gradientValu !== void 0 ? _setting$gradientValu : setting.colorValue
29928
- }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, setting.label)));
29929
- },
29930
- renderContent: () => (0,external_wp_element_namespaceObject.createElement)(control, _extends({
29931
- showTitle: false,
29932
- colors,
29933
- gradients,
29934
- disableCustomColors,
29935
- disableCustomGradients,
29936
- __experimentalHasMultipleOrigins,
29937
- __experimentalIsRenderedInSidebar,
29938
- enableAlpha
29939
- }, setting))
29940
- }))), !!children && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
29941
  marginY: 4
29942
  }), " ", children));
29943
  };
@@ -30139,7 +30251,6 @@ function ColorPanel(_ref) {
30139
 
30140
 
30141
  const COLOR_SUPPORT_KEY = 'color';
30142
- const color_EMPTY_OBJECT = {};
30143
 
30144
  const hasColorSupport = blockType => {
30145
  const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, COLOR_SUPPORT_KEY);
@@ -30309,7 +30420,7 @@ function immutableSet(object, path, value) {
30309
 
30310
 
30311
  function ColorEdit(props) {
30312
- var _gradientsPerOrigin$t, _style$color6, _style$color7, _style$color8, _style$elements2, _style$elements2$link, _style$elements2$link2, _style$elements3, _style$elements3$link, _style$elements3$link2;
30313
 
30314
  const {
30315
  name: blockName,
@@ -30322,15 +30433,17 @@ function ColorEdit(props) {
30322
  const themePalette = useSetting('color.palette.theme');
30323
  const defaultPalette = useSetting('color.palette.default');
30324
  const allSolids = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
30325
- const gradientsPerOrigin = useSetting('color.gradients') || color_EMPTY_OBJECT;
 
 
 
30326
  const areCustomSolidsEnabled = useSetting('color.custom');
30327
  const areCustomGradientsEnabled = useSetting('color.customGradient');
30328
  const isBackgroundEnabled = useSetting('color.background');
30329
  const isLinkEnabled = useSetting('color.link');
30330
  const isTextEnabled = useSetting('color.text');
30331
  const solidsEnabled = areCustomSolidsEnabled || !themePalette || (themePalette === null || themePalette === void 0 ? void 0 : themePalette.length) > 0;
30332
- const gradientsEnabled = areCustomGradientsEnabled || !(gradientsPerOrigin !== null && gradientsPerOrigin !== void 0 && gradientsPerOrigin.theme) || (gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : (_gradientsPerOrigin$t = gradientsPerOrigin.theme) === null || _gradientsPerOrigin$t === void 0 ? void 0 : _gradientsPerOrigin$t.length) > 0;
30333
- const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]); // Shouldn't be needed but right now the ColorGradientsPanel
30334
  // can trigger both onChangeColor and onChangeBackground
30335
  // synchronously causing our two callbacks to override changes
30336
  // from each other.
@@ -30440,17 +30553,17 @@ function ColorEdit(props) {
30440
  external_wp_element_namespaceObject.Platform.OS === 'web' && !gradient && !(style !== null && style !== void 0 && (_style$color6 = style.color) !== null && _style$color6 !== void 0 && _style$color6.gradient),
30441
  clientId: props.clientId,
30442
  settings: [...(hasTextColor ? [{
30443
- label: (0,external_wp_i18n_namespaceObject.__)('Text color'),
30444
  onColorChange: onChangeColor('text'),
30445
  colorValue: getColorObjectByAttributeValues(allSolids, textColor, style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.text).color
30446
  }] : []), ...(hasBackgroundColor || hasGradientColor ? [{
30447
- label: (0,external_wp_i18n_namespaceObject.__)('Background color'),
30448
  onColorChange: hasBackgroundColor ? onChangeColor('background') : undefined,
30449
  colorValue: getColorObjectByAttributeValues(allSolids, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.background).color,
30450
  gradientValue,
30451
  onGradientChange: hasGradientColor ? onChangeGradient : undefined
30452
  }] : []), ...(hasLinkColor ? [{
30453
- label: (0,external_wp_i18n_namespaceObject.__)('Link Color'),
30454
  onColorChange: onChangeLinkColor,
30455
  colorValue: getLinkColorFromAttributeValue(allSolids, style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : (_style$elements2$link2 = _style$elements2$link.color) === null || _style$elements2$link2 === void 0 ? void 0 : _style$elements2$link2.text),
30456
  clearable: !!(style !== null && style !== void 0 && (_style$elements3 = style.elements) !== null && _style$elements3 !== void 0 && (_style$elements3$link = _style$elements3.link) !== null && _style$elements3$link !== void 0 && (_style$elements3$link2 = _style$elements3$link.color) !== null && _style$elements3$link2 !== void 0 && _style$elements3$link2.text)
@@ -33019,6 +33132,7 @@ function compileStyleValue(uncompiledValue) {
33019
 
33020
  function getInlineStyles() {
33021
  let styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
33022
  const output = {};
33023
  Object.keys(external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY).forEach(propKey => {
33024
  const path = external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[propKey].value;
@@ -33038,7 +33152,7 @@ function getInlineStyles() {
33038
  output[name] = compileStyleValue(value);
33039
  }
33040
  });
33041
- } else {
33042
  output[propKey] = compileStyleValue((0,external_lodash_namespaceObject.get)(styles, path));
33043
  }
33044
  }
@@ -33759,7 +33873,8 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
33759
  });
33760
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, shouldRenderLayoutStyles && element && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(LayoutStyle, {
33761
  selector: `.wp-container-${id}`,
33762
- layout: usedLayout
 
33763
  }), element), (0,external_wp_element_namespaceObject.createElement)(BlockListBlock, _extends({}, props, {
33764
  className: className
33765
  })));
@@ -33907,7 +34022,7 @@ function getColorClassesAndStyles(attributes) {
33907
  style: styleProp
33908
  };
33909
  }
33910
- const use_color_props_EMPTY_OBJECT = {};
33911
  /**
33912
  * Determines the color related props for a block derived from its color block
33913
  * support attributes.
@@ -33932,7 +34047,7 @@ function useColorProps(attributes) {
33932
  const userPalette = useSetting('color.palette.custom') || [];
33933
  const themePalette = useSetting('color.palette.theme') || [];
33934
  const defaultPalette = useSetting('color.palette.default') || [];
33935
- const gradientsPerOrigin = useSetting('color.gradients') || use_color_props_EMPTY_OBJECT;
33936
  const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
33937
  const gradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
33938
  const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
@@ -36116,7 +36231,7 @@ function useListViewDropZone() {
36116
  return {
36117
  clientId,
36118
  rootClientId,
36119
- blockIndex: getBlockIndex(clientId, rootClientId),
36120
  element: blockElement,
36121
  isDraggedBlock: isBlockDrag ? draggedBlockClientIds.includes(clientId) : false,
36122
  innerBlockCount: getBlockCount(clientId),
@@ -44389,7 +44504,16 @@ const BlockInspector = _ref => {
44389
  if (count > 1) {
44390
  return (0,external_wp_element_namespaceObject.createElement)("div", {
44391
  className: "block-editor-block-inspector"
44392
- }, (0,external_wp_element_namespaceObject.createElement)(multi_selection_inspector, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null));
 
 
 
 
 
 
 
 
 
44393
  }
44394
 
44395
  const isSelectedBlockUnregistered = selectedBlockName === (0,external_wp_blocks_namespaceObject.getUnregisteredTypeHandlerName)();
@@ -44436,12 +44560,12 @@ const BlockInspectorSingleBlock = _ref2 => {
44436
  }))), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44437
  __experimentalGroup: "typography",
44438
  label: (0,external_wp_i18n_namespaceObject.__)('Typography')
44439
- }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44440
- __experimentalGroup: "border",
44441
- label: (0,external_wp_i18n_namespaceObject.__)('Border')
44442
  }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44443
  __experimentalGroup: "dimensions",
44444
  label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
 
 
 
44445
  }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(AdvancedControls, null)), (0,external_wp_element_namespaceObject.createElement)(skip_to_selected_block, {
44446
  key: "back"
44447
  }));
@@ -44570,6 +44694,15 @@ function BlockTools(_ref) {
44570
  insertBeforeBlock((0,external_lodash_namespaceObject.first)(clientIds));
44571
  }
44572
  } else if (isMatch('core/block-editor/delete-multi-selection', event)) {
 
 
 
 
 
 
 
 
 
44573
  const clientIds = getSelectedBlockClientIds();
44574
 
44575
  if (clientIds.length > 1) {
@@ -45390,6 +45523,7 @@ function useNoRecursiveRenders(uniqueId) {
45390
 
45391
 
45392
 
 
45393
 
45394
 
45395
 
2215
  "__experimentalBorderRadiusControl": function() { return /* reexport */ BorderRadiusControl; },
2216
  "__experimentalBorderStyleControl": function() { return /* reexport */ BorderStyleControl; },
2217
  "__experimentalColorGradientControl": function() { return /* reexport */ control; },
2218
+ "__experimentalColorGradientSettingsDropdown": function() { return /* reexport */ ColorGradientSettingsDropdown; },
2219
  "__experimentalDuotoneControl": function() { return /* reexport */ duotone_control; },
2220
  "__experimentalFontAppearanceControl": function() { return /* reexport */ FontAppearanceControl; },
2221
  "__experimentalFontFamilyControl": function() { return /* reexport */ FontFamilyControl; },
3400
 
3401
  return reducer(state, action);
3402
  };
3403
+ /**
3404
+ * Higher-order reducer which removes blocks from state when switching parent block controlled state.
3405
+ *
3406
+ * @param {Function} reducer Original reducer function.
3407
+ *
3408
+ * @return {Function} Enhanced reducer function.
3409
+ */
3410
+
3411
+
3412
+ const withResetControlledBlocks = reducer => (state, action) => {
3413
+ if (action.type === 'SET_HAS_CONTROLLED_INNER_BLOCKS') {
3414
+ // when switching a block from controlled to uncontrolled or inverse,
3415
+ // we need to remove its content first.
3416
+ const tempState = reducer(state, {
3417
+ type: 'REPLACE_INNER_BLOCKS',
3418
+ rootClientId: action.clientId,
3419
+ blocks: []
3420
+ });
3421
+ return reducer(tempState, action);
3422
+ }
3423
+
3424
+ return reducer(state, action);
3425
+ };
3426
  /**
3427
  * Reducer returning the blocks state.
3428
  *
3436
  const blocks = (0,external_lodash_namespaceObject.flow)(external_wp_data_namespaceObject.combineReducers, withSaveReusableBlock, // needs to be before withBlockCache
3437
  withBlockTree, // needs to be before withInnerBlocksRemoveCascade
3438
  withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
3439
+ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange, withResetControlledBlocks)({
3440
  byClientId() {
3441
  let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3442
  let action = arguments.length > 1 ? arguments[1] : undefined;
5553
  * Returns the index at which the block corresponding to the specified client
5554
  * ID occurs within the block order, or `-1` if the block does not exist.
5555
  *
5556
+ * @param {Object} state Editor state.
5557
+ * @param {string} clientId Block client ID.
 
5558
  *
5559
  * @return {number} Index at which block exists in order.
5560
  */
5561
 
5562
+ function getBlockIndex(state, clientId) {
5563
+ const rootClientId = getBlockRootClientId(state, clientId);
5564
  return getBlockOrder(state, rootClientId).indexOf(clientId);
5565
  }
5566
  /**
8056
  }
8057
 
8058
  const rootClientId = select.getBlockRootClientId(clientIds[0]);
8059
+ const lastSelectedIndex = select.getBlockIndex((0,external_lodash_namespaceObject.last)((0,external_lodash_namespaceObject.castArray)(clientIds)));
8060
  const clonedBlocks = blocks.map(block => (0,external_wp_blocks_namespaceObject.__experimentalCloneSanitizedBlock)(block));
8061
  dispatch.insertBlocks(clonedBlocks, lastSelectedIndex + 1, rootClientId, updateSelection);
8062
 
8090
  return;
8091
  }
8092
 
8093
+ const firstSelectedIndex = select.getBlockIndex(clientId);
8094
  return dispatch.insertDefaultBlock({}, rootClientId, firstSelectedIndex);
8095
  };
8096
  /**
8116
  return;
8117
  }
8118
 
8119
+ const firstSelectedIndex = select.getBlockIndex(clientId);
8120
  return dispatch.insertDefaultBlock({}, rootClientId, firstSelectedIndex + 1);
8121
  };
8122
  /**
8639
 
8640
 
8641
 
8642
+ const blockedPaths = ['color', 'border', 'typography', 'spacing'];
8643
  const deprecatedFlags = {
8644
  'color.palette': settings => settings.colors === undefined ? undefined : settings.colors,
8645
  'color.gradients': settings => settings.gradients === undefined ? undefined : settings.gradients,
8720
  const setting = (0,external_wp_data_namespaceObject.useSelect)(select => {
8721
  var _get;
8722
 
8723
+ if (blockedPaths.includes(path)) {
8724
+ // eslint-disable-next-line no-console
8725
+ console.warn('Top level useSetting paths are disabled. Please use a subpath to query the information needed.');
8726
+ return undefined;
8727
+ }
8728
+
8729
  const settings = select(store).getSettings(); // 1 - Use __experimental features, if available.
8730
  // We cascade to the all value if the block one is not available.
8731
 
8930
  }));
8931
  },
8932
  save: function FlexLayoutStyle(_ref3) {
8933
+ var _style$spacing$blockG, _style$spacing;
8934
+
8935
  let {
8936
  selector,
8937
+ layout,
8938
+ style
8939
  } = _ref3;
8940
  const {
8941
+ orientation = 'horizontal'
 
8942
  } = layout;
8943
  const blockGapSupport = useSetting('spacing.blockGap');
8944
  const hasBlockGapStylesSupport = blockGapSupport !== null;
8945
+ const blockGapValue = (_style$spacing$blockG = style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.blockGap) !== null && _style$spacing$blockG !== void 0 ? _style$spacing$blockG : 'var( --wp--style--block-gap, 0.5em )';
8946
  const justifyContent = justifyContentMap[layout.justifyContent] || justifyContentMap.left;
8947
  const flexWrap = flexWrapOptions.includes(layout.flexWrap) ? layout.flexWrap : 'wrap';
8948
+ const rowOrientation = `
8949
  flex-direction: row;
8950
  align-items: center;
8951
  justify-content: ${justifyContent};
8952
  `;
 
 
 
 
 
 
 
 
 
 
 
 
 
8953
  const alignItems = alignItemsMap[layout.justifyContent] || alignItemsMap.left;
8954
+ const columnOrientation = `
8955
  flex-direction: column;
8956
  align-items: ${alignItems};
8957
  `;
 
 
 
 
 
 
 
 
 
 
8958
  return (0,external_wp_element_namespaceObject.createElement)("style", null, `
8959
  ${appendSelectors(selector)} {
8960
  display: flex;
8961
+ gap: ${hasBlockGapStylesSupport ? blockGapValue : '0.5em'};
8962
  flex-wrap: ${flexWrap};
8963
  ${orientation === 'horizontal' ? rowOrientation : columnOrientation}
8964
  }
9218
  return null;
9219
  },
9220
  save: function DefaultLayoutStyle(_ref2) {
9221
+ var _style$spacing$blockG, _style$spacing;
9222
+
9223
  let {
9224
  selector,
9225
+ layout = {},
9226
+ style
9227
  } = _ref2;
9228
  const {
9229
  contentSize,
9231
  } = layout;
9232
  const blockGapSupport = useSetting('spacing.blockGap');
9233
  const hasBlockGapStylesSupport = blockGapSupport !== null;
9234
+ const blockGapValue = (_style$spacing$blockG = style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.blockGap) !== null && _style$spacing$blockG !== void 0 ? _style$spacing$blockG : 'var( --wp--style--block-gap )';
9235
+ let output = !!contentSize || !!wideSize ? `
9236
  ${appendSelectors(selector, '> *')} {
9237
  max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
9238
  margin-left: auto !important;
9247
  max-width: none;
9248
  }
9249
  ` : '';
9250
+ output += `
9251
  ${appendSelectors(selector, '> [data-align="left"]')} {
9252
  float: left;
9253
  margin-right: 2em;
9261
  `;
9262
 
9263
  if (hasBlockGapStylesSupport) {
9264
+ output += `
9265
  ${appendSelectors(selector, '> *')} {
9266
  margin-top: 0;
9267
  margin-bottom: 0;
9268
  }
9269
  ${appendSelectors(selector, '> * + *')} {
9270
+ margin-top: ${blockGapValue};
9271
  }
9272
  `;
9273
  }
9274
 
9275
+ return (0,external_wp_element_namespaceObject.createElement)("style", null, output);
9276
  },
9277
 
9278
  getOrientation() {
10035
  label
10036
  } = _ref;
10037
  const {
10038
+ attributes,
10039
+ clientIds,
10040
+ panelId
10041
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
10042
  const {
10043
  getBlockAttributes,
10044
+ getMultiSelectedBlockClientIds,
10045
+ getSelectedBlockClientId,
10046
+ hasMultiSelection
10047
+ } = select(store); // When we currently have a multi-selection, the value returned from
10048
+ // `getSelectedBlockClientId()` is `null`. When a `null` value is used
10049
+ // for the `panelId`, a `ToolsPanel` will still allow panel items to
10050
+ // register themselves despite their panelIds not matching.
10051
+
10052
  const selectedBlockClientId = getSelectedBlockClientId();
10053
+
10054
+ if (hasMultiSelection()) {
10055
+ const selectedBlockClientIds = getMultiSelectedBlockClientIds();
10056
+ const selectedBlockAttributes = selectedBlockClientIds.reduce((blockAttributes, blockId) => {
10057
+ blockAttributes[blockId] = getBlockAttributes(blockId);
10058
+ return blockAttributes;
10059
+ }, {});
10060
+ return {
10061
+ panelId: selectedBlockClientId,
10062
+ clientIds: selectedBlockClientIds,
10063
+ attributes: selectedBlockAttributes
10064
+ };
10065
+ }
10066
+
10067
  return {
10068
+ panelId: selectedBlockClientId,
10069
+ clientIds: [selectedBlockClientId],
10070
+ attributes: {
10071
+ [selectedBlockClientId]: getBlockAttributes(selectedBlockClientId)
10072
+ }
10073
  };
10074
  }, []);
10075
  const {
10078
 
10079
  const resetAll = function () {
10080
  let resetFilters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10081
+ const newAttributes = {};
10082
+ clientIds.forEach(clientId => {
10083
+ const {
10084
+ style
10085
+ } = attributes[clientId];
10086
+ let newBlockAttributes = {
10087
+ style
 
 
10088
  };
10089
+ resetFilters.forEach(resetFilter => {
10090
+ newBlockAttributes = { ...newBlockAttributes,
10091
+ ...resetFilter(newBlockAttributes)
10092
+ };
10093
+ }); // Enforce a cleaned style object.
10094
 
10095
+ newBlockAttributes = { ...newBlockAttributes,
10096
+ style: cleanEmptyObject(newBlockAttributes.style)
10097
+ };
10098
+ newAttributes[clientId] = newBlockAttributes;
10099
+ });
10100
+ updateBlockAttributes(clientIds, newAttributes, true);
10101
  };
10102
 
10103
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
10104
  className: `${group}-block-support-panel`,
10105
  label: label,
10106
  resetAll: resetAll,
10107
+ key: panelId,
10108
+ panelId: panelId,
10109
  hasInnerWrapper: true,
10110
  shouldRenderPlaceholderItems: true // Required to maintain fills ordering.
10111
 
16327
  enableAnimation
16328
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
16329
  const {
 
16330
  getBlockIndex,
16331
  getBlockMode,
16332
  getBlockName,
16340
  const isSelected = isBlockSelected(clientId);
16341
  const isPartOfMultiSelection = isBlockMultiSelected(clientId) || isAncestorMultiSelected(clientId);
16342
  const blockName = getBlockName(clientId);
 
16343
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(blockName);
16344
  return {
16345
+ index: getBlockIndex(clientId),
16346
  mode: getBlockMode(clientId),
16347
  name: blockName,
16348
  blockApiVersion: (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) || 1,
16653
  const {
16654
  getBlockIndex
16655
  } = select(store);
16656
+ const index = getBlockIndex(clientId);
16657
  insertBlocks(blocks, index + 1, rootClientId);
16658
  },
16659
 
16998
  getBlockName,
16999
  getBlocks
17000
  } = registry.select(store);
17001
+ const isControlled = (0,external_wp_data_namespaceObject.useSelect)(select => {
17002
+ return !clientId || select(store).areInnerBlocksControlled(clientId);
17003
+ }, [clientId]);
17004
  const pendingChanges = (0,external_wp_element_namespaceObject.useRef)({
17005
  incoming: null,
17006
  outgoing: []
17018
  __unstableMarkNextChangeAsNotPersistent();
17019
 
17020
  if (clientId) {
17021
+ // It is important to batch here because otherwise,
17022
+ // as soon as `setHasControlledInnerBlocks` is called
17023
+ // the effect to restore might be triggered
17024
+ // before the actual blocks get set properly in state.
17025
+ registry.batch(() => {
17026
+ setHasControlledInnerBlocks(clientId, true);
17027
+ const storeBlocks = controlledBlocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
17028
+
17029
+ if (subscribed.current) {
17030
+ pendingChanges.current.incoming = storeBlocks;
17031
+ }
17032
 
17033
+ __unstableMarkNextChangeAsNotPersistent();
17034
 
17035
+ replaceInnerBlocks(clientId, storeBlocks);
17036
+ });
 
 
 
17037
  } else {
17038
  if (subscribed.current) {
17039
  pendingChanges.current.incoming = controlledBlocks;
17078
  }
17079
  }
17080
  }, [controlledBlocks, clientId]);
17081
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
17082
+ // When the block becomes uncontrolled, it means its inner state has been reset
17083
+ // we need to take the blocks again from the external value property.
17084
+ if (!isControlled) {
17085
+ pendingChanges.current.outgoing = [];
17086
+ setControlledBlocks();
17087
+ }
17088
+ }, [isControlled]);
17089
  (0,external_wp_element_namespaceObject.useEffect)(() => {
17090
  const {
17091
  getSelectionStart,
17092
  getSelectionEnd,
17093
  getSelectedBlocksInitialCaretPosition,
17094
  isLastBlockChangePersistent,
17095
+ __unstableIsLastBlockChangeIgnored,
17096
+ areInnerBlocksControlled
17097
  } = registry.select(store);
17098
  let blocks = getBlocks(clientId);
17099
  let isPersistent = isLastBlockChangePersistent();
17107
  // the subscription is triggering for a block (`clientId !== null`)
17108
  // and its block name can't be found because it's not on the list.
17109
  // (`getBlockName( clientId ) === null`).
17110
+ if (clientId !== null && getBlockName(clientId) === null) return; // When RESET_BLOCKS on parent blocks get called, the controlled blocks
17111
+ // can reset to uncontrolled, in these situations, it means we need to populate
17112
+ // the blocks again from the external blocks (the value property here)
17113
+ // and we should stop triggering onChange
17114
+
17115
+ const isStillControlled = !clientId || areInnerBlocksControlled(clientId);
17116
+
17117
+ if (!isStillControlled) {
17118
+ return;
17119
+ }
17120
+
17121
  const newIsPersistent = isLastBlockChangePersistent();
17122
  const newBlocks = getBlocks(clientId);
17123
  const areBlocksDifferent = newBlocks !== blocks;
21108
  _destinationIndex = insertionIndex;
21109
  } else if (clientId) {
21110
  // Insert after a specific client ID.
21111
+ _destinationIndex = getBlockIndex(clientId);
21112
  } else if (!isAppender && selectedBlockClientId) {
21113
  _destinationRootClientId = getBlockRootClientId(selectedBlockClientId);
21114
+ _destinationIndex = getBlockIndex(selectedBlockClientId) + 1;
21115
  } else {
21116
  // Insert at the end of the list.
21117
  _destinationIndex = getBlockOrder(_destinationRootClientId).length;
22101
  getBlockIndex,
22102
  getBlockCount
22103
  } = select(store);
22104
+ const index = getBlockIndex(clientId);
22105
  return {
22106
  setInserterIsOpened: getSettings().__experimentalSetIsInserterOpened,
22107
  insertionIndex: index === -1 ? getBlockCount() : index
22424
  } = select(store); // If the clientId is defined, we insert at the position of the block.
22425
 
22426
  if (clientId) {
22427
+ return getBlockIndex(clientId);
22428
  } // If there a selected block, we insert after the selected block.
22429
 
22430
 
22431
  const end = getBlockSelectionEnd();
22432
 
22433
  if (!isAppender && end && getBlockRootClientId(end) === rootClientId) {
22434
+ return getBlockIndex(end) + 1;
22435
  } // Otherwise, we insert at the end of the current rootClientId
22436
 
22437
 
23265
  return;
23266
  }
23267
 
23268
+ const index = getBlockIndex(clientId); // Don't show the in-between inserter before the first block in
23269
  // the list (preserves the original behaviour).
23270
 
23271
  if (index === 0) {
23752
  hasBlockMovingClientId,
23753
  getBlockListSettings
23754
  } = select(store);
23755
+ const index = getBlockIndex(clientId);
23756
  const {
23757
  name,
23758
  attributes
23864
  if ((isEnter || isSpace) && startingBlockClientId) {
23865
  const sourceRoot = getBlockRootClientId(startingBlockClientId);
23866
  const destRoot = getBlockRootClientId(selectedBlockClientId);
23867
+ const sourceBlockIndex = getBlockIndex(startingBlockClientId);
23868
+ let destinationBlockIndex = getBlockIndex(selectedBlockClientId);
23869
 
23870
  if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
23871
  destinationBlockIndex -= 1;
24410
  const normalizedClientIds = (0,external_lodash_namespaceObject.castArray)(clientIds);
24411
  const firstClientId = (0,external_lodash_namespaceObject.first)(normalizedClientIds);
24412
  const blockRootClientId = getBlockRootClientId(firstClientId);
24413
+ const firstBlockIndex = getBlockIndex(firstClientId);
24414
+ const lastBlockIndex = getBlockIndex((0,external_lodash_namespaceObject.last)(normalizedClientIds));
24415
  const blockOrder = getBlockOrder(blockRootClientId);
24416
  const block = getBlock(firstClientId);
24417
  const isFirstBlock = firstBlockIndex === 0;
24574
  const firstClientId = (0,external_lodash_namespaceObject.first)(normalizedClientIds);
24575
  const block = getBlock(firstClientId);
24576
  const rootClientId = getBlockRootClientId((0,external_lodash_namespaceObject.first)(normalizedClientIds));
24577
+ const firstIndex = getBlockIndex(firstClientId);
24578
+ const lastIndex = getBlockIndex((0,external_lodash_namespaceObject.last)(normalizedClientIds));
24579
  const blockOrder = getBlockOrder(rootClientId);
24580
  const isFirst = firstIndex === 0;
24581
  const isLast = lastIndex === blockOrder.length - 1;
25047
  * act as a fallback for when there is no active style applied to a block. The default item also serves
25048
  * as a switch on the frontend to deactivate non-default styles.
25049
  *
25050
+ * @param {Array} styles Block style variations.
25051
  *
25052
  * @return {Array<Object?>} The style collection.
25053
  */
25066
  /**
25067
  * Returns a style object from a collection of styles where that style object is the default block style.
25068
  *
25069
+ * @param {Array} styles Block style variations.
25070
  *
25071
  * @return {Object?} The default style object, if found.
25072
  */
25120
 
25121
  /**
25122
  *
25123
+ * @param {useStylesForBlocksArguments} useStylesForBlocks arguments.
25124
  * @return {Object} Results of the select methods.
25125
  */
25126
 
27576
 
27577
 
27578
  if (dropType === 'block') {
27579
+ const sourceBlockIndex = getBlockIndex(sourceClientIds[0]); // If the user is dropping to the same position, return early.
27580
 
27581
  if (sourceRootClientId === targetRootClientId && sourceBlockIndex === targetBlockIndex) {
27582
  return;
28355
 
28356
  /* harmony default export */ var control = (ColorGradientControl);
28357
  //# sourceMappingURL=control.js.map
28358
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors-gradients/dropdown.js
28359
+
28360
+
28361
+
28362
+ /**
28363
+ * External dependencies
28364
+ */
28365
+
28366
+ /**
28367
+ * WordPress dependencies
28368
+ */
28369
+
28370
+
28371
+
28372
+ /**
28373
+ * Internal dependencies
28374
+ */
28375
+
28376
+
28377
+ function ColorGradientSettingsDropdown(_ref) {
28378
+ let {
28379
+ colors,
28380
+ gradients,
28381
+ disableCustomColors,
28382
+ disableCustomGradients,
28383
+ __experimentalHasMultipleOrigins,
28384
+ __experimentalIsRenderedInSidebar,
28385
+ enableAlpha,
28386
+ settings
28387
+ } = _ref;
28388
+ let dropdownPosition;
28389
+
28390
+ if (__experimentalIsRenderedInSidebar) {
28391
+ dropdownPosition = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'bottom right' : 'bottom left';
28392
+ }
28393
+
28394
+ return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
28395
+ isBordered: true,
28396
+ isSeparated: true,
28397
+ className: "block-editor-panel-color-gradient-settings__item-group"
28398
+ }, settings.map((setting, index) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Dropdown, {
28399
+ key: index,
28400
+ position: dropdownPosition,
28401
+ className: "block-editor-panel-color-gradient-settings__dropdown",
28402
+ contentClassName: "block-editor-panel-color-gradient-settings__dropdown-content",
28403
+ renderToggle: _ref2 => {
28404
+ var _setting$gradientValu;
28405
+
28406
+ let {
28407
+ isOpen,
28408
+ onToggle
28409
+ } = _ref2;
28410
+ return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItem, {
28411
+ onClick: onToggle,
28412
+ className: classnames_default()('block-editor-panel-color-gradient-settings__item', {
28413
+ 'is-open': isOpen
28414
+ })
28415
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
28416
+ justify: "flex-start"
28417
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
28418
+ className: "block-editor-panel-color-gradient-settings__color-indicator",
28419
+ colorValue: (_setting$gradientValu = setting.gradientValue) !== null && _setting$gradientValu !== void 0 ? _setting$gradientValu : setting.colorValue
28420
+ }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, setting.label)));
28421
+ },
28422
+ renderContent: () => (0,external_wp_element_namespaceObject.createElement)(control, _extends({
28423
+ showTitle: false,
28424
+ colors,
28425
+ gradients,
28426
+ disableCustomColors,
28427
+ disableCustomGradients,
28428
+ __experimentalHasMultipleOrigins,
28429
+ __experimentalIsRenderedInSidebar,
28430
+ enableAlpha
28431
+ }, setting))
28432
+ })));
28433
+ }
28434
+ //# sourceMappingURL=dropdown.js.map
28435
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors-gradients/use-common-single-multiple-selects.js
28436
  /**
28437
  * Internal dependencies
28705
  });
28706
  };
28707
 
28708
+ const settings = [{
28709
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
 
28710
  onColorChange: onChangeColor,
28711
+ colorValue,
28712
+ clearable: false
28713
+ }];
28714
+ return (0,external_wp_element_namespaceObject.createElement)(ColorGradientSettingsDropdown, _extends({
28715
+ settings: settings,
28716
+ disableCustomColors: true,
28717
+ disableCustomGradients: true,
28718
  __experimentalHasMultipleOrigins: true,
28719
+ __experimentalIsRenderedInSidebar: true,
28720
+ enableAlpha: true
28721
  }, colorGradientSettings));
28722
  }
28723
  /**
29876
 
29877
  return gradient && gradient.slug;
29878
  }
 
29879
  function __experimentalUseGradient() {
29880
  let {
29881
  gradientAttribute = 'gradient',
29884
  const {
29885
  clientId
29886
  } = useBlockEditContext();
29887
+ const userGradientPalette = useSetting('color.gradients.custom');
29888
+ const themeGradientPalette = useSetting('color.gradients.theme');
29889
+ const defaultGradientPalette = useSetting('color.gradients.default');
29890
+ const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userGradientPalette || []), ...(themeGradientPalette || []), ...(defaultGradientPalette || [])], [userGradientPalette, themeGradientPalette, defaultGradientPalette]);
29891
  const {
29892
  gradient,
29893
  customGradient
30037
  gradients: gradients,
30038
  settings: settings
30039
  }));
 
 
 
 
 
 
 
 
 
 
30040
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, _extends({
30041
  className: classnames_default()('block-editor-panel-color-gradient-settings', className),
30042
  title: showTitle ? titleElement : undefined
30043
+ }, props), (0,external_wp_element_namespaceObject.createElement)(ColorGradientSettingsDropdown, {
30044
+ settings: settings,
30045
+ colors,
30046
+ gradients,
30047
+ disableCustomColors,
30048
+ disableCustomGradients,
30049
+ __experimentalHasMultipleOrigins,
30050
+ __experimentalIsRenderedInSidebar,
30051
+ enableAlpha
30052
+ }), !!children && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30053
  marginY: 4
30054
  }), " ", children));
30055
  };
30251
 
30252
 
30253
  const COLOR_SUPPORT_KEY = 'color';
 
30254
 
30255
  const hasColorSupport = blockType => {
30256
  const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, COLOR_SUPPORT_KEY);
30420
 
30421
 
30422
  function ColorEdit(props) {
30423
+ var _style$color6, _style$color7, _style$color8, _style$elements2, _style$elements2$link, _style$elements2$link2, _style$elements3, _style$elements3$link, _style$elements3$link2;
30424
 
30425
  const {
30426
  name: blockName,
30433
  const themePalette = useSetting('color.palette.theme');
30434
  const defaultPalette = useSetting('color.palette.default');
30435
  const allSolids = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
30436
+ const userGradientPalette = useSetting('color.gradients.custom');
30437
+ const themeGradientPalette = useSetting('color.gradients.theme');
30438
+ const defaultGradientPalette = useSetting('color.gradients.default');
30439
+ const allGradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userGradientPalette || []), ...(themeGradientPalette || []), ...(defaultGradientPalette || [])], [userGradientPalette, themeGradientPalette, defaultGradientPalette]);
30440
  const areCustomSolidsEnabled = useSetting('color.custom');
30441
  const areCustomGradientsEnabled = useSetting('color.customGradient');
30442
  const isBackgroundEnabled = useSetting('color.background');
30443
  const isLinkEnabled = useSetting('color.link');
30444
  const isTextEnabled = useSetting('color.text');
30445
  const solidsEnabled = areCustomSolidsEnabled || !themePalette || (themePalette === null || themePalette === void 0 ? void 0 : themePalette.length) > 0;
30446
+ const gradientsEnabled = areCustomGradientsEnabled || !themeGradientPalette || (themeGradientPalette === null || themeGradientPalette === void 0 ? void 0 : themeGradientPalette.length) > 0; // Shouldn't be needed but right now the ColorGradientsPanel
 
30447
  // can trigger both onChangeColor and onChangeBackground
30448
  // synchronously causing our two callbacks to override changes
30449
  // from each other.
30553
  external_wp_element_namespaceObject.Platform.OS === 'web' && !gradient && !(style !== null && style !== void 0 && (_style$color6 = style.color) !== null && _style$color6 !== void 0 && _style$color6.gradient),
30554
  clientId: props.clientId,
30555
  settings: [...(hasTextColor ? [{
30556
+ label: (0,external_wp_i18n_namespaceObject.__)('Text'),
30557
  onColorChange: onChangeColor('text'),
30558
  colorValue: getColorObjectByAttributeValues(allSolids, textColor, style === null || style === void 0 ? void 0 : (_style$color7 = style.color) === null || _style$color7 === void 0 ? void 0 : _style$color7.text).color
30559
  }] : []), ...(hasBackgroundColor || hasGradientColor ? [{
30560
+ label: (0,external_wp_i18n_namespaceObject.__)('Background'),
30561
  onColorChange: hasBackgroundColor ? onChangeColor('background') : undefined,
30562
  colorValue: getColorObjectByAttributeValues(allSolids, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color8 = style.color) === null || _style$color8 === void 0 ? void 0 : _style$color8.background).color,
30563
  gradientValue,
30564
  onGradientChange: hasGradientColor ? onChangeGradient : undefined
30565
  }] : []), ...(hasLinkColor ? [{
30566
+ label: (0,external_wp_i18n_namespaceObject.__)('Link'),
30567
  onColorChange: onChangeLinkColor,
30568
  colorValue: getLinkColorFromAttributeValue(allSolids, style === null || style === void 0 ? void 0 : (_style$elements2 = style.elements) === null || _style$elements2 === void 0 ? void 0 : (_style$elements2$link = _style$elements2.link) === null || _style$elements2$link === void 0 ? void 0 : (_style$elements2$link2 = _style$elements2$link.color) === null || _style$elements2$link2 === void 0 ? void 0 : _style$elements2$link2.text),
30569
  clearable: !!(style !== null && style !== void 0 && (_style$elements3 = style.elements) !== null && _style$elements3 !== void 0 && (_style$elements3$link = _style$elements3.link) !== null && _style$elements3$link !== void 0 && (_style$elements3$link2 = _style$elements3$link.color) !== null && _style$elements3$link2 !== void 0 && _style$elements3$link2.text)
33132
 
33133
  function getInlineStyles() {
33134
  let styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
33135
+ const ignoredStyles = ['spacing.blockGap'];
33136
  const output = {};
33137
  Object.keys(external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY).forEach(propKey => {
33138
  const path = external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[propKey].value;
33152
  output[name] = compileStyleValue(value);
33153
  }
33154
  });
33155
+ } else if (!ignoredStyles.includes(path.join('.'))) {
33156
  output[propKey] = compileStyleValue((0,external_lodash_namespaceObject.get)(styles, path));
33157
  }
33158
  }
33873
  });
33874
  return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, shouldRenderLayoutStyles && element && (0,external_wp_element_namespaceObject.createPortal)((0,external_wp_element_namespaceObject.createElement)(LayoutStyle, {
33875
  selector: `.wp-container-${id}`,
33876
+ layout: usedLayout,
33877
+ style: attributes === null || attributes === void 0 ? void 0 : attributes.style
33878
  }), element), (0,external_wp_element_namespaceObject.createElement)(BlockListBlock, _extends({}, props, {
33879
  className: className
33880
  })));
34022
  style: styleProp
34023
  };
34024
  }
34025
+ const EMPTY_OBJECT = {};
34026
  /**
34027
  * Determines the color related props for a block derived from its color block
34028
  * support attributes.
34047
  const userPalette = useSetting('color.palette.custom') || [];
34048
  const themePalette = useSetting('color.palette.theme') || [];
34049
  const defaultPalette = useSetting('color.palette.default') || [];
34050
+ const gradientsPerOrigin = useSetting('color.gradients') || EMPTY_OBJECT;
34051
  const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
34052
  const gradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.custom) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.theme) || []), ...((gradientsPerOrigin === null || gradientsPerOrigin === void 0 ? void 0 : gradientsPerOrigin.default) || [])], [gradientsPerOrigin]);
34053
  const colorProps = getColorClassesAndStyles(attributes); // Force inline styles to apply colors when themes do not load their color
36231
  return {
36232
  clientId,
36233
  rootClientId,
36234
+ blockIndex: getBlockIndex(clientId),
36235
  element: blockElement,
36236
  isDraggedBlock: isBlockDrag ? draggedBlockClientIds.includes(clientId) : false,
36237
  innerBlockCount: getBlockCount(clientId),
44504
  if (count > 1) {
44505
  return (0,external_wp_element_namespaceObject.createElement)("div", {
44506
  className: "block-editor-block-inspector"
44507
+ }, (0,external_wp_element_namespaceObject.createElement)(multi_selection_inspector, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44508
+ __experimentalGroup: "typography",
44509
+ label: (0,external_wp_i18n_namespaceObject.__)('Typography')
44510
+ }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44511
+ __experimentalGroup: "dimensions",
44512
+ label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
44513
+ }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44514
+ __experimentalGroup: "border",
44515
+ label: (0,external_wp_i18n_namespaceObject.__)('Border')
44516
+ }));
44517
  }
44518
 
44519
  const isSelectedBlockUnregistered = selectedBlockName === (0,external_wp_blocks_namespaceObject.getUnregisteredTypeHandlerName)();
44560
  }))), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, null), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44561
  __experimentalGroup: "typography",
44562
  label: (0,external_wp_i18n_namespaceObject.__)('Typography')
 
 
 
44563
  }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44564
  __experimentalGroup: "dimensions",
44565
  label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
44566
+ }), (0,external_wp_element_namespaceObject.createElement)(inspector_controls.Slot, {
44567
+ __experimentalGroup: "border",
44568
+ label: (0,external_wp_i18n_namespaceObject.__)('Border')
44569
  }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)(AdvancedControls, null)), (0,external_wp_element_namespaceObject.createElement)(skip_to_selected_block, {
44570
  key: "back"
44571
  }));
44694
  insertBeforeBlock((0,external_lodash_namespaceObject.first)(clientIds));
44695
  }
44696
  } else if (isMatch('core/block-editor/delete-multi-selection', event)) {
44697
+ /**
44698
+ * Check if the target element is a text area, input or
44699
+ * event.defaultPrevented and return early. In all these
44700
+ * cases backspace could be handled elsewhere.
44701
+ */
44702
+ if (['INPUT', 'TEXTAREA'].includes(event.target.nodeName) || event.defaultPrevented) {
44703
+ return;
44704
+ }
44705
+
44706
  const clientIds = getSelectedBlockClientIds();
44707
 
44708
  if (clientIds.length > 1) {
45523
 
45524
 
45525
 
45526
+
45527
 
45528
 
45529
 
build/block-editor/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '67d21aeb1aa1df344a63b445f5fd8f8e');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '8a65bd0c8fcb5eed82edb20d696d5d2a');
build/block-editor/index.min.js CHANGED
@@ -1,33 +1,33 @@
1
- !function(){var e={9367:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var i=l("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=o)},4184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},1934:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5913:function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;l<i;l++){var c=t[l];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,l&&t[l-1].added){var u=t[l-1];t[l-1]=t[l],t[l]=u}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,g=m&&0<=f&&f<c;if(h||g){if(!h||g&&d.newPos<m.newPos?(l=r(m),i.pushComponent(l.components,void 0,!0)):((l=d).newPos++,i.pushComponent(l.components,!0,void 0)),f=i.extractCommon(l,t,e,n),l.newPos+1>=a&&f+1>=c)return s(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var h=f();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,s=i-o,a=0;i+1<r&&s+1<l&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:function(e,t,n){"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5913))&&o.__esModule?o:{default:o}).default)},9010:function(e,t,n){"use strict";var o=n(4657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=!(!p||!t.frameElement),f=o.offset(e),h=o.outerHeight(e),g=o.outerWidth(e),v=void 0,b=void 0,k=void 0,_=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:f.left-S.left-c,top:f.top-S.top-a},E={left:f.left+g-(S.left+w)+d,top:f.top+h-(S.top+B)+u},_=S):(v=o.offset(t),b=t.clientHeight,k=t.clientWidth,_={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+g-(v.left+k+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,_.top+y.top):!1===i?o.scrollTop(t,_.top+E.top):y.top<0?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top):l||((i=void 0===i||!!i)?o.scrollTop(t,_.top+y.top):o.scrollTop(t,_.top+E.top)),r&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,_.left+y.left):!1===s?o.scrollLeft(t,_.left+E.left):y.left<0?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,_.left+y.left):o.scrollLeft(t,_.left+E.left)))}},4979:function(e,t,n){"use strict";e.exports=n(9010)},4657:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function r(e){return o(e)}function l(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,l=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||l.clientLeft||0,top:o-=i.clientTop||l.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,l=n||r.defaultView.getComputedStyle(e,null);return l&&(o=l.getPropertyValue(t)||l[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,r=o.left,l=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=r,e.runtimeStyle.left=l}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},r=e.style,l=void 0;for(l in t)t.hasOwnProperty(l)&&(o[l]=r[l],r[l]=t[l]);for(l in n.call(e),t)t.hasOwnProperty(l)&&(r[l]=o[l])}function f(e,t,n){var o=0,r=void 0,l=void 0,i=void 0;for(l=0;l<t.length;l++)if(r=t[l])for(i=0;i<n.length;i++){var s;s="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,l=(c(e),d(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=l?1:-1);var s=void 0!==r||l,a=r||i;if(-1===n)return s?a-f(e,["border","padding"],o):i;if(s){var u=2===n?-f(e,["border"],o):f(e,["margin"],o);return a+(1===n?0:u)}return i+f(e,p.slice(n),o)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,l=o.documentElement[n];return"CSS1Compat"===o.compatMode&&l||r&&r[n]||l}}));var b={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function _(e,t,o){var r=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):c(e,t);for(var l in t)t.hasOwnProperty(l)&&_(e,l,t[l])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,o){return void 0===o?t&&k(t,e,-1):t?(c(t),d(t)&&(o+=f(t,["padding","border"],n)),_(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=i(e),o={},r=void 0,l=void 0;for(l in t)t.hasOwnProperty(l)&&(r=parseFloat(_(e,l))||0,o[l]=r+t[l]-n[l]);_(e,o)}(e,t)},isWindow:h,each:u,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},8303:function(e,t,n){var o=n(1934);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML="&nbsp;","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},2703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4857:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(9196),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},3692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?r(d):d,m={},f=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),g(),a(h.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var l=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=l.node),l.isLast=r==h.keys.length-1,l.isFirst=0==r,m.post&&m.post.call(h,l),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function r(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];c.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=r(o);return e.push(o),t.push(s),a(l(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),r=new n(t);return r[e].apply(r,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},9196:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{AlignmentControl:function(){return Pg},AlignmentToolbar:function(){return Mg},Autocomplete:function(){return Dg},BlockAlignmentControl:function(){return Fo},BlockAlignmentToolbar:function(){return zo},BlockBreadcrumb:function(){return Hg},BlockColorsStyleSelector:function(){return jg},BlockContextProvider:function(){return lr},BlockControls:function(){return Yn},BlockEdit:function(){return cr},BlockEditorKeyboardShortcuts:function(){return s_},BlockEditorProvider:function(){return Wa},BlockFormatControls:function(){return qn},BlockIcon:function(){return Ha},BlockInspector:function(){return o_},BlockList:function(){return pm},BlockMover:function(){return qd},BlockNavigationDropdown:function(){return mv},BlockPreview:function(){return du},BlockSelectionClearer:function(){return Ka},BlockSettingsMenu:function(){return zp},BlockSettingsMenuControls:function(){return Ap},BlockStyles:function(){return vv},BlockTitle:function(){return Ld},BlockToolbar:function(){return Vp},BlockTools:function(){return r_},BlockVerticalAlignmentControl:function(){return Fv},BlockVerticalAlignmentToolbar:function(){return zv},ButtonBlockAppender:function(){return Sd},ButtonBlockerAppender:function(){return Cd},ColorPalette:function(){return Hv},ColorPaletteControl:function(){return Uv},ContrastChecker:function(){return vf},CopyHandler:function(){return Sp},DefaultBlockAppender:function(){return yd},FontSizePicker:function(){return Xf},InnerBlocks:function(){return am},Inserter:function(){return _d},InspectorAdvancedControls:function(){return Qo},InspectorControls:function(){return Jo},JustifyContentControl:function(){return ho},JustifyToolbar:function(){return go},LineHeightControl:function(){return Rf},MediaPlaceholder:function(){return nk},MediaReplaceFlow:function(){return Xb},MediaUpload:function(){return Yb},MediaUploadCheck:function(){return Zb},MultiSelectScrollIntoView:function(){return a_},NavigableToolbar:function(){return Fd},ObserveTyping:function(){return p_},PanelColorSettings:function(){return ok},PlainText:function(){return Tk},PreserveScrollInReorder:function(){return m_},RichText:function(){return Bk},RichTextShortcut:function(){return Mk},RichTextToolbarButton:function(){return Rk},SETTINGS_DEFAULTS:function(){return v},SkipToSelectedBlock:function(){return Xk},ToolSelector:function(){return Dk},Typewriter:function(){return v_},URLInput:function(){return Bb},URLInputButton:function(){return Vk},URLPopover:function(){return ek},Warning:function(){return dr},WritingFlow:function(){return oc},__experimentalBlockAlignmentMatrixControl:function(){return zg},__experimentalBlockContentOverlay:function(){return Ug},__experimentalBlockFullHeightAligmentControl:function(){return Fg},__experimentalBlockPatternSetup:function(){return Tv},__experimentalBlockVariationPicker:function(){return kv},__experimentalBlockVariationTransforms:function(){return Pv},__experimentalBorderRadiusControl:function(){return Vm},__experimentalBorderStyleControl:function(){return jm},__experimentalColorGradientControl:function(){return bm},__experimentalDuotoneControl:function(){return Qh},__experimentalFontAppearanceControl:function(){return Mf},__experimentalFontFamilyControl:function(){return Gf},__experimentalGetBorderClassesAndStyles:function(){return dg},__experimentalGetColorClassesAndStyles:function(){return mg},__experimentalGetGradientClass:function(){return tf},__experimentalGetGradientObjectByGradientValue:function(){return of},__experimentalGetMatchingVariation:function(){return Nv},__experimentalGetSpacingClassesAndStyles:function(){return gg},__experimentalImageEditingProvider:function(){return ub},__experimentalImageEditor:function(){return _b},__experimentalImageSizeControl:function(){return Eb},__experimentalImageURLInputUI:function(){return qk},__experimentalLayoutStyle:function(){return Po},__experimentalLetterSpacingControl:function(){return bh},__experimentalLibrary:function(){return l_},__experimentalLinkControl:function(){return jb},__experimentalLinkControlSearchInput:function(){return Fb},__experimentalLinkControlSearchItem:function(){return Tb},__experimentalLinkControlSearchResults:function(){return Mb},__experimentalListView:function(){return dv},__experimentalPanelColorGradientSettings:function(){return hf},__experimentalPreviewOptions:function(){return Yk},__experimentalResponsiveBlockControl:function(){return Pk},__experimentalTextDecorationControl:function(){return ih},__experimentalTextTransformControl:function(){return fh},__experimentalUnitControl:function(){return Ok},__experimentalUseBlockPreview:function(){return pu},__experimentalUseBorderProps:function(){return pg},__experimentalUseColorProps:function(){return hg},__experimentalUseCustomSides:function(){return Vh},__experimentalUseGradient:function(){return sf},__experimentalUseNoRecursiveRenders:function(){return y_},__experimentalUseResizeCanvas:function(){return Zk},__unstableBlockSettingsMenuFirstItem:function(){return Np},__unstableEditorStyles:function(){return au},__unstableIframe:function(){return ic},__unstableInserterMenuExtension:function(){return cd},__unstableRichTextInputEvent:function(){return Lk},__unstableUseBlockSelectionClearer:function(){return ja},__unstableUseClipboardHandler:function(){return Cp},__unstableUseMouseMoveTypingReset:function(){return u_},__unstableUseTypewriter:function(){return g_},__unstableUseTypingObserver:function(){return d_},createCustomColorsHOC:function(){return yg},getColorClassName:function(){return Cm},getColorObjectByAttributeValues:function(){return ym},getColorObjectByColorValue:function(){return Em},getFontSize:function(){return qf},getFontSizeClass:function(){return Zf},getFontSizeObjectByValue:function(){return Yf},getGradientSlugByValue:function(){return rf},getGradientValueBySlug:function(){return nf},getPxFromCssUnit:function(){return R_},store:function(){return zn},storeConfig:function(){return Fn},transformStyles:function(){return lu},useBlockDisplayInformation:function(){return Rd},useBlockEditContext:function(){return Gn},useBlockProps:function(){return Na},useCachedTruthy:function(){return vg},useInnerBlocksProps:function(){return sm},useSetting:function(){return po},validateThemeColors:function(){return E_},validateThemeGradients:function(){return C_},withColorContext:function(){return Vv},withColors:function(){return Eg},withFontSizes:function(){return Sg}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return xt},__experimentalGetAllowedBlocks:function(){return at},__experimentalGetAllowedPatterns:function(){return pt},__experimentalGetBlockListSettingsForBlocks:function(){return bt},__experimentalGetDirectInsertBlock:function(){return ct},__experimentalGetLastBlockAttributeChanges:function(){return yt},__experimentalGetParsedPattern:function(){return ut},__experimentalGetPatternTransformItems:function(){return ft},__experimentalGetPatternsByBlockTypes:function(){return mt},__experimentalGetReusableBlockTitle:function(){return kt},__unstableGetBlockWithoutInnerBlocks:function(){return W},__unstableGetClientIdWithClientIdsTree:function(){return j},__unstableGetClientIdsTree:function(){return K},__unstableIsLastBlockChangeIgnored:function(){return _t},areInnerBlocksControlled:function(){return It},canInsertBlockType:function(){return qe},canInsertBlocks:function(){return Ye},canMoveBlock:function(){return Qe},canMoveBlocks:function(){return Je},canRemoveBlock:function(){return Ze},canRemoveBlocks:function(){return Xe},didAutomaticChange:function(){return wt},getAdjacentBlockClientId:function(){return pe},getBlock:function(){return G},getBlockAttributes:function(){return U},getBlockCount:function(){return Q},getBlockHierarchyRootClientId:function(){return ue},getBlockIndex:function(){return Ie},getBlockInsertionPoint:function(){return He},getBlockListSettings:function(){return ht},getBlockMode:function(){return Le},getBlockName:function(){return V},getBlockOrder:function(){return Be},getBlockParents:function(){return ae},getBlockParentsByBlockName:function(){return ce},getBlockRootClientId:function(){return se},getBlockSelectionEnd:function(){return ne},getBlockSelectionStart:function(){return te},getBlockTransformItems:function(){return it},getBlocks:function(){return $},getBlocksByClientId:function(){return X},getClientIdsOfDescendants:function(){return q},getClientIdsWithDescendants:function(){return Y},getDraggedBlockClientIds:function(){return Oe},getFirstMultiSelectedBlockClientId:function(){return ke},getGlobalBlockCount:function(){return Z},getInserterItems:function(){return lt},getLastMultiSelectedBlockClientId:function(){return _e},getLowestCommonAncestorWithSelectedBlock:function(){return de},getMultiSelectedBlockClientIds:function(){return ve},getMultiSelectedBlocks:function(){return be},getMultiSelectedBlocksEndClientId:function(){return we},getMultiSelectedBlocksStartClientId:function(){return Se},getNextBlockClientId:function(){return fe},getPreviousBlockClientId:function(){return me},getSelectedBlock:function(){return ie},getSelectedBlockClientId:function(){return le},getSelectedBlockClientIds:function(){return ge},getSelectedBlockCount:function(){return oe},getSelectedBlocksInitialCaretPosition:function(){return he},getSelectionEnd:function(){return ee},getSelectionStart:function(){return J},getSettings:function(){return gt},getTemplate:function(){return We},getTemplateLock:function(){return $e},hasBlockMovingClientId:function(){return St},hasInserterItems:function(){return st},hasMultiSelection:function(){return Pe},hasSelectedBlock:function(){return re},hasSelectedInnerBlock:function(){return Te},isAncestorBeingDragged:function(){return ze},isAncestorMultiSelected:function(){return Ce},isBlockBeingDragged:function(){return Fe},isBlockHighlighted:function(){return Bt},isBlockInsertionPointVisible:function(){return Ue},isBlockMultiSelected:function(){return Ee},isBlockSelected:function(){return xe},isBlockValid:function(){return H},isBlockWithinSelection:function(){return Ne},isCaretWithinFormattedText:function(){return Ve},isDraggingBlocks:function(){return De},isFirstMultiSelectedBlock:function(){return ye},isLastBlockChangePersistent:function(){return vt},isMultiSelecting:function(){return Me},isNavigationMode:function(){return Ct},isSelectionEnabled:function(){return Re},isTyping:function(){return Ae},isValidTemplate:function(){return Ge},wasBlockJustInserted:function(){return Tt}});var t={};n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return xn},__unstableMarkLastChangeAsPersistent:function(){return Bn},__unstableMarkNextChangeAsNotPersistent:function(){return In},__unstableSaveReusableBlock:function(){return wn},clearSelectedBlock:function(){return jt},duplicateBlocks:function(){return Pn},enterFormattedText:function(){return bn},exitFormattedText:function(){return kn},flashBlock:function(){return An},hideInsertionPoint:function(){return ln},insertAfterBlock:function(){return Rn},insertBeforeBlock:function(){return Mn},insertBlock:function(){return nn},insertBlocks:function(){return on},insertDefaultBlock:function(){return En},mergeBlocks:function(){return cn},moveBlockToPosition:function(){return tn},moveBlocksDown:function(){return Qt},moveBlocksToPosition:function(){return en},moveBlocksUp:function(){return Jt},multiSelect:function(){return $t},receiveBlocks:function(){return Ot},removeBlock:function(){return dn},removeBlocks:function(){return un},replaceBlock:function(){return Zt},replaceBlocks:function(){return Yt},replaceInnerBlocks:function(){return pn},resetBlocks:function(){return Lt},resetSelection:function(){return Dt},selectBlock:function(){return Vt},selectNextBlock:function(){return Ut},selectPreviousBlock:function(){return Ht},selectionChange:function(){return yn},setBlockMovingClientId:function(){return Nn},setHasControlledInnerBlocks:function(){return Dn},setNavigationMode:function(){return Tn},setTemplateValidity:function(){return sn},showInsertionPoint:function(){return rn},startDraggingBlocks:function(){return gn},startMultiSelect:function(){return Gt},startTyping:function(){return fn},stopDraggingBlocks:function(){return vn},stopMultiSelect:function(){return Wt},stopTyping:function(){return hn},synchronizeTemplate:function(){return an},toggleBlockHighlight:function(){return Ln},toggleBlockMode:function(){return mn},toggleSelection:function(){return Kt},updateBlock:function(){return zt},updateBlockAttributes:function(){return Ft},updateBlockListSettings:function(){return Cn},updateSettings:function(){return Sn},validateBlocksToTemplate:function(){return At}});var r=window.wp.blocks,l=window.wp.hooks;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}(0,l.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,r.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var s=window.wp.element,a=n(4184),c=n.n(a),u=window.lodash,d=window.wp.compose,p=window.wp.components,m=window.wp.data,f={default:(0,p.createSlotFill)("BlockControls"),block:(0,p.createSlotFill)("BlockControlsBlock"),inline:(0,p.createSlotFill)("BlockFormatControls"),other:(0,p.createSlotFill)("BlockControlsOther"),parent:(0,p.createSlotFill)("BlockControlsParent")},h=window.wp.i18n;const g={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],__unstableGalleryWithImageBlocks:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function k(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,_(r,o))})),n}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function C(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function S(e){return E(e,(e=>e.attributes))}function w(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function B(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function I(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const x=(0,u.flow)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=B(o,n.blocks);o.tree=I(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=I(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=I(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(o,n.blocks);o.tree=I(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=I(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=I(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),o.tree=I(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=I(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=I(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:C(n.blocks),attributes:S(n.blocks),order:_(n.blocks),parents:y(n.blocks),controlledInnerBlocks:{}},o=B(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!w(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=_(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=_(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:k(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=e[o];if(!l.length||r===(0,u.first)(l))return e;const i=l.indexOf(r);return{...e,[o]:k(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=(0,u.last)(n),i=e[o];if(!i.length||l===(0,u.last)(i))return e;const s=i.indexOf(r);return{...e,[o]:k(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=_(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...y(t.blocks)};case"INSERT_BLOCKS":return{...e,...y(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var N,P,M=(0,m.combineReducers)({blocks:x,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;switch(o.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.startOffset},selectionEnd:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=o;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=o;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,c=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!c)return n;if(!o.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!o.blocks.some((e=>e.clientId===c)))return{...n,selectionEnd:n.selectionStart}}return{selectionStart:T(n.selectionStart,o),selectionEnd:T(n.selectionEnd,o)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,m.select)(r.store).getActiveBlockVariation(l,o);let s=null!=i&&i.name?`${l}/${i.name}`:l;const a={name:s};return"core/block"===l&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}});function R(e){return[e]}function L(){var e={clear:function(){e.head=null}};return e}function A(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function D(e,t){var n,o;function r(){n=P?new WeakMap:L()}function l(){var n,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(s=t.apply(null,i),(n=o(s)).isUniqueByDependants||(n.lastDependants&&!A(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(A(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=R),o=P?function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has(N)||((l=L()).isUniqueByDependants=a,s.set(N,l)),s.get(N)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}N={},P="undefined"!=typeof WeakMap;var O=window.wp.primitives,F=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const z=[];function V(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:r}=n;return r?`core/social-link-${r}`:o}return n?n.name:null}function H(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function U(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function G(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const W=D(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:U(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function $(e,t){var n;const o=t&&It(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||z}const j=D(((e,t)=>({clientId:t,innerBlocks:K(e,t)})),(e=>[e.blocks.order])),K=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Be(e,t),(t=>j(e,t)))}),(e=>[e.blocks.order])),q=(e,t)=>(0,u.flatMap)(t,(t=>{const n=Be(e,t);return[...n,...q(e,n)]})),Y=D((e=>{const t=Be(e);return[...t,...q(e,t)]}),(e=>[e.blocks.order])),Z=D(((e,t)=>{const n=Y(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),X=D(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>G(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function Q(e,t){return Be(e,t).length}function J(e){return e.selection.selectionStart}function ee(e){return e.selection.selectionEnd}function te(e){return e.selection.selectionStart.clientId}function ne(e){return e.selection.selectionEnd.clientId}function oe(e){return ve(e).length||(e.selection.selectionStart.clientId?1:0)}function re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function le(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ie(e){const t=le(e);return t?G(e,t):null}function se(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ae=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),ce=D((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ae(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:V(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ue(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function de(e,t){const n=le(e),o=[...ae(e,t),t],r=[...ae(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function pe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=le(e)),void 0===t&&(t=n<0?ke(e):_e(e)),!t)return null;const o=se(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),s=i+1*n;return s<0||s===l.length?null:l[s]}function me(e,t){return pe(e,t,-1)}function fe(e,t){return pe(e,t,1)}function he(e){return e.initialPosition}const ge=D((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return z;if(t.clientId===n.clientId)return[t.clientId];const o=se(e,t.clientId);if(null===o)return z;const r=Be(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?z:ge(e)}const be=D((e=>{const t=ve(e);return t.length?t.map((t=>G(e,t))):z}),(e=>[...ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function ke(e){return(0,u.first)(ve(e))||null}function _e(e){return(0,u.last)(ve(e))||null}function ye(e,t){return ke(e)===t}function Ee(e,t){return-1!==ve(e).indexOf(t)}const Ce=D(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=se(e,n),o=Ee(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Se(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function we(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Be(e,t){return e.blocks.order[t||""]||z}function Ie(e,t,n){return Be(e,n).indexOf(t)}function xe(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Te(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Be(e,t),(t=>xe(e,t)||Ee(e,t)||n&&Te(e,t,n)))}function Ne(e,t){if(!t)return!1;const n=ve(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Me(e){return e.isMultiSelecting}function Re(e){return e.isSelectionEnabled}function Le(e,t){return e.blocksMode[t]||"visual"}function Ae(e){return e.isTyping}function De(e){return!!e.draggedBlocks.length}function Oe(e){return e.draggedBlocks}function Fe(e,t){return e.draggedBlocks.includes(t)}function ze(e,t){if(!De(e))return!1;const n=ae(e,t);return(0,u.some)(n,(t=>Fe(e,t)))}function Ve(e){return e.isCaretWithinFormattedText}function He(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=se(e,l)||void 0,n=Ie(e,r.clientId,t)+1):n=Be(e).length,{rootClientId:t,index:n}}function Ue(e){return null!==e.insertionPoint}function Ge(e){return e.template.isValid}function We(e){return e.settings.template}function $e(e,t){if(!t)return e.settings.templateLock;const n=ht(e,t);return n?n.templateLock:null}const je=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},Ke=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=gt(e),s=je(i,t,!0);if(!s)return!1;const a=!!$e(e,o);if(a)return!1;const c=ht(e,o);if(o&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,d=je(u,t),p=n.parent,m=V(e,o),f=je(p,m),h=null===d&&null===f||!0===d||!0===f;return h?(0,l.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,o,{getBlock:G.bind(null,e),getBlockParentsByBlockName:ce.bind(null,e)}):h},qe=D(Ke,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Ye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>qe(e,V(e,t),n)))}function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=U(e,t);if(null===o)return!0;const{lock:r}=o,l=!!$e(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function Xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Ze(e,t,n)))}function Qe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=U(e,t);if(null===o)return;const{lock:r}=o,l="all"===$e(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function Je(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Qe(e,t,n)))}function et(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const tt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&Ke(e,t.name,n),nt=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=et(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:ot(r,l)}},ot=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},rt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(X(e,Y(e)),{name:t.name}));const{time:i,count:s=0}=et(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:ot(i,s)};if("transform"===n)return a;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},lt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=rt(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=F;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:a=0}=et(e,l)||{},c=ot(i,a);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>tt(e,n,t))).map(n),a=Ke(e,"core/block",t)?Et(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=nt(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Et(e),(0,r.getBlockTypes)()])),it=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=rt(e,{buildScope:"transform"}),l=(0,r.getBlockTypes)().filter((t=>tt(e,t,n))).map(o),i=(0,u.mapKeys)(l,(e=>{let{name:t}=e;return t})),s=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]),a=(0,u.orderBy)(s,(e=>i[e.name].frecency),"desc");return a}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),st=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>tt(e,n,t)));if(n)return!0;const o=Ke(e,"core/block",t)&&Et(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Et(e),(0,r.getBlockTypes)()])),at=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>tt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),ct=D((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(G(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),ut=D(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),dt=D((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=gt(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return ut(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!je(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),pt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=dt(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return qe(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),mt=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return z;const o=pt(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...pt.getDependants(e,t)])),ft=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return z;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||It(e,n)})))return z;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return mt(e,o,n)}),((e,t)=>[...mt.getDependants(e,t)]));function ht(e,t){return e.blockListSettings[t]}function gt(e){return e.settings}function vt(e){return e.blocks.isPersistentChange}const bt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),kt=D(((e,t)=>{var n;const o=(0,u.find)(Et(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Et(e)]));function _t(e){return e.blocks.isIgnoredChange}function yt(e){return e.lastBlockAttributesChange}function Et(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:z}function Ct(e){return e.isNavigationMode}function St(e){return e.hasBlockMovingClientId}function wt(e){return!!e.automaticChangeStatus}function Bt(e,t){return e.highlightedBlock===t}function It(e,t){return!!e.blocks.controlledInnerBlocks[t]}const xt=D(((e,t)=>{if(!t.length)return null;const n=le(e);if(t.includes(V(e,n)))return n;const o=ve(e),r=ce(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Tt(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var Nt=window.wp.a11y,Pt=window.wp.richText,Mt=window.wp.deprecated,Rt=n.n(Mt);const Lt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(At(e))},At=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),s=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function Dt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ot(e){return Rt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function zt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Vt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Ht=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},Ut=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function Gt(){return{type:"START_MULTI_SELECT"}}function Wt(){return{type:"STOP_MULTI_SELECT"}}const $t=(e,t)=>n=>{let{select:o,dispatch:r}=n;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t});const l=o.getSelectedBlockCount();(0,Nt.speak)((0,h.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
- (0,h._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function jt(){return{type:"CLEAR_SELECTED_BLOCK"}}function Kt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function qt(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const Yt=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:s}=l;e=(0,u.castArray)(e),t=qt((0,u.castArray)(t),i.getSettings());const a=i.getBlockRootClientId((0,u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function Zt(e,t){return Yt(e,t)}const Xt=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},Qt=Xt("MOVE_BLOCKS_DOWN"),Jt=Xt("MOVE_BLOCKS_UP"),en=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return en([e],t,n,o)}function nn(e,t,n,o,r){return on([e],t,n,o,0,r)}const on=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;(0,u.isObject)(r)&&(l=r,r=0,Rt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=qt((0,u.castArray)(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function ln(){return{type:"HIDE_INSERTION_POINT"}}function sn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const an=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},cn=(e,t)=>n=>{let{select:o,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[s,a]=i,c=o.getBlock(s),d=(0,r.getBlockType)(c.name);if(d&&!d.merge)return void l.selectBlock(c.clientId);const p=o.getBlock(a),m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:h,offset:g}=o.getSelectionStart(),v=(f===s?d:m).attributes[h],b=(f===s||f===a)&&void 0!==h&&void 0!==g&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const k=(0,r.cloneBlock)(c),_=(0,r.cloneBlock)(p);if(b){const e=f===s?k:_,t=e.attributes[h],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=v,l=(0,Pt.insert)((0,Pt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),"†",g,g);e.attributes[h]=(0,Pt.toHTMLString)({value:l,multilineTag:n,preserveWhiteSpace:r})}const y=c.name===p.name?[_]:(0,r.switchToBlockType)(_,c.name);if(!y||!y.length)return;const E=d.merge(k.attributes,y[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=d.attributes[e],i=(0,Pt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=i.text.indexOf("†"),a=(0,Pt.remove)(i,s,s+1),p=(0,Pt.toHTMLString)({value:a,multilineTag:n,preserveWhiteSpace:r});E[e]=p,l.selectionChange(c.clientId,e,s,s)}l.replaceBlocks([c.clientId,p.clientId],[{...c,attributes:{...c.attributes,...E}},...y.slice(1)],0)},un=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function dn(e,t){return un([e],t)}function pn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function mn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function fn(){return{type:"START_TYPING"}}function hn(){return{type:"STOP_TYPING"}}function gn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function vn(){return{type:"STOP_DRAGGING_BLOCKS"}}function bn(){return{type:"ENTER_FORMATTED_TEXT"}}function kn(){return{type:"EXIT_FORMATTED_TEXT"}}function yn(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function En(e,t,n){const o=(0,r.getDefaultBlockName)();if(o)return nn((0,r.createBlock)(o,e),n,t)}function Cn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Sn(e){return{type:"UPDATE_SETTINGS",settings:e}}function wn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Bn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function In(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const xn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Tn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Nt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Nt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Nn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Nt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Pn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if((0,u.some)(i,(e=>!e)))return;if(i.map((e=>e.name)).some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),a=o.getBlockIndex((0,u.last)((0,u.castArray)(e)),s),c=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(c,a+1,s,t),c.length>1&&t&&l.multiSelect((0,u.first)(c).clientId,(0,u.last)(c).clientId),c.map((e=>e.clientId))}},Mn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l)},Rn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e,r);return o.insertDefaultBlock({},r,l+1)};function Ln(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const An=e=>async t=>{let{dispatch:n}=t;n(Ln(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Ln(e,!1))};function Dn(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const On="core/block-editor",Fn={reducer:M,selectors:e,actions:t,__experimentalUseThunks:!0},zn=(0,m.createReduxStore)(On,{...Fn,persist:["preferences"]});(0,m.registerStore)(On,{...Fn,persist:["preferences"]});const Vn={name:"",isSelected:!1},Hn=(0,s.createContext)(Vn),{Provider:Un}=Hn;function Gn(){return(0,s.useContext)(Hn)}function Wn(){const{isSelected:e,clientId:t,name:n}=Gn();return(0,m.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(zn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function $n(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=Wn(),{clientId:o}=Gn(),l=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(zn),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,s.createElement)(p.ToolbarGroup,{controls:n}),o)}))):null}function jn(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(p.__experimentalToolbarContext),r=f[t].Slot,l=(0,p.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const Kn=$n;Kn.Slot=jn;const qn=e=>(0,s.createElement)($n,i({group:"inline"},e));qn.Slot=e=>(0,s.createElement)(jn,i({group:"inline"},e));var Yn=Kn,Zn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Xn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Qn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),Jn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),eo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),to=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),no=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),oo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),ro=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),lo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),io=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),so=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function ao(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const co={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},uo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function po(e){const{name:t}=Gn();return(0,m.useSelect)((n=>{var o;const l=n(zn).getSettings(),i=(e=>uo[e]||e)(e),s=`__experimentalFeatures.${i}`,a=`__experimentalFeatures.blocks.${t}.${i}`,c=null!==(o=(0,u.get)(l,a))&&void 0!==o?o:(0,u.get)(l,s);var d,p;if(void 0!==c)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(p=c.custom)&&void 0!==p?p:c.theme)&&void 0!==d?d:c.default:c;const m=co[i]?co[i](l):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,e])}const mo={left:no,center:oo,right:ro,"space-between":lo};var fo=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:a}=e;const c=e=>{o(e===r?void 0:e)},u=r?mo[r]:mo.left,d=[{name:"left",icon:no,title:(0,h.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:oo,title:(0,h.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:ro,title:(0,h.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:lo,title:(0,h.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],m=a?p.ToolbarGroup:p.ToolbarDropdownMenu,f=a?{isCollapsed:n}:{};return(0,s.createElement)(m,i({icon:u,popoverProps:l,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};function ho(e){return(0,s.createElement)(fo,i({},e,{isToolbar:!1}))}function go(e){return(0,s.createElement)(fo,i({},e,{isToolbar:!0}))}const vo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},bo={left:"flex-start",right:"flex-end",center:"center"},ko=["wrap","nowrap"];var _o={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n}=e;const{allowOrientation:o=!0}=t;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Flex,null,(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(yo,{layout:t,onChange:n})),(0,s.createElement)(p.FlexItem,null,o&&(0,s.createElement)(Co,{layout:t,onChange:n}))),(0,s.createElement)(Eo,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;return null!=o&&o.allowSwitching?null:(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(yo,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){let{selector:t,layout:n}=e;const{orientation:o="horizontal",setCascadingProperties:r=!1}=n,l=null!==po("spacing.blockGap"),i=vo[n.justifyContent]||vo.left,a=ko.includes(n.flexWrap)?n.flexWrap:"wrap";let c=`\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: ${i};\n\t\t`;r&&(c+=`\n\t\t\t--layout-justification-setting: ${i};\n\t\t\t--layout-direction: row;\n\t\t\t--layout-wrap: ${a};\n\t\t\t--layout-justify: ${i};\n\t\t\t--layout-align: center;\n\t\t\t`);const u=bo[n.justifyContent]||bo.left;let d=`\n\t\tflex-direction: column;\n\t\talign-items: ${u};\n\t\t`;return r&&(d+=`\n\t\t\t--layout-justification-setting: ${u};\n\t\t\t--layout-direction: column;\n\t\t\t--layout-justify: initial;\n\t\t\t--layout-align: ${u};\n\t\t\t`),(0,s.createElement)("style",null,`\n\t\t\t\t${ao(t)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${l?"var( --wp--style--block-gap, 0.5em )":"0.5em"};\n\t\t\t\t\tflex-wrap: ${a};\n\t\t\t\t\t${"horizontal"===o?c:d}\n\t\t\t\t}\n\n\t\t\t\t${ao(t,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function yo(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l&&a.push("space-between"),o)return(0,s.createElement)(ho,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:no,label:(0,h.__)("Justify items left")},{value:"center",icon:oo,label:(0,h.__)("Justify items center")},{value:"right",icon:ro,label:(0,h.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:lo,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(p.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function Eo(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function Co(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(p.Button,{label:"horizontal",icon:io,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(p.Button,{label:"vertical",icon:so,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var So=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})};const wo=[{name:"default",label:(0,h.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r}=t,l=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:l}),(0,s.createElement)(So,{icon:Qn})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:l}),(0,s.createElement)(So,{icon:eo}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(p.Button,{variant:"secondary",isSmall:!0,disabled:!r&&!o,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,h.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){let{selector:t,layout:n={}}=e;const{contentSize:o,wideSize:r}=n,l=null!==po("spacing.blockGap");let i=o||r?`\n\t\t\t\t\t${ao(t,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=o?o:r};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t${ao(t,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=r?r:o};\n\t\t\t\t\t}\n\n\t\t\t\t\t${ao(t,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return i+=`\n\t\t\t${ao(t,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\n\t\t\t${ao(t,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,l&&(i+=`\n\t\t\t\t${ao(t,"> *")} {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t\t${ao(t,"> * + *")} {\n\t\t\t\t\tmargin-top: var( --wp--style--block-gap );\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,i)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(
4
  // translators: %s: container size (i.e. 600px etc)
5
  o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),r.test(n)&&(
6
  // translators: %s: container size (i.e. 600px etc)
7
- o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},_o];function Bo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return wo.find((t=>t.name===e))}const Io={type:"default"},xo=(0,s.createContext)(Io),To=xo.Provider;function No(){return(0,s.useContext)(xo)}function Po(e){let{layout:t={},...n}=e;const o=Bo(t.type);return o?(0,s.createElement)(o.save,i({layout:t},n)):null}const Mo=["none","left","center","right","wide","full"],Ro=["wide","full"];function Lo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mo;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=No(),r=Bo(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name)return[];const{alignments:i=Mo}=o,s=e.filter((e=>(o.alignments||t||!Ro.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const Ao={none:{icon:Zn,title:(0,h.__)("None")},left:{icon:Xn,title:(0,h.__)("Align left")},center:{icon:Qn,title:(0,h.__)("Align center")},right:{icon:Jn,title:(0,h.__)("Align right")},wide:{icon:eo,title:(0,h.__)("Wide width")},full:{icon:to,title:(0,h.__)("Full width")}},Do={isAlternate:!0};var Oo=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const a=Lo(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Ao[t],m=Ao.none,f=r?p.ToolbarGroup:p.ToolbarDropdownMenu,g={popoverProps:Do,icon:d?d.icon:m.icon,label:(0,h.__)("Align"),toggleProps:{describedBy:(0,h.__)("Change alignment")}},v=r||s.Platform.isNative?{isCollapsed:r?l:void 0,controls:a.map((e=>{let{name:n}=e;return{...Ao[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Ao[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(p.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,s.createElement)(f,i({},g,v))};function Fo(e){return(0,s.createElement)(Oo,i({},e,{isToolbar:!1}))}function zo(e){return(0,s.createElement)(Oo,i({},e,{isToolbar:!0}))}const Vo=["left","center","right","wide","full"],Ho=["wide","full"];function Uo(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Vo.filter((t=>e.includes(t))):!0===e?[...Vo]:[],!o||!0===e&&!n?(0,u.without)(t,...Ho):t}const Go=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Lo(Uo((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,s.createElement)(s.Fragment,null,!!o.length&&(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Fo,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),(0,s.createElement)(e,t))}),"withToolbarControls"),Wo=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=Lo(Uo((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Vo,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Wo),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Go),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Uo((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e})),window.wp.warning;var $o={default:(0,p.createSlotFill)("InspectorControls"),advanced:(0,p.createSlotFill)("InspectorAdvancedControls"),border:(0,p.createSlotFill)("InspectorControlsBorder"),dimensions:(0,p.createSlotFill)("InspectorControlsDimensions"),typography:(0,p.createSlotFill)("InspectorControlsTypography")};function jo(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=Wn(),l=null===(t=$o[n])||void 0===t?void 0:t.Fill;return l?r?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const Ko=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,Ko),u.identity);return(0,u.isEmpty)(t)?void 0:t};function qo(e){let{children:t,group:n,label:o}=e;const{clientId:r,attributes:l}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:n}=e(zn),o=n();return{clientId:o,attributes:t(o)}}),[]),{updateBlockAttributes:i}=(0,m.useDispatch)(zn);return(0,s.createElement)(p.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{style:t}=l;let n={style:t};e.forEach((e=>{n={...n,...e(n)}})),n={...n,style:Ko(n.style)},i(r,n)},key:r,panelId:r,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0},t)}function Yo(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(p.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function Zo(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=$o[n])||void 0===t?void 0:t.Slot,a=(0,p.__experimentalUseSlot)(null==l?void 0:l.__unstableName);return l&&a?Boolean(a.fills&&a.fills.length)?o?(0,s.createElement)(qo,{group:n,label:o},(0,s.createElement)(Yo,i({},r,{Slot:l}))):(0,s.createElement)(l,i({},r,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const Xo=jo;Xo.Slot=Zo;const Qo=e=>(0,s.createElement)(jo,i({},e,{__experimentalGroup:"advanced"}));Qo.Slot=e=>(0,s.createElement)(Zo,i({},e,{__experimentalGroup:"advanced"})),Qo.slotName="InspectorAdvancedControls";var Jo=Xo;const er=/[\s#]/g,tr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(p.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(p.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(er,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(Jo,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(Jo,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",tr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const nr=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(Jo,{__experimentalGroup:"advanced"},(0,s.createElement)(p.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",nr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));var or=window.wp.dom;const rr=(0,s.createContext)({});function lr(e){let{value:t,children:n}=e;const o=(0,s.useContext)(rr),r=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)(rr.Provider,{value:r,children:n})}var ir=rr;const sr={};var ar=(0,p.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(ir),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):sr),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function cr(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(Un,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(ar,e))}var ur=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),dr=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||r)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,s.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:ur,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(p.MenuGroup,null,r.map(((e,t)=>(0,s.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},pr=n(7630);function mr(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,or.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(p.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var fr=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const a=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=a,(0,pr.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(mr,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(mr,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))};const hr=e=>(0,r.rawHandler)({HTML:e.originalContent});var gr=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(zn).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(zn);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,hr(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const a=!!(0,r.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),m=(0,s.useCallback)((()=>u(!1)),[]),f=(0,s.useMemo)((()=>[{
8
  // translators: Button to fix block content
9
- title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(dr,{actions:[(0,s.createElement)(p.Button,{key:"recover",onClick:l,variant:"primary"},(0,h.__)("Attempt Block Recovery"))],secondaryActions:f},(0,h.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
10
- (0,h.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,s.createElement)(fr,{block:i,onKeep:t,onConvert:n,convertor:hr,convertButtonText:(0,h.__)("Convert to Blocks")})))}));const vr=(0,s.createElement)(dr,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed."));var br=()=>vr;class kr extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var _r=kr,yr=n(4042),Er=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),l=(0,m.useSelect)((e=>e(zn).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(zn);return(0,s.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,s.createElement)(yr.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const s=(0,r.getBlockAttributes)(e,n,l.attributes),a=n||(0,r.getSaveContent)(e,s),c=!n||(0,r.isValidBlockContent)(e,s,a);i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let Cr=Fr();const Sr=e=>Lr(e,Cr);let wr=Fr();Sr.write=e=>Lr(e,wr);let Br=Fr();Sr.onStart=e=>Lr(e,Br);let Ir=Fr();Sr.onFrame=e=>Lr(e,Ir);let xr=Fr();Sr.onFinish=e=>Lr(e,xr);let Tr=[];Sr.setTimeout=(e,t)=>{let n=Sr.now()+t,o=()=>{let e=Tr.findIndex((e=>e.cancel==o));~e&&Tr.splice(e,1),Vr.count-=~e?1:0},r={time:n,handler:e,cancel:o};return Tr.splice(Nr(n),0,r),Vr.count+=1,Ar(),r};let Nr=e=>~(~Tr.findIndex((t=>t.time>e))||~Tr.length);Sr.cancel=e=>{Cr.delete(e),wr.delete(e)},Sr.sync=e=>{Rr=!0,Sr.batchedUpdates(e),Rr=!1},Sr.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Sr.onStart(n)}return o.handler=e,o.cancel=()=>{Br.delete(n),t=null},o};let Pr="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Sr.use=e=>Pr=e,Sr.now="undefined"!=typeof performance?()=>performance.now():Date.now,Sr.batchedUpdates=e=>e(),Sr.catch=console.error,Sr.frameLoop="always",Sr.advance=()=>{"demand"!==Sr.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Or()};let Mr=-1,Rr=!1;function Lr(e,t){Rr?(t.delete(e),e(0)):(t.add(e),Ar())}function Ar(){Mr<0&&(Mr=0,"demand"!==Sr.frameLoop&&Pr(Dr))}function Dr(){~Mr&&(Pr(Dr),Sr.batchedUpdates(Or))}function Or(){let e=Mr;Mr=Sr.now();let t=Nr(Mr);t&&(zr(Tr.splice(0,t),(e=>e.handler())),Vr.count-=t),Br.flush(),Cr.flush(e?Math.min(64,Mr-e):16.667),Ir.flush(),wr.flush(),xr.flush()}function Fr(){let e=new Set,t=e;return{add(n){Vr.count+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Vr.count-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Vr.count-=t.size,zr(t,(t=>t(n)&&e.add(t))),Vr.count+=e.size,t=e)}}}function zr(e,t){e.forEach((e=>{try{t(e)}catch(e){Sr.catch(e)}}))}const Vr={count:0,clear(){Mr=-1,Tr=[],Br=Fr(),Cr=Fr(),Ir=Fr(),wr=Fr(),xr=Fr(),Vr.count=0}};var Hr=n(9196),Ur=n.n(Hr);function Gr(){}const Wr={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function $r(e,t){if(Wr.arr(e)){if(!Wr.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const jr=(e,t)=>e.forEach(t);function Kr(e,t,n){for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const qr=e=>Wr.und(e)?[]:Wr.arr(e)?e:[e];function Yr(e,t){if(e.size){const n=Array.from(e);e.clear(),jr(n,t)}}const Zr=(e,...t)=>Yr(e,(e=>e(...t)));let Xr,Qr,Jr=null,el=!1,tl=Gr;var nl=Object.freeze({__proto__:null,get createStringInterpolator(){return Xr},get to(){return Qr},get colors(){return Jr},get skipAnimation(){return el},get willAdvance(){return tl},assign:e=>{e.to&&(Qr=e.to),e.now&&(Sr.now=e.now),void 0!==e.colors&&(Jr=e.colors),null!=e.skipAnimation&&(el=e.skipAnimation),e.createStringInterpolator&&(Xr=e.createStringInterpolator),e.requestAnimationFrame&&Sr.use(e.requestAnimationFrame),e.batchedUpdates&&(Sr.batchedUpdates=e.batchedUpdates),e.willAdvance&&(tl=e.willAdvance),e.frameLoop&&(Sr.frameLoop=e.frameLoop)}});const ol=new Set;let rl=[],ll=[],il=0;const sl={get idle(){return!ol.size&&!rl.length},start(e){il>e.priority?(ol.add(e),Sr.onStart(al)):(cl(e),Sr(dl))},advance:dl,sort(e){if(il)Sr.onFrame((()=>sl.sort(e)));else{const t=rl.indexOf(e);~t&&(rl.splice(t,1),ul(e))}},clear(){rl=[],ol.clear()}};function al(){ol.forEach(cl),ol.clear(),Sr(dl)}function cl(e){rl.includes(e)||ul(e)}function ul(e){rl.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(rl),0,e)}function dl(e){const t=ll;for(let n=0;n<rl.length;n++){const o=rl[n];il=o.priority,o.idle||(tl(o),o.advance(e),o.idle||t.push(o))}return il=0,ll=rl,ll.length=0,rl=t,rl.length>0}const pl="[-+]?\\d*\\.?\\d+",ml=pl+"%";function fl(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const hl=new RegExp("rgb"+fl(pl,pl,pl)),gl=new RegExp("rgba"+fl(pl,pl,pl,pl)),vl=new RegExp("hsl"+fl(pl,ml,ml)),bl=new RegExp("hsla"+fl(pl,ml,ml,pl)),kl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,_l=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yl=/^#([0-9a-fA-F]{6})$/,El=/^#([0-9a-fA-F]{8})$/;function Cl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Sl(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Cl(r,o,e+1/3),i=Cl(r,o,e),s=Cl(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function wl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Bl(e){return(parseFloat(e)%360+360)%360/360}function Il(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function xl(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Tl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=yl.exec(e))?parseInt(t[1]+"ff",16)>>>0:Jr&&void 0!==Jr[e]?Jr[e]:(t=hl.exec(e))?(wl(t[1])<<24|wl(t[2])<<16|wl(t[3])<<8|255)>>>0:(t=gl.exec(e))?(wl(t[1])<<24|wl(t[2])<<16|wl(t[3])<<8|Il(t[4]))>>>0:(t=kl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=El.exec(e))?parseInt(t[1],16)>>>0:(t=_l.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=vl.exec(e))?(255|Sl(Bl(t[1]),xl(t[2]),xl(t[3])))>>>0:(t=bl.exec(e))?(Sl(Bl(t[1]),xl(t[2]),xl(t[3]))|Il(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Nl=(e,t,n)=>{if(Wr.fun(e))return e;if(Wr.arr(e))return Nl({range:e,output:t,extrapolate:n});if(Wr.str(e.output[0]))return Xr(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};function Pl(){return(Pl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const Ml=Symbol.for("FluidValue.get"),Rl=Symbol.for("FluidValue.observers"),Ll=e=>Boolean(e&&e[Ml]),Al=e=>e&&e[Ml]?e[Ml]():e,Dl=e=>e[Rl]||null;function Ol(e,t){let n=e[Rl];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Fl{constructor(e){if(this[Ml]=void 0,this[Rl]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");zl(this,e)}}const zl=(e,t)=>Ul(e,Ml,t);function Vl(e,t){if(e[Ml]){let n=e[Rl];n||Ul(e,Rl,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Hl(e,t){let n=e[Rl];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Rl]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Ul=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Gl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Wl=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;let $l;const jl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Kl=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,ql=e=>{$l||($l=Jr?new RegExp(`(${Object.keys(Jr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Al(e).replace(Wl,Tl).replace($l,Tl))),n=t.map((e=>e.match(Gl).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Nl(Pl({},e,{output:t}))));return e=>{let n=0;return t[0].replace(Gl,(()=>String(o[n++](e)))).replace(jl,Kl)}},Yl="react-spring: ",Zl=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Yl}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Xl=Zl(console.warn),Ql=Zl(console.warn);function Jl(e){return Wr.str(e)&&("#"==e[0]||/\d/.test(e)||e in(Jr||{}))}const ei=e=>(0,Hr.useEffect)(e,ti),ti=[];function ni(){const e=(0,Hr.useState)()[1],t=(0,Hr.useState)(oi)[0];return ei(t.unmount),()=>{t.current&&e({})}}function oi(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function ri(e){const t=(0,Hr.useRef)();return(0,Hr.useEffect)((()=>{t.current=e})),t.current}const li="undefined"!=typeof window&&window.document&&window.document.createElement?Hr.useLayoutEffect:Hr.useEffect,ii=Symbol.for("Animated:node"),si=e=>e&&e[ii],ai=(e,t)=>{return n=e,o=ii,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ci=e=>e&&e[ii]&&e[ii].getPayload();class ui{constructor(){this.payload=void 0,ai(this,this)}getPayload(){return this.payload||[]}}class di extends ui{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Wr.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new di(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Wr.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Wr.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class pi extends di{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Nl({output:[e,e]})}static create(e){return new pi(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Wr.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Nl({output:[this.getValue(),e]})),this._value=0,super.reset()}}const mi={dependencies:null};class fi extends ui{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Kr(this.source,((n,o)=>{var r;(r=n)&&r[ii]===r?t[o]=n.getValue(e):Ll(n)?t[o]=Al(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&jr(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Kr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){mi.dependencies&&Ll(e)&&mi.dependencies.add(e);const t=ci(e);t&&jr(t,(e=>this.add(e)))}}class hi extends fi{constructor(e){super(e)}static create(e){return new hi(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(gi)),!0)}}function gi(e){return(Jl(e)?pi:di).create(e)}function vi(e){const t=si(e);return t?t.constructor:Wr.arr(e)?hi:Jl(e)?pi:di}function bi(){return(bi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const ki=(e,t)=>{const n=!Wr.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Hr.forwardRef)(((o,r)=>{const l=(0,Hr.useRef)(null),i=n&&(0,Hr.useCallback)((e=>{l.current=function(e,t){return e&&(Wr.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,a]=function(e,t){const n=new Set;return mi.dependencies=n,e.style&&(e=bi({},e,{style:t.createAnimatedStyle(e.style)})),e=new fi(e),mi.dependencies=null,[e,n]}(o,t),c=ni(),u=()=>{const e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new _i(u,a),p=(0,Hr.useRef)();li((()=>{const e=p.current;p.current=d,jr(a,(e=>Vl(e,d))),e&&(jr(e.deps,(t=>Hl(t,e))),Sr.cancel(e.update))})),(0,Hr.useEffect)(u,[]),ei((()=>()=>{const e=p.current;jr(e.deps,(t=>Hl(t,e)))}));const m=t.getComponentProps(s.getValue());return Hr.createElement(e,bi({},m,{ref:i}))}))};class _i{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Sr.write(this.update)}}const yi=Symbol.for("AnimatedComponent"),Ei=e=>Wr.str(e)?e:e&&Wr.str(e.displayName)?e.displayName:Wr.fun(e)&&e.name||null;function Ci(){return(Ci=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Si(e,...t){return Wr.fun(e)?e(...t):e}const wi=(e,t)=>!0===e||!!(t&&e&&(Wr.fun(e)?e(t):qr(e).includes(t))),Bi=(e,t)=>Wr.obj(e)?t&&e[t]:e,Ii=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,xi=e=>e,Ti=(e,t=xi)=>{let n=Ni;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);Wr.und(n)||(o[r]=n)}return o},Ni=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Pi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Mi(e){const t=function(e){const t={};let n=0;if(Kr(e,((e,o)=>{Pi[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Kr(e,((e,o)=>o in t||(n[o]=e))),n}return Ci({},e)}function Ri(e){return e=Al(e),Wr.arr(e)?e.map(Ri):Jl(e)?nl.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Li(e){for(const t in e)return!0;return!1}function Ai(e){return Wr.fun(e)||Wr.arr(e)&&Wr.obj(e[0])}function Di(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Oi(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const Fi=Ci({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class zi{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Fi)}}function Vi(e,t){if(Wr.und(t.decay)){const n=!Wr.und(t.tension)||!Wr.und(t.friction);!n&&Wr.und(t.frequency)&&Wr.und(t.damping)&&Wr.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Hi=[];class Ui{constructor(){this.changed=!1,this.values=Hi,this.toValues=null,this.fromValues=Hi,this.to=void 0,this.from=void 0,this.config=new zi,this.immediate=!1}}function Gi(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{var a;let c,u,d=wi(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)f();else{Wr.und(n.pause)||(r.paused=wi(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||wi(e,t)),c=Si(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-Sr.now()}function m(){c>0?(u=Sr.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(Ci({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const Wi=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Ki(e.get()):t.every((e=>e.noop))?$i(e.get()):ji(e.get(),t.every((e=>e.finished))),$i=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ji=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ki=e=>({value:e,cancelled:!0,finished:!1});function qi(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Ti(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&Ki(o)||r!==n.asyncId&&ji(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new Zi,i=new Xi;return(async()=>{if(nl.skipAnimation)throw Yi(n),i.result=ji(o,!1),d(i),i;m(l);const s=Wr.obj(e)?Ci({},e):Ci({},t,{to:e});s.parentId=r,Kr(c,((e,t)=>{Wr.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(nl.skipAnimation)return Yi(n),ji(o,!1);try{let t;t=Wr.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=ji(o.get(),!0,!1)}catch(e){if(e instanceof Zi)h=e.result;else{if(!(e instanceof Xi))throw e;h=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return Wr.fun(i)&&Sr.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function Yi(e,t){Yr(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Zi extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Xi extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Qi=e=>e instanceof es;let Ji=1;class es extends Fl{constructor(...e){super(...e),this.id=Ji++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=si(this);return e&&e.getValue()}to(...e){return nl.to(this,e)}interpolate(...e){return Xl(`${Yl}The "interpolate" function is deprecated in v9 (use "to" instead)`),nl.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ol(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||sl.sort(this),Ol(this,{type:"priority",parent:this,priority:e})}}const ts=Symbol.for("SpringPhase"),ns=e=>(1&e[ts])>0,os=e=>(2&e[ts])>0,rs=e=>(4&e[ts])>0,ls=(e,t)=>t?e[ts]|=3:e[ts]&=-3,is=(e,t)=>t?e[ts]|=4:e[ts]&=-5;class ss extends es{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ui,this.queue=void 0,this.defaultProps={},this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Wr.und(e)||!Wr.und(t)){const n=Wr.obj(e)?Ci({},e):Ci({},t,{from:e});Wr.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(os(this)||this._state.asyncTo)||rs(this)}get goal(){return Al(this.animation.to)}get velocity(){const e=si(this);return e instanceof di?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return ns(this)}get isAnimating(){return os(this)}get isPaused(){return rs(this)}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ci(o.to);!i&&Ll(o.to)&&(l=qr(Al(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==pi?1:i?i[a].lastPosition:l[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],l=null!=s.v0?s.v0:s.v0=Wr.arr(r.velocity)?r.velocity[a]:r.velocity;let i;if(Wr.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<.1,i=l*o}else{i=null==s.lastVelocity?l:s.lastVelocity;const t=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=r.restVelocity||t/10,a=r.clamp?0:r.bounce,p=!Wr.und(a),m=n==c?s.v0>0:n<c;let f,h=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(f=Math.abs(i)>o,f||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==m,h&&(i=-i*a,d=c)),i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*g,d+=i*g}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));const s=si(this),a=s.getValue();if(t){const e=Al(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Sr.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(os(this)){const{to:e,config:t}=this.animation;Sr.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Wr.und(e)?(n=this.queue||[],this.queue=[]):n=[Wr.obj(e)?e:Ci({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Wi(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Yi(this._state,e&&this._lastCallId),Sr.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Wr.obj(n)?n[t]:n,(null==n||Ai(n))&&(n=void 0),o=Wr.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return ns(this)||(e.reverse&&([n,o]=[o,n]),o=Al(o),Wr.und(o)?si(this)||this._set(n):this._set(o)),r}_update(e,t){let n=Ci({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Ti(n,((e,t)=>/^on/.test(t)?Bi(e,o):e))),fs(this,n,"onProps"),hs(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Gi(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{rs(this)||(is(this,!0),Zr(i.pauseQueue),hs(this,"onPause",ji(this,as(this,this.animation.to)),this))},resume:()=>{rs(this)&&(is(this,!1),os(this)&&this._resume(),Zr(i.resumeQueue),hs(this,"onResume",ji(this,as(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=cs(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ki(this));const o=!Wr.und(e.to),r=!Wr.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(Ki(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!r||o||t.default&&!Wr.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!$r(d,c);p&&(s.from=d),d=Al(d);const m=!$r(u,a);m&&this._focus(u);const f=Ai(t.to),{config:h}=s,{decay:g,velocity:v}=h;(o||r)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Vi(n=Ci({},n),t),t=Ci({},n,t)),Vi(e,t),Object.assign(e,t);for(const t in Fi)null==e[t]&&(e[t]=Fi[t]);let{mass:o,frequency:r,damping:l}=e;Wr.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(h,Si(t.config,l),t.config!==i.config?Si(i.config,l):void 0);let b=si(this);if(!b||Wr.und(u))return n(ji(this,!0));const k=Wr.und(t.reset)?r&&!t.default:!Wr.und(d)&&wi(t.reset,l),_=k?d:this.get(),y=Ri(u),E=Wr.num(y)||Wr.arr(y)||Jl(y),C=!f&&(!E||wi(i.immediate||t.immediate,l));if(m){const e=vi(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Ll(u),B=!1;if(!w){const e=k||!ns(this)&&p;(m||e)&&(B=$r(Ri(_),y),w=!B),($r(s.immediate,C)||C)&&$r(h.decay,g)&&$r(h.velocity,v)||(w=!0)}if(B&&os(this)&&(s.changed&&!k?w=!0:w||this._stop(a)),!f&&((w||Ll(a))&&(s.values=b.getPayload(),s.toValues=Ll(u)?null:S==pi?[1]:qr(y)),s.immediate!=C&&(s.immediate=C,C||k||this._set(a)),w)){const{onRest:e}=s;jr(ms,(e=>fs(this,t,e)));const o=ji(this,as(this,a));Zr(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&Sr.batchedUpdates((()=>{s.changed=!k,null==e||e(o,this),k?Si(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}k&&this._set(_),f?n(qi(t.to,t,this._state,this)):w?this._start():os(this)&&!m?this._pendingCalls.add(n):n($i(_))}_focus(e){const t=this.animation;e!==t.to&&(Dl(this)&&this._detach(),t.to=e,Dl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ll(t)&&(Vl(t,this),Qi(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ll(e)&&Hl(e,this)}_set(e,t=!0){const n=Al(e);if(!Wr.und(n)){const e=si(this);if(!e||!$r(n,e.getValue())){const o=vi(n);e&&e.constructor==o?e.setValue(n):ai(this,o.create(n)),e&&Sr.batchedUpdates((()=>{this._onChange(n,t)}))}}return si(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,hs(this,"onStart",ji(this,as(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Si(this.animation.onChange,e,this)),Si(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;si(this).reset(Al(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),os(this)||(ls(this,!0),rs(this)||this._resume())}_resume(){nl.skipAnimation?this.finish():sl.start(this)}_stop(e,t){if(os(this)){ls(this,!1);const n=this.animation;jr(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ol(this,{type:"idle",parent:this});const o=t?Ki(this.get()):ji(this.get(),as(this,null!=e?e:n.to));Zr(this._pendingCalls,o),n.changed&&(n.changed=!1,hs(this,"onRest",o,this))}}}function as(e,t){const n=Ri(t);return $r(Ri(e.get()),n)}function cs(e,t=e.loop,n=e.to){let o=Si(t);if(o){const r=!0!==o&&Mi(o),l=(r||e).reverse,i=!r||r.reset;return us(Ci({},e,{loop:t,default:!1,pause:void 0,to:!l||Ai(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function us(e){const{to:t,from:n}=e=Mi(e),o=new Set;return Wr.obj(t)&&ps(t,o),Wr.obj(n)&&ps(n,o),e.keys=o.size?Array.from(o):null,e}function ds(e){const t=us(e);return Wr.und(t.default)&&(t.default=Ti(t)),t}function ps(e,t){Kr(e,((e,n)=>null!=e&&t.add(n)))}const ms=["onStart","onRest","onChange","onPause","onResume"];function fs(e,t,n){e.animation[n]=t[n]!==Ii(t,n)?Bi(t[n],e.key):void 0}function hs(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const gs=["onStart","onChange","onRest"];let vs=1;class bs{constructor(e,t){this.id=vs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(Ci({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Wr.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(us(e)),this}start(e){let{queue:t}=this;return e?t=qr(e).map(us):this.queue=[],this._flush?this._flush(this,t):(ws(this,t),ks(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;jr(qr(t),(t=>n[t].stop(!!e)))}else Yi(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Wr.und(e))this.start({pause:!0});else{const t=this.springs;jr(qr(e),(e=>t[e].pause()))}return this}resume(e){if(Wr.und(e))this.start({pause:!1});else{const t=this.springs;jr(qr(e),(e=>t[e].resume()))}return this}each(e){Kr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Yr(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Yr(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Yr(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Sr.onFrame(this._onFrame)}}function ks(e,t){return Promise.all(t.map((t=>_s(e,t)))).then((t=>Wi(e,t)))}async function _s(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=Wr.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=Wr.arr(r)||Wr.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):jr(gs,(n=>{const o=t[n];if(Wr.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Zr(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===Ii(t,"cancel");(u||m&&d.asyncId)&&p.push(Gi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Gr,resume:Gr,start(t,n){m?(Yi(d,e._lastAsyncId),n(Ki(e))):(t.onRest=s,n(qi(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Wi(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=cs(t,i,r);if(n)return ws(e,[n]),_s(e,n,!0)}return a&&Sr.batchedUpdates((()=>a(f,e,e.item))),f}function ys(e,t){const n=Ci({},e.springs);return t&&jr(qr(t),(e=>{Wr.und(e.keys)&&(e=us(e)),Wr.obj(e.to)||(e=Ci({},e,{to:void 0})),Ss(n,e,(e=>Cs(e)))})),Es(e,n),n}function Es(e,t){Kr(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Vl(t,e))}))}function Cs(e,t){const n=new ss;return n.key=e,t&&Vl(n,t),n}function Ss(e,t,n){t.keys&&jr(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function ws(e,t){jr(t,(t=>{Ss(e.springs,t,(t=>Cs(t,e)))}))}const Bs=["children"],Is=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,Bs);const o=(0,Hr.useContext)(xs),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Hr.useState)((()=>({inputs:t,result:e()}))),o=(0,Hr.useRef)(),r=o.current;let l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,Hr.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=xs;return Hr.createElement(i,{value:n},t)},xs=(Ts=Is,Ns={},Object.assign(Ts,Hr.createContext(Ns)),Ts.Provider._context=Ts,Ts.Consumer._context=Ts,Ts);var Ts,Ns;Is.Provider=xs.Provider,Is.Consumer=xs.Consumer;const Ps=()=>{const e=[],t=function(t){Ql(`${Yl}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return jr(e,((e,r)=>{if(Wr.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return jr(e,(e=>e.pause(...arguments))),this},t.resume=function(){return jr(e,(e=>e.resume(...arguments))),this},t.set=function(t){jr(e,(e=>e.set(t)))},t.start=function(t){const n=[];return jr(e,((e,o)=>{if(Wr.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return jr(e,(e=>e.stop(...arguments))),this},t.update=function(t){return jr(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Wr.fun(e)?e(n,t):e};return t._getProps=n,t};function Ms(e,t,n){const o=Wr.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Hr.useMemo)((()=>o||3==arguments.length?Ps():void 0),[]),l=(0,Hr.useRef)(0),i=ni(),s=(0,Hr.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=ys(e,t);return l.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ks(e,t):new Promise((o=>{Es(e,n),s.queue.push((()=>{o(ks(e,t))})),i()}))}})),[]),a=(0,Hr.useRef)([...s.ctrls]),c=[],u=ri(e)||0;function d(e,n){for(let r=e;r<n;r++){const e=a.current[r]||(a.current[r]=new bs(null,s.flush)),n=o?o(r,e):t[r];n&&(c[r]=ds(n))}}(0,Hr.useMemo)((()=>{jr(a.current.slice(e,u),(e=>{Di(e,r),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,Hr.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>ys(e,c[t]))),m=(0,Hr.useContext)(Is),f=ri(m),h=m!==f&&Li(m);li((()=>{l.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],jr(e,(e=>e()))),jr(a.current,((e,t)=>{null==r||r.add(e),h&&e.start({default:m});const n=c[t];n&&(Oi(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ei((()=>()=>{jr(s.ctrls,(e=>e.stop(!0)))}));const g=p.map((e=>Ci({},e)));return r?[g,r]:g}let Rs;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Rs||(Rs={}));class Ls extends es{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Nl(...t);const n=this._get(),o=vi(n);ai(this,o.create(n))}advance(e){const t=this._get();$r(t,this.get())||(si(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ds(this._active)&&Os(this)}_get(){const e=Wr.arr(this.source)?this.source.map(Al):qr(Al(this.source));return this.calc(...e)}_start(){this.idle&&!Ds(this._active)&&(this.idle=!1,jr(ci(this),(e=>{e.done=!1})),nl.skipAnimation?(Sr.batchedUpdates((()=>this.advance())),Os(this)):sl.start(this))}_attach(){let e=1;jr(qr(this.source),(t=>{Ll(t)&&Vl(t,this),Qi(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){jr(qr(this.source),(e=>{Ll(e)&&Hl(e,this)})),this._active.clear(),Os(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=qr(this.source).reduce(((e,t)=>Math.max(e,(Qi(t)?t.priority:0)+1)),0))}}function As(e){return!1!==e.idle}function Ds(e){return!e.size||Array.from(e).every(As)}function Os(e){e.idle||(e.idle=!0,jr(ci(e),(e=>{e.done=!0})),Ol(e,{type:"idle",parent:e}))}nl.assign({createStringInterpolator:ql,to:(e,t)=>new Ls(e,t)}),sl.advance;var Fs=window.ReactDOM;function zs(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const Vs=["style","children","scrollTop","scrollLeft"],Hs=/^--/;function Us(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Hs.test(e)||Ws.hasOwnProperty(e)&&Ws[e]?(""+t).trim():t+"px"}const Gs={};let Ws={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const $s=["Webkit","Ms","Moz","O"];Ws=Object.keys(Ws).reduce(((e,t)=>($s.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ws);const js=["x","y","z"],Ks=/^(matrix|translate|scale|rotate|skew)/,qs=/^(translate)/,Ys=/^(rotate|skew)/,Zs=(e,t)=>Wr.num(e)&&0!==e?e+t:e,Xs=(e,t)=>Wr.arr(e)?e.every((e=>Xs(e,t))):Wr.num(e)?e===t:parseFloat(e)===t;class Qs extends fi{constructor(e){let{x:t,y:n,z:o}=e,r=zs(e,js);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Zs(e,"px"))).join(",")})`,Xs(e,0)]))),Kr(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(Ks.test(t)){if(delete r[t],Wr.und(e))return;const n=qs.test(t)?"px":Ys.test(t)?"deg":"";l.push(qr(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Zs(r,n)})`,Xs(r,0)]:e=>[`${t}(${e.map((e=>Zs(e,n))).join(",")})`,Xs(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new Js(l,i)),super(r)}}class Js extends Fl{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return jr(this.inputs,((n,o)=>{const r=Al(n[0]),[l,i]=this.transforms[o](Wr.arr(r)?r:n.map(Al));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&jr(this.inputs,(e=>jr(e,(e=>Ll(e)&&Vl(e,this)))))}observerRemoved(e){0==e&&jr(this.inputs,(e=>jr(e,(e=>Ll(e)&&Hl(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ol(this,e)}}const ea=["scrollTop","scrollLeft"];nl.assign({batchedUpdates:Fs.unstable_batchedUpdates,createStringInterpolator:ql,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const ta=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new fi(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=Ei(e)||"Anonymous";return(e=Wr.str(e)?l[e]||(l[e]=ki(e,r)):e[yi]||(e[yi]=ki(e,r))).displayName=`Animated(${t})`,e};return Kr(e,((t,n)=>{Wr.arr(e)&&(n=Ei(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:s}=o,a=zs(o,Vs),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Gs[t]||(Gs[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Us(t,r[t]);Hs.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Qs(e),getComponentProps:e=>zs(e,ea)}).animated,na=e=>e+1,oa=e=>({top:e.offsetTop,left:e.offsetLeft});var ra=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(na,0),[u,p]=(0,s.useReducer)(na,0),[m,f]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>l.current?oa(l.current):null),[r]),g=(0,s.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,or.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);function v(e){let{value:n}=e,{x:o,y:r}=n;o=Math.round(o),r=Math.round(r),o===v.x&&r===v.y||(function(e){let{x:n,y:o}=e;if(!l.current)return;const r=0===n&&0===o;l.current.style.transformOrigin=r?"":"center",l.current.style.transform=r?"":`translate3d(${n}px,${o}px,0)`,l.current.style.zIndex=!t||r?"":"1",g()}({x:o,y:r}),v.x=o,v.y=r)}return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void g();l.current.style.transform="";const e=oa(l.current);c(),f({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[r]),v.x=0,v.y=0,function(e,t){const n=Wr.fun(e),[[o],r]=Ms(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:v}),l};const la=".block-editor-block-list__block",ia=".block-list-appender";function sa(e,t){return t.closest([la,ia].join(","))===e}function aa(e){const t=(0,s.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(zn);if(l(e)&&!o()&&!r())return n()}),[e])}(e);return(0,s.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=or.focus.tabbable.find(t.current).filter((e=>(0,or.isTextField)(e))),r=-1===n,l=(r?u.last:u.first)(o)||t.current;sa(t.current,l)?(0,or.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function ca(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ua(){const e=(0,m.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(zn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",ca),t.addEventListener("mouseover",ca),()=>{t.removeEventListener("mouseout",ca),t.removeEventListener("mouseover",ca),t.classList.remove("is-hovered")}}),[e])}function da(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:p}=t(zn),{__experimentalSpotlightEntityBlocks:m,outlineMode:f}=a(),h=n(e),g=l(e),v=s(e),b=u(e,!0),k=p(m);return c()({"is-selected":g,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":g&&f&&d()})}),[e])}function pa(e){return(0,m.useSelect)((t=>{const n=t(zn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function ma(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(zn),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function fa(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(zn);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(s),l(e))}):void 0}),[e])}function ha(e){const{isBlockSelected:t}=(0,m.useSelect)(zn),{selectBlock:n,selectionChange:o}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):sa(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var ga=window.wp.keycodes;function va(e){const t=(0,m.useSelect)((t=>t(zn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,m.useSelect)(zn),{insertDefaultBlock:r,removeBlock:l}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==ga.ENTER&&s!==ga.BACKSPACE&&s!==ga.DELETE||a!==i||(0,or.isTextField)(a)||(t.preventDefault(),s===ga.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function ba(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(zn),{setNavigationMode:o,selectBlock:r}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}var ka=n(4979),_a=n.n(ka);function ya(e){const t=(0,s.useRef)(),n=(0,m.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(zn);return n(e)||o()===e}),[e]);return(0,s.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=(0,or.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&_a()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}const Ea=(0,s.createContext)();function Ca(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Ea.Provider,{value:n},t)}function Sa(e){const{refs:t,callbacks:n}=(0,s.useContext)(Ea),o=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function wa(e){const{refs:t}=(0,s.useContext)(Ea),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Ba(e){const{callbacks:t}=(0,s.useContext)(Ea),n=wa(e),[o,r]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function Ia(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function xa(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,m.useDispatch)(zn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:c}=(0,m.useSelect)(zn);return(0,d.useRefEffect)((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let m,f;function h(t){let{isSelectionEnd:n}=t;const l=p.getSelection();if(!l.rangeCount||l.isCollapsed)return void Ia(u,!0);const i=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(la);return t?t.id.slice("block-".length):void 0}(l.focusNode);if(e===i){if(r(e),n&&(Ia(u,!0),l.rangeCount)){const{commonAncestorContainer:e}=l.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...s(e),e],n=[...s(i),i],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),f=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v(n){let{buttons:o}=n;1===o&&l()&&i(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),Ia(u,!1))}function b(t){if(l()&&0===t.button)if(t.shiftKey){const n=a(),r=s(n);if(n&&n!==e&&(null==r||!r.includes(e))){const l=[...r,n],i=[...s(e),e],a=Math.min(l.length,i.length)-1,c=l[a],d=i[a];c!==d&&(Ia(u,!1),o(c,d),t.preventDefault())}}else c()&&r(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function Ta(){const e=(0,s.useContext)(um);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Na(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(Pa),{index:a,mode:u,name:p,blockApiVersion:f,blockTitle:g,isPartOfSelection:v,adjustScrolling:b,enableAnimation:k}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:l,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(zn),m=c(n),f=u(n)||d(n),h=i(n),g=t(n),v=(0,r.getBlockType)(h);return{index:o(n,g),mode:l(n),name:h,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:null==v?void 0:v.title,isPartOfSelection:m||f,adjustScrolling:m||p(n),enableAnimation:!s()&&a()<=200}}),[n]),_=(0,h.sprintf)((0,h.__)("Block: %s"),g),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,aa(n),ya(n),Sa(n),ha(n),xa(n),va(n),ba(n),ua(),Ta(),ra({isSelected:v,adjustScrolling:b,enableAnimation:k,triggerAnimationOnChange:a})]),C=Gn();return f<2&&n===C.clientId&&"undefined"!=typeof process&&process.env,{...l,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":p,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,da(n),pa(n),ma(n),fa(n)),style:{...l.style,...e.style}}}Na.save=r.__unstableGetBlockProps;const Pa=(0,s.createContext)();function Ma(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",Na(o,{__unstableIsHtml:n}),t)}const Ra=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(zn),d=a(n),p=r(n),m=s(o),f=c(n,o),h=u(n,o),{name:g,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),La=(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(zn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(zn),r=n(),{clientId:i}=t,s=r.length?r:[i];l(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(zn),s=l(n,r);i(e,s+1,r)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=o(zn);if(e){const e=l(n);e&&s(n,e)}else{const e=r(n);e&&s(e,n)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}}));var Aa=(0,d.compose)(d.pure,Ra,La,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,p.withFilters)("editor.BlockListBlock"))((function(e){let{mode:t,isLocked:n,canRemove:o,clientId:l,isSelected:i,isSelectionEnabled:a,className:d,name:p,isValid:f,attributes:h,wrapperProps:g,setAttributes:v,onReplace:b,onInsertBlocksAfter:k,onMerge:_,toggleSelection:y}=e;const{removeBlock:E}=(0,m.useDispatch)(zn),C=(0,s.useCallback)((()=>E(l)),[l]);let S=(0,s.createElement)(cr,{name:p,isSelected:i,attributes:h,setAttributes:v,insertBlocksAfter:n?void 0:k,onReplace:o?b:void 0,onRemove:o?C:void 0,mergeBlocks:o?_:void 0,clientId:l,isSelectionEnabled:a,toggleSelection:y});const w=(0,r.getBlockType)(p);null!=w&&w.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(g,w.getEditWrapperProps(h)));const B=g&&!!g["data-align"];let I;if(B&&(S=(0,s.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),f)I="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},S),(0,s.createElement)(Ma,{isHtml:!0},(0,s.createElement)(Er,{clientId:l}))):(null==w?void 0:w.apiVersion)>1?S:(0,s.createElement)(Ma,g,S);else{const e=(0,r.getSaveContent)(w,h);I=(0,s.createElement)(Ma,{className:"has-warning"},(0,s.createElement)(gr,{clientId:l}),(0,s.createElement)(s.RawHTML,null,(0,or.safeHTML)(e)))}const x={clientId:l,className:d,wrapperProps:(0,u.omit)(g,["data-align"]),isAligned:B},T=(0,s.useMemo)((()=>x),Object.values(x));return(0,s.createElement)(Pa.Provider,{value:T},(0,s.createElement)(_r,{fallback:(0,s.createElement)(Ma,{className:"has-warning"},(0,s.createElement)(br,null))},I))})),Da=window.wp.htmlEntities,Oa=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Fa=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")];var za=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*Fa.length));return(0,s.createElement)(p.Tip,null,Fa[e])},Va=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Ha=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Va});const l=(0,s.createElement)(p.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)})),Ua=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(Rt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Ha,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))};function Ga(e){let{clientId:t=null,value:n,selection:o,onChange:l=u.noop,onInput:i=u.noop}=e;const a=(0,m.useRegistry)(),{resetBlocks:c,resetSelection:d,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:h}=a.dispatch(zn),{getBlockName:g,getBlocks:v}=a.select(zn),b=(0,s.useRef)({incoming:null,outgoing:[]}),k=(0,s.useRef)(!1),_=(0,s.useRef)(i),y=(0,s.useRef)(l);(0,s.useEffect)((()=>{_.current=i,y.current=l}),[i,l]),(0,s.useEffect)((()=>{b.current.outgoing.includes(n)?(0,u.last)(b.current.outgoing)===n&&(b.current.outgoing=[]):v(t)!==n&&(b.current.outgoing=[],(()=>{if(n)if(h(),t){f(t,!0),h();const e=n.map((e=>(0,r.cloneBlock)(e)));k.current&&(b.current.incoming=e),p(t,e)}else k.current&&(b.current.incoming=n),c(n)})(),o&&d(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=a.select(zn);let i=v(t),s=r(),c=!1;k.current=!0;const u=a.subscribe((()=>{if(null!==t&&null===g(t))return;const a=r(),u=v(t),d=u!==i;if(i=u,d&&(b.current.incoming||l()))return b.current.incoming=null,void(s=a);(d||c&&!d&&a&&!s)&&(s=a,b.current.outgoing.push(i),(s?y.current:_.current)(i,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),c=d}));return()=>u()}),[a,t])}var Wa=(0,d.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,i({registry:o},r));const[l,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,m.createRegistry)({},o);e.registerStore(On,Fn),a(e)}),[o]),l?(0,s.createElement)(m.RegistryProvider,{value:l},(0,s.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,m.useDispatch)(zn);return(0,s.useEffect)((()=>{o(n)}),[n]),Ga(e),(0,s.createElement)(Ca,null,t)}));function $a(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(p.Disabled,null,(0,s.createElement)(pm,null)))}function ja(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,m.useSelect)(zn),{clearSelectedBlock:n}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function Ka(e){return(0,s.createElement)("div",i({ref:ja()},e))}function qa(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function Ya(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(zn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function Za(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,m.useSelect)(Ya,[]),r=wa(o),l=wa((0,u.first)(t)),i=wa((0,u.last)(t));return(0,d.useRefEffect)((s=>{const{ownerDocument:a}=s,{defaultView:c}=a;if(!n||e){if(!o||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=r.current,{startContainer:n,endContainer:o}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(o)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;if(!l.current||!i.current)return;s.focus();const d=c.getSelection(),p=a.createRange(),m=qa(l.current,"start"),f=qa(i.current,"end");var h;h=s,Array.from(h.querySelectorAll(".rich-text:not( .editor-post-title__input )")).forEach((e=>{e.removeAttribute("contenteditable")})),p.setStartBefore(m),p.setEndAfter(f),d.removeAllRanges(),d.addRange(p)}),[n,e,t,o])}function Xa(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Qa(e,t,n,o){let r,l=or.focus.focusable.find(n);return t&&(l=(0,u.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,u.find)(l,(function(e){if(!or.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function Ja(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,m.useSelect)(zn),{multiSelect:c,selectBlock:u}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((d=>{let p;function m(){p=null}function f(l){const i=e(),s=t(),a=n(),d=o(a||i),p=r(a||i),m=l?d:p;m&&(s===m?u(m):c(s||i,m))}function h(e){const t=l(),n=i(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:l,target:i}=t,c=l===ga.UP,u=l===ga.DOWN,m=l===ga.LEFT,g=l===ga.RIGHT,v=c||m,b=m||g,k=c||u,_=b||k,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=k?or.isVerticalEdge:or.isHorizontalEdge,{ownerDocument:S}=d,{defaultView:w}=S;if(a())return void(_&&((y?f:h)(v),t.preventDefault()));if(k?p||(p=(0,or.computeCaretRect)(w)):p=null,t.defaultPrevented)return;if(!_)return;if(!function(e,t,n){if((t===ga.UP||t===ga.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,or.isRTL)(i)?!v:v,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(v&&l||!v&&s)&&function(e,t){const n=Qa(e,t,d);return!n||!function(e,t){return e.closest(la)===t.closest(la)}(e,n)}(i,v)&&C(i,v)&&(f(v),t.preventDefault())}else if(k&&(0,or.isVerticalEdge)(i,v)&&!I){const e=Qa(i,v,d,!0);e&&((0,or.placeCaretAtVerticalEdge)(e,v,p),t.preventDefault())}else if(b&&w.getSelection().isCollapsed&&(0,or.isHorizontalEdge)(i,B)&&!I){const e=Qa(i,B,d);(0,or.placeCaretAtHorizontalEdge)(e,v),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}}),[])}var ec=window.wp.keyboardShortcuts;function tc(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(zn),{multiSelect:o}=(0,m.useDispatch)(zn),r=(0,ec.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,or.isEntirelySelected)(l.target))return;const i=t(),[s]=i,a=n(s);let c=e(a);i.length===c.length&&(c=e(n(a)));const d=(0,u.first)(c),p=(0,u.last)(c);d!==p&&(o(d,p),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function nc(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,m.useSelect)(zn),{setNavigationMode:a}=(0,m.useDispatch)(zn),c=(0,m.useSelect)((e=>e(zn).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function p(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";or.focus.tabbable[n](t.target).focus()}}const f=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:p}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:p}),g=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===ga.ESCAPE&&!r())return e.preventDefault(),void a(!0);if(e.keyCode!==ga.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(Xa(e.target)&&Xa(or.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==ga.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=or.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,g]),h]}(),o=(0,m.useSelect)((e=>e(zn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,Za(),tc(),Ja(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var oc=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,a]=nc();return(0,s.createElement)(s.Fragment,null,r,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)}));const rc="editor-styles-wrapper";function lc(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var ic=(0,s.forwardRef)((function(e,t){let{contentRef:n,children:o,head:r,tabIndex:l=0,assets:a,...u}=e;const[,m]=(0,s.useReducer)((()=>({}))),[f,g]=(0,s.useState)(),[v,b]=(0,s.useState)([]),k=lc(null==a?void 0:a.styles),_=lc(null==a?void 0:a.scripts),y=ja(),[E,C,S]=nc(),w=(0,d.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:o,documentElement:r}=t;return("interactive"===o||"complete"===o)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(t),g(t),y(r),b(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||"wp-embed-responsive"===e))),t.dir=n.dir,r.removeChild(t.head),r.removeChild(t.body),!0)}t()||e.addEventListener("load",(()=>{t()}))}),[]),B=(0,d.useRefEffect)((e=>{_.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{m()}))}),[]),I=(0,d.useMergeRefs)([n,y,C]);return(0,s.useEffect)((()=>{var e;f&&(e=f,Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(o).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${rc}`)||t.includes(".wp-block"))}))&&!e.getElementById(n.id)){console.warn(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n.outerHTML),e.head.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.head.appendChild(o.cloneNode(!0))}})))}),[f]),r=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),k.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})})),r),(0,s.createElement)(s.Fragment,null,l>=0&&E,(0,s.createElement)("iframe",i({},u,{ref:(0,d.useMergeRefs)([t,w]),tabIndex:l,title:(0,h.__)("Editor canvas")}),f&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:B},r),(0,s.createElement)("body",{ref:I,className:c()(rc,...v)},(0,s.createElement)(p.__experimentalStyleProvider,{document:f},o))),f.documentElement)),l>=0&&S)})),sc={grad:.9,turn:360,rad:360/(2*Math.PI)},ac=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},cc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},uc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},dc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},pc=function(e){return{r:uc(e.r,0,255),g:uc(e.g,0,255),b:uc(e.b,0,255),a:uc(e.a)}},mc=function(e){return{r:cc(e.r),g:cc(e.g),b:cc(e.b),a:cc(e.a,3)}},fc=/^#([0-9a-f]{3,8})$/i,hc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},gc=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},vc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},bc=function(e){return{h:dc(e.h),s:uc(e.s,0,100),l:uc(e.l,0,100),a:uc(e.a)}},kc=function(e){return{h:cc(e.h),s:cc(e.s),l:cc(e.l),a:cc(e.a,3)}},_c=function(e){return vc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},yc=function(e){return{h:(t=gc(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Ec=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc={string:[[function(e){var t=fc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?cc(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?cc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Sc.exec(e)||wc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:pc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Ec.exec(e)||Cc.exec(e);if(!t)return null;var n,o,r=bc({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(sc[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return _c(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return ac(t)&&ac(n)&&ac(o)?pc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!ac(t)||!ac(n)||!ac(o))return null;var i=bc({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return _c(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!ac(t)||!ac(n)||!ac(o))return null;var i=function(e){return{h:dc(e.h),s:uc(e.s,0,100),v:uc(e.v,0,100),a:uc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return vc(i)},"hsv"]]},Ic=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},xc=function(e,t){var n=yc(e);return{h:n.h,s:uc(n.s+100*t,0,100),l:n.l,a:n.a}},Tc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Nc=function(e,t){var n=yc(e);return{h:n.h,s:n.s,l:uc(n.l+100*t,0,100),a:n.a}},Pc=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Ic(e.trim(),Bc.string):"object"==typeof e&&null!==e?Ic(e,Bc.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return cc(Tc(this.rgba),2)},e.prototype.isDark=function(){return Tc(this.rgba)<.5},e.prototype.isLight=function(){return Tc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=mc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?hc(cc(255*r)):"","#"+hc(t)+hc(n)+hc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return mc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=mc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return kc(yc(this.rgba))},e.prototype.toHslString=function(){return t=(e=kc(yc(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=gc(this.rgba),{h:cc(e.h),s:cc(e.s),v:cc(e.v),a:cc(e.a,3)};var e},e.prototype.invert=function(){return Mc({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Mc(xc(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Mc(xc(this.rgba,-e))},e.prototype.grayscale=function(){return Mc(xc(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Mc(Nc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Mc(Nc(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Mc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):cc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=yc(this.rgba);return"number"==typeof e?Mc({h:e,s:t.s,l:t.l,a:t.a}):cc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Mc(e).toHex()},e}(),Mc=function(e){return e instanceof Pc?e:new Pc(e)},Rc=[],Lc=function(e){e.forEach((function(e){Rc.indexOf(e)<0&&(e(Pc,Bc),Rc.push(e))}))};function Ac(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Dc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Oc=function(e){return.2126*Dc(e.r)+.7152*Dc(e.g)+.0722*Dc(e.b)};function Fc(e){e.prototype.luminance=function(){return e=Oc(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=Oc(l))>(a=Oc(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var zc=n(3692),Vc=n.n(zc);const Hc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Uc(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;s.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function g(){const e=p(/^([^{]+)/);if(e)return Gc(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Gc(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Hc,""),value:n?Gc(n[0]).replace(Hc,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function k(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let r,i=f();for(;r=k();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Gc(t[1]);if(!c())return a("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Gc(t[1]),media:Gc(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Gc(t[1]);if(!c())return a("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||_()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Gc(t[1]),o=Gc(t[2]);if(!c())return a("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=g()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=l(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return Wc(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Gc(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Wc(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Wc(e,o)})):n&&"object"==typeof n&&Wc(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var $c=n(5717),jc=n.n($c),Kc=qc;function qc(e){this.options=e||{}}qc.prototype.emit=function(e){return e},qc.prototype.visit=function(e){return this[e.type](e)},qc.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Yc=Zc;function Zc(e){Kc.call(this,e)}jc()(Zc,Kc),Zc.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Zc.prototype.comment=function(e){return this.emit("",e.position)},Zc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Zc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Zc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Zc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Zc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Zc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Zc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Zc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Zc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Zc.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Zc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Zc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Zc.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Zc.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Xc=Qc;function Qc(e){e=e||{},Kc.call(this,e),this.indentation=e.indent}jc()(Qc,Kc),Qc.prototype.compile=function(e){return this.stylesheet(e)},Qc.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Qc.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Qc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Qc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Qc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Qc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Qc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Qc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Qc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Qc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Qc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Qc.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Qc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Qc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Qc.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Qc.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Qc.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var Jc=function(e,t){try{const r=Uc(e);return n=Vc().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Yc(o):new Xc(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function eu(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function tu(e,t){return new URL(e,t).toString()}var nu=e=>t=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};eu(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+tu(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const ou=/^(body|html|:root).*$/;var ru=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(ou)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(ru(t)),o&&r.push(nu(o)),r.length?Jc(n,(0,d.compose)(r)):n}))};const iu=".editor-styles-wrapper";function su(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(iu);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Mc(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function au(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>lu(t,iu)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:su(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let cu;Lc([Ac,Fc]);var uu=function(e){let{viewportWidth:t,__experimentalPadding:n}=e;const[o,{width:r}]=(0,d.useResizeObserver)(),[l,{height:i}]=(0,d.useResizeObserver)(),{styles:a,assets:c}=(0,m.useSelect)((e=>{const t=e(zn).getSettings();return{styles:t.styles,assets:t.__unstableResolvedAssets}}),[]);cu=cu||(0,d.pure)(pm);const u=r/t;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,s.createElement)(p.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${u})`,height:i*u}},(0,s.createElement)(ic,{head:(0,s.createElement)(au,{styles:a}),assets:c,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none"}},l,(0,s.createElement)(cu,{renderAppender:!1}))))},du=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l}=e;const i=(0,m.useSelect)((e=>e(zn).getSettings()),[]),a=(0,s.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),c=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)(Wa,{value:c,settings:a},r?(0,s.createElement)($a,{onClick:l}):(0,s.createElement)(uu,{viewportWidth:o,__experimentalPadding:n})):null}));function pu(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,m.useSelect)((e=>e(zn).getSettings()),[]),l=(0,d.__experimentalUseDisabled)(),i=(0,d.useMergeRefs)([n.ref,l]),a=(0,s.useMemo)((()=>({...r,__experimentalBlockPatterns:[]})),[r]),p=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]),f=(0,s.createElement)(Wa,{value:p,settings:a},(0,s.createElement)(fm,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?f:null}}var mu=function(e){var t,n;let{item:o}=e;const{name:l,title:i,icon:a,description:c,initialAttributes:u}=o,d=(0,r.getBlockType)(l),p=(0,r.isReusableBlock)(o);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},p||null!=d&&d.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(du,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,r.getBlockFromExample)(o.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,r.createBlock)(l,u)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!p&&(0,s.createElement)(Ua,{title:i,icon:a,description:c}))},fu=(0,s.createContext)(),hu=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const a=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,r):"function"==typeof r?r(t):(0,s.createElement)(p.Button,t,r)}))})),gu=(0,s.createElement)(O.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,s.createElement)(O.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function vu(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(p.FlexItem,null,n?(0,s.createElement)(Ha,{icon:n}):(0,h.sprintf)(
11
  /* translators: %d: Number of blocks. */
12
- (0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ha,{icon:gu})))))}var bu=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,s.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};function ku(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var _u=(0,s.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:a,isDraggable:u,...d}=e;const p=(0,s.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},f=(0,s.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,s.createElement)(bu,{isEnabled:u&&!o.disabled,blocks:f,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:f}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(a(null),u(e))},onDragEnd:e=>{p.current=!1,f&&f(e)}},(0,s.createElement)(hu,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null)},onKeyDown:e=>{const{keyCode:t}=e;t===ga.ENTER&&(e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null))},onFocus:()=>{p.current||a(o)},onMouseEnter:()=>{p.current||a(o)},onMouseLeave:()=>a(null),onBlur:()=>a(null)},d),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,s.createElement)(Ha,{icon:o.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},o.title)))}))})),yu=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,Nt.speak)((0,h.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Eu=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(fu);return(0,s.createElement)(p.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),Cu=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:a=!0}=e;return(0,s.createElement)(yu,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,s.createElement)(Eu,{key:t},e.map(((e,l)=>(0,s.createElement)(_u,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:a,isFirst:0===t&&0===l})))))),l)},Su=function(e){let{title:t,icon:n,children:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(p.Icon,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},wu=(e,t)=>{const{categories:n,collections:o,items:l}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(zn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const s=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(s,void 0,n)}),[t])]},Bu=function(e){let{children:t}=e;const n=(0,p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(fu.Provider,{value:n},t)};const Iu=[];var xu=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,c]=wu(t,n),p=(0,s.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,s.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,s.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),g=(0,s.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,s.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,k=(0,s.useMemo)((()=>Object.entries(a)),[a]),_=(0,d.useAsyncList)(b?k:Iu);return(0,s.createElement)(Bu,null,(0,s.createElement)("div",null,r&&!!p.length&&(0,s.createElement)(Su,{title:(0,h._x)("Most used","blocks")},(0,s.createElement)(Cu,{items:p,onSelect:c,onHover:o,label:(0,h._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,s.createElement)(Su,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Cu,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(Su,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,h.__)("Uncategorized")},(0,s.createElement)(Cu,{items:m,onSelect:c,onHover:o,label:(0,h.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const r=g[t];return r&&r.length?(0,s.createElement)(Su,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(Cu,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))},Tu=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(p.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(p.FlexItem,{isBlock:!0},(0,s.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,h.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,h.__)("Explore all patterns"),onClick:()=>r()},(0,h._x)("Explore","Label for showing all block patterns"))))},Nu=window.wp.notices,Pu=(e,t)=>{const{patternCategories:n,patterns:o}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(zn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,m.useDispatch)(Nu.store);return[o,n,(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,h.sprintf)(
13
  /* translators: %s: block pattern title. */
14
- (0,h.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function Mu(e){let{isDraggable:t,pattern:n,onClick:o,composite:r}=e;const{blocks:l,viewportWidth:a}=n,c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(Mu)}`;return(0,s.createElement)(bu,{isEnabled:t,blocks:l},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},r,{className:"block-editor-block-patterns-list__item",onClick:()=>o(n,l)}),(0,s.createElement)(du,{blocks:l,viewportWidth:a}),(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,s.createElement)(p.VisuallyHidden,{id:c},n.description)))}))}function Ru(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Lu=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onClickPattern:r,orientation:l,label:a=(0,h.__)("Block Patterns")}=e;const c=(0,p.__unstableUseCompositeState)({orientation:l});return(0,s.createElement)(p.__unstableComposite,i({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>o.includes(e)?(0,s.createElement)(Mu,{key:e.name,pattern:e,onClick:r,isDraggable:t,composite:c}):(0,s.createElement)(Ru,{key:e.name}))))};function Au(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const r="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${r}__categories-list`},n.map((e=>{let{name:n,label:l}=e;return(0,s.createElement)(p.Button,{key:n,label:l,className:`${r}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},l)})))}function Du(e){let{filterValue:t,setFilterValue:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)(p.SearchControl,{onChange:n,value:t,label:(0,h.__)("Search for patterns"),placeholder:(0,h.__)("Search")}))}var Ou=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,filterValue:r,setFilterValue:l}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,s.createElement)(Du,{filterValue:r,setFilterValue:l}),!r&&(0,s.createElement)(Au,{selectedCategory:t,patternCategories:n,onClickCategory:o}))},Fu=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)(So,{className:"block-editor-inserter__no-results-icon",icon:Va}),(0,s.createElement)("p",null,(0,h.__)("No results found.")))},zu=function(e){let{rootClientId:t="",insertionIndex:n,clientId:o,isAppender:l,onSelect:i,shouldFocusBlock:a=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(zn),{destinationRootClientId:d,destinationIndex:p}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:r,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=e(zn),c=r();let u,d=t;return void 0!==n?u=n:o?u=s(o,d):!l&&c?(d=i(c),u=s(c,d)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,o,l]),{replaceBlocks:f,insertBlocks:g,showInsertionPoint:v,hideInsertionPoint:b}=(0,m.useDispatch)(zn),k=(0,s.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=c();!l&&o&&(0,r.isUnmodifiedDefaultBlock)(o)?f(o.clientId,e,null,a||n?0:null,t):g(e,p,d,!0,a||n?0:null,t);const s=(0,h.sprintf)(// translators: %d: the name of the block that has been added
15
- (0,h._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,Nt.speak)(s),i&&i()}),[l,c,f,g,d,p,i,a]),_=(0,s.useCallback)((e=>{e?v(d,p):b()}),[v,b,d,p]);return[d,k,_]};const Vu=e=>e.name||"",Hu=e=>e.title,Uu=e=>e.description||"",Gu=e=>e.keywords||[],Wu=e=>e.category,$u=()=>null;function ju(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,u.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Ku=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(ju(e))},qu=(e,t)=>(0,u.differenceWith)(e,Ku(t),((e,t)=>t.includes(e))),Yu=(e,t,n,o)=>0===Ku(o).length?e:Zu(e,o,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}}),Zu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=Ku(t);if(0===o.length)return e;const r=e.map((e=>[e,Xu(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return r.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),r.map((e=>{let[t]=e;return t}))};function Xu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:o=Vu,getTitle:r=Hu,getDescription:l=Uu,getKeywords:i=Gu,getCategory:s=Wu,getCollection:a=$u}=n,c=o(e),d=r(e),p=l(e),m=i(e),f=s(e),h=a(e),g=ju(t),v=ju(d);let b=0;if(g===v)b+=30;else if(v.startsWith(g))b+=20;else{const e=[c,d,p,...m,f,h].join(" "),t=(0,u.words)(g);0===qu(t,e).length&&(b+=10)}return 0!==b&&c.startsWith("core/")&&b++,b}function Qu(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,s.createElement)(p.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,h.sprintf)(
16
  /* translators: %d: number of patterns. %s: block pattern search query */
17
- (0,h._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Ju=function(e){let{filterValue:t,selectedCategory:n,patternCategories:o}=e;const r=(0,d.useDebounce)(Nt.speak,500),[l,i]=zu({shouldFocusBlock:!0}),[a,,c]=Pu(i,l),u=(0,s.useMemo)((()=>o.map((e=>e.name))),[o]),p=(0,s.useMemo)((()=>t?Zu(a,t):a.filter((e=>{var t,o;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(o=e.categories)||void 0===o?void 0:o.includes(n)}))),[t,n,a]);(0,s.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,h.sprintf)(
18
  /* translators: %d: number of results. */
19
- (0,h._n)("%d result found.","%d results found.",e),e);r(n)}),[t,r]);const m=(0,d.useAsyncList)(p,{step:2}),f=!(null==p||!p.length);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},f&&(0,s.createElement)(Qu,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,s.createElement)(Bu,null,!f&&(0,s.createElement)(Fu,null),f&&(0,s.createElement)(Lu,{shownPatterns:m,blockPatterns:p,onClickPattern:c,isDraggable:!1})))};function ed(e){let{initialCategory:t,patternCategories:n}=e;const[o,r]=(0,s.useState)(""),[l,i]=(0,s.useState)(null==t?void 0:t.name);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,s.createElement)(Ou,{selectedCategory:l,patternCategories:n,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,s.createElement)(Ju,{filterValue:o,selectedCategory:l,patternCategories:n}))}var td=function(e){let{onModalClose:t,...n}=e;return(0,s.createElement)(p.Modal,{title:(0,h.__)("Patterns"),closeLabel:(0,h.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,s.createElement)(ed,n))};function nd(e){let{rootClientId:t,onInsert:n,selectedCategory:o,populatedCategories:r}=e;const[l,,i]=Pu(n,t),a=(0,s.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=r.reduce(((e,t,n)=>{let{name:o}=t;return e[o]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[r]),c=(0,s.useMemo)((()=>l.filter((e=>{var t;return"uncategorized"===o.name?a(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(o.name)}))),[l,o]),u=(0,s.useMemo)((()=>c.sort(((e,t)=>a(e)-a(t)))),[c,a]),p=(0,d.useAsyncList)(u);return c.length?(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,s.createElement)(Lu,{shownPatterns:p,blockPatterns:c,onClickPattern:i,label:o.label,orientation:"vertical",isDraggable:!0})):null}var od=function(e){let{rootClientId:t,onInsert:n,onClickCategory:o,selectedCategory:r}=e;const[l,i]=(0,s.useState)(!1),[a,c]=Pu(),u=(0,s.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),d=(0,s.useMemo)((()=>{const e=c.filter((e=>a.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:o}=t;return[n,o].includes("featured")?"featured"===n?-1:1:0}));return a.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,h._x)("Uncategorized")}),e}),[a,c]),p=r||d[0];return(0,s.createElement)(s.Fragment,null,!l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Tu,{selectedCategory:p,patternCategories:d,onClickCategory:o,openPatternExplorer:()=>i(!0)}),(0,s.createElement)(nd,{rootClientId:t,onInsert:n,selectedCategory:p,populatedCategories:d})),l&&(0,s.createElement)(td,{initialCategory:p,patternCategories:d,onModalClose:()=>i(!1)}))},rd=window.wp.url;function ld(e){let{onHover:t,onInsert:n,rootClientId:o}=e;const[r,,,l]=wu(o,n),i=(0,s.useMemo)((()=>r.filter((e=>{let{category:t}=e;return"reusable"===t}))),[r]);return 0===i.length?(0,s.createElement)(Fu,null):(0,s.createElement)(Su,{title:(0,h.__)("Reusable blocks")},(0,s.createElement)(Cu,{items:i,onSelect:l,onHover:t,label:(0,h.__)("Reusable blocks")}))}var id=function(e){let{rootClientId:t,onInsert:n,onHover:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ld,{onHover:o,onInsert:n,rootClientId:t}),(0,s.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,s.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,rd.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,h.__)("Manage Reusable blocks"))))};const{Fill:sd,Slot:ad}=(0,p.createSlotFill)("__unstableInserterMenuExtension");sd.Slot=ad;var cd=sd;const ud=[];var dd=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:m,showBlockDirectory:f=!1,isDraggable:g=!0,shouldFocusBlock:v=!0}=e;const b=(0,d.useDebounce)(Nt.speak,500),[k,_]=zu({onSelect:n,rootClientId:r,clientId:l,isAppender:i,insertionIndex:a,shouldFocusBlock:v}),[y,E,C,S]=wu(k,_),[w,,B]=Pu(_,k),I=(0,s.useMemo)((()=>{const e=Yu((0,u.orderBy)(y,["frecency"],["desc"]),E,C,t);return void 0!==m?e.slice(0,m):e}),[t,y,E,C,m]),x=(0,s.useMemo)((()=>{const e=Zu(w,t);return void 0!==c?e.slice(0,c):e}),[t,w,c]);(0,s.useEffect)((()=>{if(!t)return;const e=I.length+x.length,n=(0,h.sprintf)(
20
  /* translators: %d: number of results. */
21
- (0,h._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const T=(0,d.useAsyncList)(I,{step:9}),N=(0,d.useAsyncList)(T.length===I.length?x:ud),P=!(0,u.isEmpty)(I)||!(0,u.isEmpty)(x);return(0,s.createElement)(Bu,null,!f&&!P&&(0,s.createElement)(Fu,null),!!I.length&&(0,s.createElement)(Su,{title:(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("Blocks"))},(0,s.createElement)(Cu,{items:T,onSelect:S,onHover:o,label:(0,h.__)("Blocks"),isDraggable:g})),!!I.length&&!!x.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!x.length&&(0,s.createElement)(Su,{title:(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("Block Patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(Lu,{shownPatterns:N,blockPatterns:x,onClickPattern:B,isDraggable:g}))),f&&(0,s.createElement)(cd.Slot,{fillProps:{onSelect:S,onHover:o,filterValue:t,hasItems:P,rootClientId:k}},(e=>e.length?e:P?null:(0,s.createElement)(Fu,null))))};const pd={name:"blocks",
22
  /* translators: Blocks tab title in the block inserter. */
23
- title:(0,h.__)("Blocks")},md={name:"patterns",
24
  /* translators: Patterns tab title in the block inserter. */
25
- title:(0,h.__)("Patterns")},fd={name:"reusable",
26
  /* translators: Reusable blocks tab title in the block inserter. */
27
- title:(0,h.__)("Reusable")};var hd=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r}=e;const l=(0,s.useMemo)((()=>{const e=[pd];return n&&e.push(md),o&&e.push(fd),e}),[pd,n,md,o,fd]);return(0,s.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:r},t)},gd=function(e){let{rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,onSelect:l,showInserterHelpPanel:i,showMostUsedBlocks:a,__experimentalFilterValue:c="",shouldFocusBlock:u=!0}=e;const[d,f]=(0,s.useState)(c),[g,v]=(0,s.useState)(null),[b,k]=(0,s.useState)(null),[_,y,E]=zu({rootClientId:t,clientId:n,isAppender:o,insertionIndex:r,shouldFocusBlock:u}),{showPatterns:C,hasReusableBlocks:S}=(0,m.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(zn);return{showPatterns:!!n(_).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[_]),w=(0,s.useCallback)(((e,t,n)=>{y(e,t,n),l()}),[y,l]),B=(0,s.useCallback)(((e,t)=>{y(e,{patternName:t}),l()}),[y,l]),I=(0,s.useCallback)((e=>{E(!!e),v(e)}),[E,v]),x=(0,s.useCallback)((e=>{k(e)}),[k]),T=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(xu,{rootClientId:_,onInsert:w,onHover:I,showMostUsedBlocks:a})),i&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(p.VisuallyHidden,{as:"h2"},(0,h.__)("A tip for using the block editor")),(0,s.createElement)(za,null)))),[_,w,I,d,a,i]),N=(0,s.useMemo)((()=>(0,s.createElement)(od,{rootClientId:_,onInsert:B,onClickCategory:x,selectedCategory:b})),[_,B,x,b]),P=(0,s.useMemo)((()=>(0,s.createElement)(id,{rootClientId:_,onInsert:w,onHover:I})),[_,w,I]),M=(0,s.useCallback)((e=>"blocks"===e.name?T:"patterns"===e.name?N:P),[T,N,P]);return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:"block-editor-inserter__main-area"},(0,s.createElement)("div",{className:"block-editor-inserter__content"},(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{g&&v(null),f(e)},value:d,label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),!!d&&(0,s.createElement)(dd,{filterValue:d,onSelect:l,onHover:I,rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:u}),!d&&(C||S)&&(0,s.createElement)(hd,{showPatterns:C,showReusableBlocks:S},M),!d&&!C&&!S&&T)),i&&g&&(0,s.createElement)(mu,{item:g}))};function vd(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r}=e;const[l,i]=(0,s.useState)(""),[a,u]=zu({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[d]=wu(a,u),[f]=Pu(u,a),g=f.length&&!!l,v=g&&f.length>6||d.length>6,{setInserterIsOpened:b,insertionIndex:k}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:r,getBlockCount:l}=e(zn),i=r(o,n);return{setInserterIsOpened:t().__experimentalSetIsInserterOpened,insertionIndex:-1===i?l():i}}),[o,n]);return(0,s.useEffect)((()=>{b&&b(!1)}),[b]),(0,s.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":v,"has-expand":b})},v&&(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{i(e)},label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(dd,{filterValue:l,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:g?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,s.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:n,insertionIndex:k,filterValue:l})},"aria-label":(0,h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,h.__)("Browse all")))}const bd=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:a,toggleProps:c={}}=e;t=a?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
28
- (0,h._x)("Add %s","directly add the only allowed block"),l):(0,h._x)("Add block","Generic label for block inserter button");const{onClick:u,...d}=c;return(0,s.createElement)(p.Button,i({icon:Oa,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&r,disabled:o},d))};class kd extends s.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=bd}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!a,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i}=this.props;return i?(0,s.createElement)(vd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r}):(0,s.createElement)(gd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||null!=n&&n.length?this.renderToggle({onToggle:o}):(0,s.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var _d=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{getBlockRootClientId:l,hasInserterItems:i,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:a}=e(zn),{getBlockVariations:c}=e(r.store);o=o||l(n)||void 0;const d=s(o),p=a(o),m=1===(0,u.size)(d)&&0===(0,u.size)(c(d[0].name,"inserter"));let f=!1;return m&&(f=d[0]),{hasItems:i(o),hasSingleBlockType:m,blockTitle:f?f.title:"",allowedBlockType:f,directInsertBlock:p,rootClientId:o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u}=t;if(!(s||null!=c&&c.length))return;const{insertBlock:d}=e(zn);d(null!=c&&c.length?(0,r.createBlock)(...c):(0,r.createBlock)(a.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:s}=o(zn);if(l)return e(l,n);const a=t();return!i&&a&&s(a)===n?e(a,n)+1:r(n).length}(),n),u&&u();const p=(0,h.sprintf)(// translators: %s: the name of the block that has been added
29
- (0,h.__)("%s block added"),a.title);(0,Nt.speak)(p)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(kd),yd=(0,d.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(zn),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(zn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,Da.decodeEntities)(r)||(0,h.__)("Type / to choose a block");return(0,s.createElement)("div",{"data-root-client-id":l||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,h.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{ga.ENTER!==e.keyCode&&ga.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,s.createElement)(_d,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Ed(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,s.createElement)(_d,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:a,isOpen:u,blockTitle:d,hasSingleBlockType:m}=e;n=m?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
30
- (0,h._x)("Add %s","directly add the only allowed block"),d):(0,h._x)("Add block","Generic label for block inserter button");const f=!m;let g=(0,s.createElement)(p.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!m&&(0,s.createElement)(p.VisuallyHidden,{as:"span"},n),(0,s.createElement)(So,{icon:Oa}));return(f||m)&&(g=(0,s.createElement)(p.Tooltip,{text:n},g)),g},isAppender:!0})}const Cd=(0,s.forwardRef)(((e,t)=>(Rt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Ed(e,t))));var Sd=(0,s.forwardRef)(Ed),wd=(0,m.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:o,getTemplateLock:l,getSelectedBlockClientId:i}=e(zn);return{isLocked:!!l(n),canInsertDefaultBlock:o((0,r.getDefaultBlockName)(),n),selectedBlockClientId:i()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:o,isLocked:r,renderAppender:l,className:i,selectedBlockClientId:a,tagName:u="div"}=e;if(r||!1===l)return null;if(l)t=(0,s.createElement)(l,null);else{if(a!==n&&(n||a))return null;t=o?(0,s.createElement)(yd,{rootClientId:n}):(0,s.createElement)(Sd,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,s.createElement)(u,{tabIndex:-1,className:c()("block-list-appender wp-block",i),"data-block":!0},t)}));function Bd(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])}const Id=(0,s.createContext)();function xd(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,m.useDispatch)(zn),l=(0,s.useContext)(Id),i=(0,s.useRef)(),{orientation:a,previousClientId:u,nextClientId:f,rootClientId:g,isInserterShown:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(zn),a=r(),c=n(a.rootClientId);if(!c.length)return{};let u=c[a.index-1],d=c[a.index];for(;l(u);)u=i(u);for(;l(d);)d=s(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(a.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:a.rootClientId,isInserterShown:null==a?void 0:a.__unstableWithInserter}}),[]),b=Ba(u),k=Ba(f),_="vertical"===a,y=(0,s.useMemo)((()=>{if(!b&&!k)return{};const e=b?b.getBoundingClientRect():null,t=k?k.getBoundingClientRect():null;if(_)return{width:b?b.offsetWidth:k.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,h.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:b?b.offsetHeight:k.offsetHeight}}),[b,k]),E=(0,s.useCallback)((()=>{if(!b&&!k)return{};const{ownerDocument:e}=b||k,t=b?b.getBoundingClientRect():null,n=k?k.getBoundingClientRect():null;return _?(0,h.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,h.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[b,k]),C=Bd(n),S=(0,d.useReducedMotion)(),w=c()("block-editor-block-list__insertion-point","is-"+a),B=b&&k&&v,I={start:{..._?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:B?.4:0}},hover:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},x={start:{scale:S?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,s.createElement)(p.Popover,{ref:C,noArrow:!0,animate:!1,getAnchorRect:E,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:f+"--"+g},(0,s.createElement)(p.__unstableMotion.div,{layout:!S,initial:S?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&f&&o(f,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:c()(w,{"is-with-inserter":B}),onHoverEnd:function(e){e.target!==i.current||l.current||r()},style:y},(0,s.createElement)(p.__unstableMotion.div,{variants:I,className:"block-editor-block-list__insertion-point-indicator"}),B&&(0,s.createElement)(p.__unstableMotion.div,{variants:x,className:c()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(_d,{position:"bottom center",clientId:f,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function Td(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:o}=e;const r=(0,m.useSelect)((e=>e(zn).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(Id.Provider,{value:(0,s.useRef)(!1)},r&&(0,s.createElement)(xd,{__unstablePopoverSlot:n,__unstableContentRef:o}),t)}function Nd(){const e=(0,s.useContext)(Id),t=(0,m.useSelect)((e=>e(zn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:c}=(0,m.useSelect)(zn),{showInsertionPoint:u,hideInsertionPoint:p}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)};function s(t){var o,s;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&p());let d;if(t.target.classList.contains("is-root-container")||(d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),c(d))return;const m=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),h=t.clientY-f.top,g=t.clientX-f.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===m&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===m&&e.offsetLeft>g));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(s=v.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(a().includes(b))return;const k=v.getBoundingClientRect();if("horizontal"===m&&(t.clientY>k.bottom||t.clientY<k.top)||"vertical"===m&&(t.clientX>k.right||t.clientX<k.left))return void(l()&&p());const _=r(b,d);0!==_?u(d,_,{__unstableWithInserter:!0}):l()&&p()}}),[e,n,o,r,l,i,u,p,a])}const Pd="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Md="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Rd(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(zn),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),s=n(e),a=l(s);if(!a)return null;const c=o(e),u=i(s,c),d={title:a.title,icon:a.icon,description:a.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description}:d}),[e])}function Ld(e){let{clientId:t}=e;const{attributes:n,name:o,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=e(zn),i=n(t);if(!i)return{};const s=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:s&&l(o(t).ref)}}),[t]),i=Rd(t);if(!o||!i)return null;const s=(0,r.getBlockType)(o),a=s?(0,r.__experimentalGetBlockLabel)(s,n):null,c=l||a;return c&&c!==s.title?(0,u.truncate)(c,{length:35}):i.title}var Ad=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:a,isDraggable:c,icon:u}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:o,getTemplateLock:l,getBlockName:i}=e(zn),s=o(n[0]),a=s?l(s):null,c=i(n[0]);return{srcRootClientId:s,isDraggable:"all"!==a,icon:null===(t=(0,r.getBlockType)(c))||void 0===t?void 0:t.icon}}),[n]),d=(0,s.useRef)(!1),[f,h,g]=function(){const e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=(0,s.useRef)(null),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,s.useCallback)((r=>{e.current=r.clientY,n.current=(0,or.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,s.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,m.useDispatch)(zn);if((0,s.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const k={type:"block",srcClientIds:n,srcRootClientId:a};return(0,s.createElement)(p.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:k,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:h,onDragEnd:()=>{b(),d.current=!1,g(),i&&i()},__experimentalDragComponent:(0,s.createElement)(vu,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))},Dd=function(e){let{clientId:t,rootClientId:n,blockElement:o}=e;const l=Rd(t),a=(0,m.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=e(zn),a=l(t,n),{name:c,attributes:u}=r(t);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(n))||void 0===o?void 0:o.orientation}}),[t,n]),{index:u,name:d,attributes:f,blockMovingMode:g,orientation:v}=a,{setNavigationMode:b,removeBlock:k}=(0,m.useDispatch)(zn),_=(0,s.useRef)(),y=(0,r.getBlockType)(d),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,f,u+1,v);(0,s.useEffect)((()=>{_.current.focus(),(0,Nt.speak)(E)}),[E]);const{hasBlockMovingClientId:C,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:B,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:T,getNextBlockClientId:N,isNavigationMode:P}=(0,m.useSelect)(zn),{selectBlock:M,clearSelectedBlock:R,setBlockMovingClientId:L,moveBlockToPosition:A}=(0,m.useDispatch)(zn),D=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!g}),O=(0,h.__)("Drag");return(0,s.createElement)("div",{className:D},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ha,{icon:null==l?void 0:l.icon,showColors:!0})),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ad,{clientIds:[t]},(e=>(0,s.createElement)(p.Button,i({icon:gu,className:"block-selection-button_drag-handle","aria-hidden":"true",label:O,tabIndex:"-1"},e))))),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{ref:_,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===ga.UP,l=n===ga.DOWN,i=n===ga.LEFT,s=n===ga.RIGHT,a=n===ga.TAB,c=n===ga.ESCAPE,u=n===ga.ENTER,d=n===ga.SPACE,p=e.shiftKey;if(n===ga.BACKSPACE||n===ga.DELETE)return k(t),void e.preventDefault();const m=I(),f=x(),h=T(f||m),g=N(f||m),v=a&&p||r,b=a&&!p||l,_=i,y=s;let E;if(v)E=h;else if(b)E=g;else if(_){var D;E=null!==(D=w(m))&&void 0!==D?D:m}else if(y){var O;E=null!==(O=B([m])[0])&&void 0!==O?O:m}const F=C();if(c&&P()&&(R(),e.preventDefault()),c&&F&&!e.defaultPrevented&&(L(null),e.preventDefault()),(u||d)&&F){const e=w(F),t=w(m),n=S(F,e);let o=S(m,t);n<o&&e===t&&(o-=1),A(F,e,t,o),M(F),L(null)}if(b||v||_||y)if(E)e.preventDefault(),M(E);else if(a&&m){let t;b?(t=or.focus.tabbable.findNext(o),t||(t=o.ownerDocument.defaultView.frameElement,t=or.focus.tabbable.findNext(t))):t=or.focus.tabbable.findPrevious(o),t&&(e.preventDefault(),t.focus(),R())}},label:E,className:"block-selection-button_select-button"},(0,s.createElement)(Ld,{clientId:t})))))};function Od(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Fd=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const a=(0,s.useRef)(),c=function(e){const[t,n]=(0,s.useState)(!0),o=(0,s.useCallback)((()=>{const t=!or.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Rt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,s.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(a);return function(e,t,n,o,r){const[l]=(0,s.useState)(t),[i]=(0,s.useState)(o),a=(0,s.useCallback)((()=>{!function(e){const[t]=or.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,ec.useShortcut)("core/block-editor/focus-toolbar",a),(0,s.useEffect)((()=>{l&&a()}),[n,l,a]),(0,s.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Od(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=Od(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}(a,n,c,o,r),c?(0,s.createElement)(p.Toolbar,i({label:l["aria-label"],ref:a},l),t):(0,s.createElement)(p.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:a},l),t)},zd=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Vd=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Hd=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Ud=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Gd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?zd:Vd:Hd:"down"===e?"horizontal"===t?(0,h.isRTL)()?Vd:zd:Ud:null,Wd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move right"):(0,h.__)("Move left"):(0,h.__)("Move up"):"down"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move left"):(0,h.__)("Move right"):(0,h.__)("Move down"):null,$d=(0,s.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...a}=e;const f=(0,d.useInstanceId)($d),g=(0,u.castArray)(n).length,{blockType:v,isDisabled:b,rootClientId:k,isFirst:_,isLast:y,firstIndex:E,orientation:C="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:s,getBlock:a,getBlockListSettings:c}=e(zn),d=(0,u.castArray)(n),p=(0,u.first)(d),m=i(p),f=t(p,m),h=t((0,u.last)(d),m),g=s(m),v=a(p),b=0===f,k=h===g.length-1,{orientation:_}=c(m)||{};return{blockType:v?(0,r.getBlockType)(v.name):null,isDisabled:"up"===o?b:k,rootClientId:m,firstIndex:f,isFirst:b,isLast:k,orientation:l||_}}),[n,o]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(zn),B="up"===o?w:S,I=`block-editor-block-mover-button__description-${f}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:Gd(o,C),label:Wd(o,C),"aria-describedby":I},a,{onClick:b?null:e=>{B(n,k),a.onClick&&a.onClick(e)},"aria-disabled":b})),(0,s.createElement)("span",{id:I,className:"block-editor-block-mover-button__description"},function(e,t,n,o,r,l,i){const s=n+1,a=e=>"up"===e?"horizontal"===i?(0,h.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,h.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,h.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,h.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
31
  (0,h._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,l):r>0&&!o?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
32
  (0,h._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,l):void 0}(e,n,o,r,l);if(o&&r)return(0,h.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
33
  (0,h.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
@@ -42,51 +42,51 @@ title:(0,h.__)("Reusable")};var hd=function(e){let{children:t,showPatterns:n=!1,
42
  (0,h.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s-1)}if(l<0&&o){const e=a("up");if("up"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
43
  (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
44
  (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
45
- (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(g,v&&v.title,E,_,y,"up"===o?-1:1,C)))})),jd=(0,s.forwardRef)(((e,t)=>(0,s.createElement)($d,i({direction:"up",ref:t},e)))),Kd=(0,s.forwardRef)(((e,t)=>(0,s.createElement)($d,i({direction:"down",ref:t},e))));var qd=(0,m.withSelect)(((e,t)=>{var n;let{clientIds:o}=t;const{getBlock:l,getBlockIndex:i,getBlockListSettings:s,canMoveBlocks:a,getBlockOrder:c,getBlockRootClientId:d}=e(zn),p=(0,u.castArray)(o),m=(0,u.first)(p),f=l(m),h=d((0,u.first)(p)),g=i(m,h),v=0===g,b=i((0,u.last)(p),h)===c(h).length-1;return{blockType:f?(0,r.getBlockType)(f.name):null,canMove:a(o,h),rootClientId:h,firstIndex:g,isFirst:v,isLast:b,orientation:null===(n=s(h))||void 0===n?void 0:n.orientation}}))((function(e){let{isFirst:t,isLast:n,clientIds:o,canMove:r,isHidden:l,rootClientId:a,orientation:u,hideDragHandle:d}=e;const[m,f]=(0,s.useState)(!1),g=()=>f(!0),v=()=>f(!1);if(!r||t&&n&&!a)return null;const b=(0,h.__)("Drag");return(0,s.createElement)("div",{className:c()("block-editor-block-mover",{"is-visible":m||!l,"is-horizontal":"horizontal"===u})},!d&&(0,s.createElement)(Ad,{clientIds:o,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,s.createElement)(p.Button,i({icon:gu,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(p.ToolbarItem,{onFocus:g,onBlur:v},(e=>(0,s.createElement)(jd,i({clientIds:o},e)))),(0,s.createElement)(p.ToolbarItem,{onFocus:g,onBlur:v},(e=>(0,s.createElement)(Kd,i({clientIds:o},e))))))}));const{clearTimeout:Yd,setTimeout:Zd}=window,Xd=200;function Qd(e){let{ref:t,isFocused:n,debounceTimeout:o=Xd,onChange:r=u.noop}=e;const[l,i]=(0,s.useState)(!1),a=(0,s.useRef)(),c=e=>{null!=t&&t.current&&i(e),r(e)},d=()=>{const e=a.current;e&&Yd&&Yd(e)};return(0,s.useEffect)((()=>()=>d()),[]),{showMovers:l,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),l||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),a.current=Zd((()=>{(()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e})()&&c(!1)}),o)}}}function Jd(e){let{ref:t,debounceTimeout:n=Xd,onChange:o=u.noop}=e;const[r,l]=(0,s.useState)(!1),{showMovers:i,debouncedShowMovers:a,debouncedHideMovers:c}=Qd({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),d=(0,s.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,s.useEffect)((()=>{const e=t.current,n=()=>{p()&&(l(!0),a())},o=()=>{p()||(l(!1),c())};return e&&!d.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),d.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,d,l,a,c]),{showMovers:i,gestures:{onMouseMove:a,onMouseLeave:c}}}function ep(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(zn),{firstParentClientId:n,shouldHide:o,hasReducedUI:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:l}=e(zn),{hasBlockSupport:i}=e(r.store),s=n(o()),a=s[s.length-1],c=t(a),u=(0,r.getBlockType)(c),d=l();return{firstParentClientId:a,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),a=Rd(n),c=(0,s.useRef)(),{gestures:u}=Jd({ref:c,onChange(e){e&&l||t(n,e)}});return o||void 0===n?null:(0,s.createElement)("div",i({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,s.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,h.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
- (0,h.__)("Select %s"),a.title),showTooltip:!0,icon:(0,s.createElement)(Ha,{icon:a.icon})}))}var tp=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function np(e){let{blocks:t}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,h.__)("Preview")),(0,s.createElement)(du,{viewportWidth:500,blocks:t})))))}var op=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:l}=e;const[i,a]=(0,s.useState)();return(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Transform to"),className:t},i&&(0,s.createElement)(np,{blocks:(0,r.switchToBlockType)(l,i)}),n.map((e=>{const{name:t,icon:n,title:l,isDisabled:i}=e;return(0,s.createElement)(p.MenuItem,{key:t,className:(0,r.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),o(t)},disabled:i,onMouseLeave:()=>a(null),onMouseEnter:()=>a(t)},(0,s.createElement)(Ha,{icon:n,showColors:!0}),l)})))},rp=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),lp=window.wp.tokenList,ip=n.n(lp);function sp(e,t,n){const o=new(ip())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function ap(e){return(0,u.find)(e,"isDefault")}function cp(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:l,blockType:i,className:a}=(0,m.useSelect)((e=>{const{getBlock:n}=e(zn),o=n(t);if(!o)return{};const l=(0,r.getBlockType)(o.name),{getBlockStyles:i}=e(r.store);return{block:o,blockType:l,styles:i(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,m.useDispatch)(zn),d=function(e){return e&&0!==e.length?ap(e)?e:[{name:"default",label:(0,h._x)("Default","block style"),isDefault:!0},...e]:[]}(o),p=function(e,t){for(const n of new(ip())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=(0,u.find)(e,{name:t});if(o)return o}return(0,u.find)(e,"isDefault")}(d,a),f=function(e,t){return(0,s.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,r.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,r.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(l,i);return{onSelect:e=>{const o=sp(a,p,e);c(t,{className:o}),n()},stylesToRender:d,activeStyle:p,genericPreviewBlock:f,className:a}}function up(e){let{clientId:t,onSwitch:n=u.noop}=e;const{onSelect:o,stylesToRender:r,activeStyle:l}=cp({clientId:t,onSwitch:n});return r&&0!==r.length?(0,s.createElement)(s.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.MenuItem,{key:e.name,icon:l.name===e.name?rp:null,onClick:()=>o(e)},(0,s.createElement)(p.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function dp(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,s.createElement)(up,{clientId:o,onSwitch:n}))}const pp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=pp(e,t,n);if(o)return o}}},mp=(e,t)=>{const n=((e,t)=>{const n=(0,r.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function fp(e){let{patterns:t,onSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,h.__)("Preview")),(0,s.createElement)(hp,{patterns:t,onSelect:n})))))}function hp(e){let{patterns:t,onSelect:n}=e;const o=(0,p.__unstableUseCompositeState)();return(0,s.createElement)(p.__unstableComposite,i({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,h.__)("Patterns list")}),t.map((e=>(0,s.createElement)(gp,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function gp(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",l=(0,d.useInstanceId)(gp,`${r}-list__item-description`);return(0,s.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?l:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,s.createElement)(du,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,s.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,s.createElement)(p.VisuallyHidden,{id:l},t.description))}var vp=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[l,i]=(0,s.useState)(!1),a=((e,t)=>(0,s.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,r.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=pp(r,t.name,o);if(n){e=!0,o.add(n.clientId),mp(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]))(n,t);return a.length?(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},l&&(0,s.createElement)(fp,{patterns:a,onSelect:o}),(0,s.createElement)(p.MenuItem,{onClick:e=>{e.preventDefault(),i(!l)},icon:zd},(0,h.__)("Patterns"))):null};const bp=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o}=(0,m.useDispatch)(zn),l=Rd(n[0].clientId),{possibleBlockTransformations:i,canRemove:a,hasBlockStyles:c,icon:d,blockTitle:f,patterns:g}=(0,m.useSelect)((e=>{var o;const{getBlockRootClientId:i,getBlockTransformItems:s,__experimentalGetPatternTransformItems:a}=e(zn),{getBlockStyles:c,getBlockType:d}=e(r.store),{canRemoveBlocks:p}=e(zn),m=i((0,u.castArray)(t)[0]),[{name:f}]=n,h=1===n.length,g=h&&c(f);let v;var b;h?v=null==l?void 0:l.icon:v=1===(0,u.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(b=d(f))||void 0===b?void 0:b.icon:tp;return{possibleBlockTransformations:s(n,m),canRemove:p(t,m),hasBlockStyles:!(null==g||!g.length),icon:v,blockTitle:null===(o=d(f))||void 0===o?void 0:o.title,patterns:a(n,m)}}),[t,n,null==l?void 0:l.icon]),v=1===n.length&&(0,r.isReusableBlock)(n[0]),b=1===n.length&&(0,r.isTemplatePart)(n[0]),k=!!i.length&&a,_=!(null==g||!g.length)&&a;if(!c&&!k)return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,s.createElement)(Ha,{icon:d,showColors:!0})}));const y=f,E=1===n.length?(0,h.sprintf)(
48
  /* translators: %s: block title. */
49
  (0,h.__)("%s: Change block type or style"),f):(0,h.sprintf)(
50
  /* translators: %d: number of blocks. */
51
- (0,h._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),C=c||k||_;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:y,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ha,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(v||b)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,s.createElement)(Ld,{clientId:t}))),toggleProps:{describedBy:E,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:l}=e;return C&&(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,s.createElement)(vp,{blocks:n,patterns:g,onSelect:e=>{(e=>{o(t,e)})(e),l()}}),k&&(0,s.createElement)(op,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{o(t,(0,r.switchToBlockType)(n,e))})(e),l()}}),c&&(0,s.createElement)(dp,{hoveredBlock:n[0],onSwitch:l}))})))))};var kp=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(zn).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,s.createElement)(bp,{clientIds:t,blocks:n})},_p=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),yp=window.wp.blob;function Ep(){const{getBlockName:e}=(0,m.useSelect)(zn),{getBlockType:t}=(0,m.useSelect)(r.store),{createSuccessNotice:n}=(0,m.useDispatch)(Nu.store);return(0,s.useCallback)(((o,r)=>{let l="";if(1===r.length){var i;const n=r[0],s=null===(i=t(e(n)))||void 0===i?void 0:i.title;l="copy"===o?(0,h.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
52
  (0,h.__)('Copied "%s" to clipboard.'),s):(0,h.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
53
  (0,h.__)('Moved "%s" to clipboard.'),s)}else l="copy"===o?(0,h.sprintf)(// Translators: %d: Number of blocks being copied.
54
  (0,h._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,h.sprintf)(// Translators: %d: Number of blocks being cut.
55
- (0,h._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Cp(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,m.useSelect)(zn),{flashBlock:l,removeBlocks:i,replaceBlocks:s}=(0,m.useDispatch)(zn),a=Ep();return(0,d.useRefEffect)((c=>{function u(u){const d=t();if(0===d.length)return;if(!n()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,or.documentHasUncollapsedSelection)(t):(0,or.documentHasSelection)(t))return}if(!c.contains(u.target.ownerDocument.activeElement))return;const p=u.defaultPrevented;if(u.preventDefault(),"copy"===u.type||"cut"===u.type){1===d.length&&l(d[0]),a(u.type,d);const t=e(d),n=(0,r.serialize)(t);u.clipboardData.setData("text/plain",n),u.clipboardData.setData("text/html",n)}if("cut"===u.type)i(d);else if("paste"===u.type){if(p)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,or.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!o&&(o=r.map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join(""),n=""),{html:o,plainText:n}}(u),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});s(d,l,l.length-1,-1)}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}var Sp=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Cp()},t)};function wp(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:s,canMoveBlocks:a,canRemoveBlocks:c}=(0,m.useSelect)(zn),{getDefaultBlockName:d,getGroupingBlockName:p}=(0,m.useSelect)(r.store),f=s(t),h=i(t[0]),g=(0,u.every)(f,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,h))),v=l(d(),h),b=a(t,h),k=c(t,h),{removeBlocks:_,replaceBlocks:y,duplicateBlocks:E,insertAfterBlock:C,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:B,setNavigationMode:I,selectBlock:x}=(0,m.useDispatch)(zn),T=Ep();return n({canDuplicate:g,canInsertDefaultBlock:v,canMove:b,canRemove:k,rootClientId:h,blocks:f,onDuplicate:()=>E(t,o),onRemove:()=>_(t,o),onInsertBefore(){S((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){C((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),B(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,r.switchToBlockType)(f,e);n&&y(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),T("copy",e)}})}var Bp=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(zn),s=o(n),a=i().codeEditingEnabled;return{mode:l(n),blockType:s?(0,r.getBlockType)(s.name):null,isCodeEditingEnabled:a}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:o}=t;return{onToggleMode(){e(zn).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const a="visual"===n?(0,h.__)("Edit as HTML"):(0,h.__)("Edit visually");return(0,s.createElement)(p.MenuItem,{onClick:o},!l&&a)})),Ip=(0,d.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(zn).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(zn).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,h.__)("Convert to Blocks");return(0,s.createElement)(p.MenuItem,{onClick:n},!o&&r)}));const{Fill:xp,Slot:Tp}=(0,p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");xp.Slot=Tp;var Np=xp;function Pp(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:a=(()=>{})}=e;const{replaceBlocks:c}=(0,m.useDispatch)(zn);return n||o?(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),a()}},(0,h._x)("Group","verb")),o&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),a()}},(0,h._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:Mp,Slot:Rp}=(0,p.createSlotFill)("BlockSettingsMenuControls");function Lp(e){let{...t}=e;return(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(Mp,t))}Lp.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:o,selectedClientIds:l}=(0,m.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o}=e(zn),r=null!==n?n:o();return{selectedBlocks:(0,u.map)((0,u.compact)(t(r)),(e=>e.name)),selectedClientIds:r}}),[n]),a=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(zn),{getGroupingBlockName:s}=e(r.store),a=i(),c=s(),u=l(c,null!=a&&a.length?n(a[0]):void 0),d=o(a),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:a,isGroupable:u&&d.length&&!p,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}(),{isGroupable:c,isUngroupable:d}=a,f=c||d;return(0,s.createElement)(Rp,{fillProps:{...t,selectedBlocks:o,selectedClientIds:l}},(e=>{if((null==e?void 0:e.length)>0||f)return(0,s.createElement)(p.MenuGroup,null,e,(0,s.createElement)(Pp,i({},a,{onClose:null==t?void 0:t.onClose})))}))};var Ap=Lp;const Dp={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Op(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n);return(0,s.createElement)(p.MenuItem,{ref:o},(0,h.__)("Copy"))}var Fp=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,...l}=e;const a=(0,u.castArray)(t),c=a.length,d=a[0],{onlyBlock:f,title:g}=(0,m.useSelect)((e=>{var t;const{getBlockCount:n,getBlockName:o}=e(zn),{getBlockType:l}=e(r.store);return{onlyBlock:1===n(),title:null===(t=l(o(d)))||void 0===t?void 0:t.title}}),[d]),v=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(ec.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=(0,s.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),k=(0,h.sprintf)(
56
  /* translators: %s: block name */
57
- (0,h.__)("Remove %s"),g),_=1===c?k:(0,h.__)("Remove blocks");return(0,s.createElement)(wp,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:a,canRemove:m,onDuplicate:g,onInsertAfter:k,onInsertBefore:y,onRemove:E,onCopy:C,onMoveTo:S,blocks:w}=e;return(0,s.createElement)(p.DropdownMenu,i({icon:_p,label:(0,h.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Dp,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(Np.Slot,{fillProps:{onClose:l}}),1===c&&(0,s.createElement)(Ip,{clientId:d}),(0,s.createElement)(Op,{blocks:w,onCopy:C}),n&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,g,b),shortcut:v.duplicate},(0,h.__)("Duplicate")),r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,y),shortcut:v.insertBefore},(0,h.__)("Insert before")),(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,k),shortcut:v.insertAfter},(0,h.__)("Insert after"))),a&&!f&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,S)},(0,h.__)("Move to")),1===c&&(0,s.createElement)(Bp,{clientId:d,onToggle:l})),(0,s.createElement)(Ap.Slot,{fillProps:{onClose:l},clientIds:t}),"function"==typeof o?o({onClose:l}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:l}))),m&&(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,E,b),shortcut:v.remove},_)))}))}))},zp=function(e){let{clientIds:t,...n}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(Fp,i({clientIds:t,toggleProps:e},n)))))};function Vp(e){let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:a,hasReducedUI:u,isValid:f,isVisual:h}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:s}=e(zn),a=o(),c=a[0],u=i(c),d=s();return{blockClientIds:a,blockClientId:c,blockType:c&&(0,r.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:a.every((e=>l(e))),isVisual:a.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,m.useDispatch)(zn),v=(0,s.useRef)(),{showMovers:b,gestures:k}=Jd({ref:v,onChange(e){e&&u||g(o,e)}}),_=(0,d.useViewportMatch)("medium","<")||a;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const y=_||b;if(0===n.length)return null;const E=f&&h,C=n.length>1,S=c()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,s.createElement)("div",{className:S},!C&&!_&&(0,s.createElement)(ep,{clientIds:n}),(0,s.createElement)("div",i({ref:v},k),(E||C)&&(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(kp,{clientIds:n}),(0,s.createElement)(qd,{clientIds:n,hideDragHandle:t||u}))),E&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Yn.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,s.createElement)(zp,{clientIds:n}))}var Hp=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:a,showParentSelector:u}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(zn),{getBlockType:l}=e(r.store),i=o(),s=i[0],a=n(s),c=l(t(a[a.length-1]));return{blockType:s&&l(t(s)),hasParents:a.length,showParentSelector:(0,r.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":a&&u,"is-fixed":n});return(0,s.createElement)(Fd,i({focusOnMount:t,className:d
58
- /* translators: accessibility text for the block toolbar */,"aria-label":(0,h.__)("Block tools")},o),(0,s.createElement)(Vp,{hideDragHandle:n}))};function Up(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(zn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function Gp(e){let{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:a}=e;const{isNavigationMode:u,isMultiSelecting:f,isTyping:h,isCaretWithinFormattedText:g,hasMultiSelection:v,hasFixedToolbar:b,lastClientId:k}=(0,m.useSelect)(Up,[]),_=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(zn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),y=(0,d.useViewportMatch)("medium"),[E,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),{stopTyping:B}=(0,m.useDispatch)(zn),I=!h&&!u&&r&&o,x=u,T=!u&&!b&&y&&!I&&!f&&(!h||g),N=!(u||T||b||r);(0,ec.useShortcut)("core/block-editor/focus-toolbar",(()=>{C(!0),B(!0)}),{isDisabled:!N}),(0,s.useEffect)((()=>{T||C(!1)}),[T]);const P=(0,s.useRef)(),M=Ba(t),R=Ba(k),L=Ba(l),A=Bd(a);if(!(x||T||E||I))return null;let D=M;if(!D)return null;l&&(D=L);let O=D;if(v){if(!R)return null;O={top:D,bottom:R}}const F=I?"top left right":"top right left",{ownerDocument:z}=D,V=I?void 0:z.defaultView.frameElement||(0,or.getScrollContainer)(D)||z.body;return(0,s.createElement)(p.Popover,{ref:A,noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:O,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":_}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:D,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==a?void 0:a.current},(T||E)&&(0,s.createElement)("div",{onFocus:function(){w(!0)},onBlur:function(){w(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},(0,s.createElement)(_d,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||E)&&(0,s.createElement)(Hp,{focusOnMount:E,__experimentalInitialIndex:P.current,__experimentalOnIndexChange:e=>{P.current=e},key:t}),x&&(0,s.createElement)(Dd,{clientId:t,rootClientId:n,blockElement:D}),I&&(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(_d,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Wp(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:s}=e(zn),a=t()||n();if(!a)return;const{name:c,attributes:d={},isValid:p}=l(a)||{},m=i(a),f=s(m),h=(0,u.find)(m,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:a,rootClientId:o(a),name:c,isValid:p,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:h}}function $p(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,m.useSelect)(Wp,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u}=o;return i?(0,s.createElement)(Gp,{clientId:r,rootClientId:l,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function jp(e){let{children:t}=e;const n=(0,s.useContext)(Id),o=(0,s.useContext)(p.Disabled.Context);return n||o?t:(Rt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,s.createElement)(Td,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)($p,{__unstablePopoverSlot:"block-toolbar"}),t))}var Kp=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Gn();return(0,s.createElement)(e,i({},t,{clientId:n}))}),"withClientId"),qp=Kp((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,s.createElement)(Sd,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})})),Yp=(0,d.compose)([Kp,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(zn),r=o(n);return{lastBlockClientId:(0,u.last)(r)}}))])((e=>{let{clientId:t}=e;return(0,s.createElement)(yd,{rootClientId:t})})),Zp=window.wp.isShallowEqual,Xp=n.n(Zp);const Qp=new WeakMap;function Jp(e,t){const n=(0,m.useSelect)((e=>e(zn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,m.useSelect)(zn),{insertBlocks:s,moveBlocksToPosition:a,updateBlockAttributes:c,clearSelectedBlock:u}=(0,m.useDispatch)(zn),d=function(e,t,n,o,l,i,s){return a=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a);if("inserter"===d){s();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0],c);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,s=u.length;l(u,c,e,i&&r<t?t-s:t)}}}(e,t,l,i,a,s,u),p=function(e,t,n,o,l,i){return s=>{if(!n)return;const a=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(s)));if(a){const n=a.transform(s,o);i(n,t,e)}}}(e,t,n,c,o,s),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,s);return e=>{const t=(0,or.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?f(n):t.length?p(t):d(e)}}function em(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}function tm(e,t){let n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=em(e,t,r);(void 0===n||l<n)&&(n=l,o=r)})),[n,o]}function nm(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,h.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=tm(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}function om(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,s.useState)(null),o=(0,m.useSelect)((t=>{const{getTemplateLock:n}=t(zn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,m.useSelect)(zn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,m.useDispatch)(zn),a=Jp(e,t),c=(0,d.useThrottle)((0,s.useCallback)(((t,o)=>{var i;const s=nm(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===s?0:s),null!==s&&l(e,s)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function rm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:a,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:f,renderAppender:h,orientation:g,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,a){const{updateBlockListSettings:c}=(0,m.useDispatch)(zn),{blockListSettings:u,parentLock:d}=(0,m.useSelect)((t=>{const n=t(zn).getBlockRootClientId(e);return{blockListSettings:t(zn).getBlockListSettings(e),parentLock:t(zn).getTemplateLock(n)}}),[e]),p=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===r?d:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=Bo(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Xp()(u,t)||c(e,t)}),[e,u,p,n,o,r,d,l,i,c,a])}(t,n,o,l,a,p,g,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,m.useSelect)(zn),{replaceInnerBlocks:i}=(0,m.useDispatch)(zn),a=(0,m.useSelect)((t=>t(zn).getBlocks(e)),[e]),c=(0,s.useRef)(null);(0,s.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,r.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(n,a)||i(e,n,0===a.length&&o&&0!==n.length,l())}}),[a,t,n,e])}(t,i,a,d);const k=(0,m.useSelect)((e=>{const n=e(zn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Qp.has(t)||Qp.set(t,new WeakMap);const n=Qp.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,s.createElement)(lr,{value:k},(0,s.createElement)(fm,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function lm(e){return Ga(e),(0,s.createElement)(rm,e)}const im=(0,s.forwardRef)(((e,t)=>{const n=sm({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Gn(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:a}=(0,m.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:s}=e(zn),a=t(n),c=s()||o;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(a,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==a&&!l(n)&&!i(n,!0)&&c}}),[n,o]),u=(0,d.useMergeRefs)([e.ref,om({rootClientId:n})]),p={__experimentalCaptureToolbars:l,...t},f=p.value&&p.onChange?lm:rm;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,s.createElement)(f,i({},p,{clientId:n})):(0,s.createElement)(fm,t)}}sm.save=r.__unstableGetInnerBlocksProps,im.DefaultBlockAppender=Yp,im.ButtonBlockAppender=qp,im.Content=()=>sm.save().children;var am=im;const cm=(0,s.createContext)(),um=(0,s.createContext)();function dm(e){let{className:t,...n}=e;const[o,r]=(0,s.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,isNavigationMode:u}=(0,m.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(zn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),p=sm({ref:(0,d.useMergeRefs)([ja(),Nd(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":a&&l,"is-navigate-mode":u})},n);return(0,s.createElement)(cm.Provider,{value:o},(0,s.createElement)("div",p))}function pm(e){return function(){const e=(0,m.useSelect)((e=>e(zn).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,m.select)(zn).__experimentalGetParsedPattern(e[n].name),t=Pd(o))};return t=Pd(o),()=>Md(t)}),[e])}(),(0,s.createElement)(jp,null,(0,s.createElement)(Un,{value:Vn},(0,s.createElement)(dm,e)))}function mm(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=Io}=e;const[i,a]=(0,s.useState)(new Set),c=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{a((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[a]),{order:u,selectedBlocks:d}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o}=e(zn);return{order:t(n),selectedBlocks:o()}}),[n]);return(0,s.createElement)(To,{value:l},(0,s.createElement)(um.Provider,{value:c},u.map((e=>(0,s.createElement)(m.AsyncModeProvider,{key:e,value:!i.has(e)&&!d.includes(e)},(0,s.createElement)(Aa,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,s.createElement)(wd,{tagName:r,rootClientId:n,renderAppender:o}))}function fm(e){return(0,s.createElement)(m.AsyncModeProvider,{value:!1},(0,s.createElement)(mm,e))}pm.__unstableElementContext=cm;const hm=["colors","disableCustomColors","gradients","disableCustomGradients"];function gm(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,className:a,label:d,onColorChange:m,onGradientChange:f,colorValue:g,gradientValue:v,clearable:b,showTitle:k=!0,enableAlpha:_}=e;const y=m&&(!(0,u.isEmpty)(t)||!o),E=f&&(!(0,u.isEmpty)(n)||!r),[C,S]=(0,s.useState)(v?"gradient":!!y&&"color");return y||E?(0,s.createElement)(p.BaseControl,{className:c()("block-editor-color-gradient-control",a)},(0,s.createElement)("fieldset",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},k&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(p.BaseControl.VisualLabel,null,d))),y&&E&&(0,s.createElement)(p.__experimentalToggleGroupControl,{value:C,onChange:S,label:(0,h.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"color",label:(0,h.__)("Solid")}),(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,h.__)("Gradient")})),("color"===C||!E)&&(0,s.createElement)(p.ColorPalette,{value:g,onChange:E?e=>{m(e),f()}:m,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b,enableAlpha:_}),("gradient"===C||!y)&&(0,s.createElement)(p.GradientPicker,{value:v,onChange:y?e=>{f(e),m()}:f,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b})))):null}function vm(e){const t={};return t.colors=po("color.palette"),t.gradients=po("color.gradients"),t.disableCustomColors=!po("color.custom"),t.disableCustomGradients=!po("color.customGradient"),(0,s.createElement)(gm,i({},t,e))}var bm=function(e){return(0,u.every)(hm,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(gm,e):(0,s.createElement)(vm,e)};function km(){return{disableCustomColors:!po("color.custom"),disableCustomGradients:!po("color.customGradient")}}function _m(){const e=km(),t=po("color.palette.custom"),n=po("color.palette.theme"),o=po("color.palette.default"),r=po("color.defaultPalette");e.colors=(0,s.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,h._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=po("color.gradients.custom"),i=po("color.gradients.theme"),a=po("color.gradients.default"),c=po("color.defaultGradients");return e.gradients=(0,s.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&a&&a.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),l&&l.length&&e.push({name:(0,h._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,a]),e}Lc([Ac,Fc]);const ym=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},Em=(e,t)=>(0,u.find)(e,{color:t});function Cm(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const Sm=[];function wm(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=_m(),l=r.colors.reduce(((e,t)=>e.concat(t.colors)),[]),{color:a}=(null==n?void 0:n.border)||{},[c,u]=(0,s.useState)((()=>{var e;return null===(e=ym(l,t,a))||void 0===e?void 0:e.color}));return(0,s.useEffect)((()=>{var e;u(null===(e=ym(l,t,a))||void 0===e?void 0:e.color)}),[t,a,l]),(0,s.createElement)(bm,i({label:(0,h.__)("Color"),colorValue:c,onColorChange:e=>{u(e);const t=Em(l,e),r={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},i=null!=t&&t.slug?t.slug:void 0;o({style:Ko(r),borderColor:i})},clearable:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},r))}function Bm(e,t,n){var o;if(!Xm(t,"color")||Qm(t))return e;const{borderColor:r,style:l}=n,i=Cm("border-color",r),s=c()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=s||void 0,e}const Im=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:a}=l,c=po("color.palette")||Sm;if(!Xm(r,"color")||Qm(r))return(0,s.createElement)(e,t);const u={borderColor:a?null===(n=ym(c,a))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,s.createElement)(e,i({},t,{wrapperProps:d}))}));function xm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,p.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=xm(o),i=0===r||r?`${r}${l}`:null;return i}function Nm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Tm(e),n=isNaN(parseFloat(t));return n}function Pm(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function Mm(e){let{onChange:t,values:n,...o}=e;const r=Tm(n),l=Pm(n)&&Nm(n),a=l?(0,h.__)("Mixed"):null;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{"aria-label":(0,h.__)("Border radius"),disableUnits:l,isOnly:!0,value:r,onChange:t,placeholder:a}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Xm(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",Bm),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Xm(e,"color")||Qm(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Bm(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Im);const Rm={topLeft:(0,h.__)("Top left"),topRight:(0,h.__)("Top right"),bottomLeft:(0,h.__)("Bottom left"),bottomRight:(0,h.__)("Bottom right")};function Lm(e){let{onChange:t,values:n,...o}=e;const r="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Rm).map((e=>{let[n,l]=e;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{key:n,"aria-label":l,value:r[n],onChange:(a=n,e=>{t&&t({...r,[a]:e||void 0})})}));var a})))}var Am=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),Dm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function Om(e){let{isLinked:t,...n}=e;const o=t?(0,h.__)("Unlink Radii"):(0,h.__)("Link Radii");return(0,s.createElement)(p.Tooltip,{text:o},(0,s.createElement)(p.Button,i({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?Am:Dm,iconSize:16,"aria-label":o})))}const Fm={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},zm={px:100,em:20,rem:20};function Vm(e){let{onChange:t,values:n}=e;const[o,r]=(0,s.useState)(!Pm(n)||!Nm(n)),l=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,p.__experimentalParseUnit)(e);return t||"px"}return xm(Object.values(e).map((e=>{const[,t]=(0,p.__experimentalParseUnit)(e);return t})))||"px"}(n),a=l&&l.find((e=>e.value===i)),c=(null==a?void 0:a.step)||1,[u]=(0,p.__experimentalParseUnit)(Tm(n));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,h.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Mm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,unit:i,units:l}),(0,s.createElement)(p.RangeControl,{className:"components-border-radius-control__range-control",value:u,min:0,max:zm[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,s.createElement)(Lm,{min:0,onChange:t,values:n||Fm,units:l}),(0,s.createElement)(Om,{onClick:()=>r(!o),isLinked:o})))}function Hm(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Vm,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=Ko(t)),o({style:t})}})}var Um=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{d:"M5 11.25h14v1.5H5z"})),Gm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Wm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const $m=[{label:(0,h.__)("Solid"),icon:Um,value:"solid"},{label:(0,h.__)("Dashed"),icon:Gm,value:"dashed"},{label:(0,h.__)("Dotted"),icon:Wm,value:"dotted"}];function jm(e){let{onChange:t,value:n}=e;return(0,s.createElement)("fieldset",{className:"components-border-style-control"},(0,s.createElement)("legend",null,(0,h.__)("Style")),(0,s.createElement)("div",{className:"components-border-style-control__buttons"},$m.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const Km=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(jm,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:Ko(t)})}})},qm=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:l,style:i}=(null==n?void 0:n.border)||{},[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)(),[m,f]=(0,s.useState)(),g=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["px","em","rem"]});return(0,s.createElement)(p.__experimentalUnitControl,{value:r,label:(0,h.__)("Width"),min:0,onChange:e=>{let s={...n,border:{...null==n?void 0:n.border,width:e}},p=t;const h=0===parseFloat(e),g=0===parseFloat(r);h&&!g&&(d(t),f(l),c(i),p=void 0,s.border.color=void 0,s.border.style="none"),!h&&g&&("none"===i&&(s.border.style=a),void 0===t&&(p=u,s.border.color=m)),void 0!==e&&""!==e||(s=Ko(s)),o({borderColor:p,style:s})},units:g})},Ym="__experimentalBorder";function Zm(e){const{clientId:t}=e,n=Jm(e),o=Xm(e.name),l=po("border.color")&&Xm(e.name,"color"),i=po("border.radius")&&Xm(e.name,"radius"),a=po("border.style")&&Xm(e.name,"style"),c=po("border.width")&&Xm(e.name,"width");if(n||!o)return null;const u=(0,r.getBlockSupport)(e.name,[Ym,"__experimentalDefaultControls"]),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var o;return{...n,...t,style:{...n.style,border:{...null===(o=n.style)||void 0===o?void 0:o.border,[e]:void 0}}}}};return(0,s.createElement)(Jo,{__experimentalGroup:"border"},c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.width)}(e),label:(0,h.__)("Width"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"width")})}(e),isShownByDefault:null==u?void 0:u.width,resetAllFilter:d("width"),panelId:t},(0,s.createElement)(qm,e)),a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.style)}(e),label:(0,h.__)("Style"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"style")})}(e),isShownByDefault:null==u?void 0:u.style,resetAllFilter:d("style"),panelId:t},(0,s.createElement)(Km,e)),l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{attributes:{borderColor:n,style:o}}=e;return!!n||!(null==o||null===(t=o.border)||void 0===t||!t.color)}(e),label:(0,h.__)("Color"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({borderColor:void 0,style:ef(o,"color")})}(e),isShownByDefault:null==u?void 0:u.color,resetAllFilter:d("color",{borderColor:void 0}),panelId:t},(0,s.createElement)(wm,e)),i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,h.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ef(o,"radius")})}(e),isShownByDefault:null==u?void 0:u.radius,resetAllFilter:d("radius"),panelId:t},(0,s.createElement)(Hm,e)))}function Xm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==s.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Ym);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function Qm(e){const t=(0,r.getBlockSupport)(e,Ym);return null==t?void 0:t.__experimentalSkipSerialization}const Jm=()=>[!po("border.color"),!po("border.radius"),!po("border.style"),!po("border.width")].every(Boolean);function ef(e,t){return Ko({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function tf(e){if(e)return`has-${e}-gradient-background`}function nf(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function of(e,t){return(0,u.find)(e,["gradient",t])}function rf(e,t){const n=of(e,t);return n&&n.slug}const lf={};function sf(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Gn(),o=po("color.gradients")||lf,r=(0,s.useMemo)((()=>[...(null==o?void 0:o.custom)||[],...(null==o?void 0:o.theme)||[],...(null==o?void 0:o.default)||[]]),[o]),{gradient:l,customGradient:i}=(0,m.useSelect)((o=>{const{getBlockAttributes:r}=o(zn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:a}=(0,m.useDispatch)(zn),c=(0,s.useCallback)((o=>{const l=rf(r,o);a(n,l?{[e]:l,[t]:void 0}:{[e]:void 0,[t]:o})}),[r,n,a]),u=tf(l);let d;return d=l?nf(r,l):i,{gradientClass:u,gradientValue:d,setGradient:c}}
59
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
60
- const af=(0,h.__)("(%s: color %s)"),cf=(0,h.__)("(%s: gradient %s)"),uf=["colors","disableCustomColors","gradients","disableCustomGradients"],df=e=>{let{colors:t,gradients:n,settings:o}=e;return o.map(((e,o)=>{let r,{colorValue:l,gradientValue:i,label:a,colors:c,gradients:u}=e;if(!l&&!i)return null;if(l){const e=Em(c||t,l);r=(0,h.sprintf)(af,a.toLowerCase(),e&&e.name||l)}else{const e=of(u||n,l);r=(0,h.sprintf)(cf,a.toLowerCase(),e&&e.name||i)}return(0,s.createElement)(p.ColorIndicator,{key:o,colorValue:l||i,"aria-label":r})}))},pf=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:a,settings:d,title:m,showTitle:f=!0,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:v,enableAlpha:b,...k}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(d,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const _=(0,s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},m,(0,s.createElement)(df,{colors:n,gradients:o,settings:d}));let y,E;return v&&(y=(0,h.isRTL)()?"bottom right":"bottom left",E={__unstableForcePosition:!0}),(0,s.createElement)(p.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",t),title:f?_:void 0},k),(0,s.createElement)(p.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,className:"block-editor-panel-color-gradient-settings__item-group"},d.map(((e,t)=>(0,s.createElement)(p.Dropdown,{position:y,popoverProps:E,className:"block-editor-panel-color-gradient-settings__dropdown",key:t,contentClassName:"block-editor-panel-color-gradient-settings__dropdown-content",renderToggle:t=>{var n;let{isOpen:o,onToggle:r}=t;return(0,s.createElement)(p.__experimentalItem,{onClick:r,className:c()("block-editor-panel-color-gradient-settings__item",{"is-open":o})},(0,s.createElement)(p.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(p.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:null!==(n=e.gradientValue)&&void 0!==n?n:e.colorValue}),(0,s.createElement)(p.FlexItem,null,e.label)))},renderContent:()=>(0,s.createElement)(bm,i({showTitle:!1,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:v,enableAlpha:b},e))})))),!!a&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalSpacer,{marginY:4})," ",a))},mf=e=>{const t=km();return t.colors=po("color.palette"),t.gradients=po("color.gradients"),(0,s.createElement)(pf,i({},t,e))},ff=e=>{const t=_m();return(0,s.createElement)(pf,i({},t,e))};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
61
- var hf=e=>(0,u.every)(uf,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(pf,e):e.__experimentalHasMultipleOrigins?(0,s.createElement)(ff,e):(0,s.createElement)(mf,e);function gf(e){let{colordBackgroundColor:t,colordTextColor:n,backgroundColor:o,textColor:r}=e;const l=t.brightness()<n.brightness()?(0,h.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,h.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,s.useEffect)((()=>{(0,Nt.speak)((0,h.__)("This color combination may be hard for people to read."))}),[o,r]),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(p.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},l))}Lc([Ac,Fc]);var vf=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fontSize:r,isLargeText:l,textColor:i}=e;if(!t&&!n||!i&&!o)return null;const a=Mc(t||n),c=Mc(i||o);return 1!==a.alpha()||1!==c.alpha()||c.isReadable(a,{level:"AA",size:l||!1!==l&&r>=24?"large":"small"})?null:(0,s.createElement)(gf,{backgroundColor:t,textColor:i,colordBackgroundColor:a,colordTextColor:c})};function bf(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function kf(e){let{settings:t,clientId:n,enableContrastChecking:o=!0,showTitle:r=!0}=e;const[l,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),u=wa(n);return(0,s.useEffect)((()=>{if(!o)return;if(!u.current)return;c(bf(u.current).color);let e=u.current,t=bf(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=bf(e).backgroundColor;i(t)})),(0,s.createElement)(Jo,null,(0,s.createElement)(hf,{title:(0,h.__)("Color"),initialOpen:!1,settings:t,showTitle:r,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},o&&(0,s.createElement)(vf,{backgroundColor:l,textColor:a})))}const _f="color",yf={},Ef=e=>{const t=(0,r.getBlockSupport)(e,_f);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Cf=e=>{const t=(0,r.getBlockSupport)(e,_f);return null==t?void 0:t.__experimentalSkipSerialization},Sf=e=>{const t=(0,r.getBlockSupport)(e,_f);return(0,u.isObject)(t)&&!!t.gradients};function wf(e,t,n){var o,r,l,i,s,a;if(!Ef(t)||Cf(t))return e;const u=Sf(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,h=Cm("background-color",d),g=tf(m),v=Cm("color",p),b=c()(e.className,v,g,{[h]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!h),"has-text-color":p||(null==f||null===(r=f.color)||void 0===r?void 0:r.text),"has-background":d||(null==f||null===(l=f.color)||void 0===l?void 0:l.background)||u&&(m||(null==f||null===(i=f.color)||void 0===i?void 0:i.gradient)),"has-link-color":null==f||null===(s=f.elements)||void 0===s||null===(a=s.link)||void 0===a?void 0:a.color});return e.className=b||void 0,e}const Bf=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?ym(e,n[1]).color:t};function If(e){var t,n,o,l,i,a,c,d,p,m;const{name:f,attributes:g}=e,v=po("color.palette.custom"),b=po("color.palette.theme"),k=po("color.palette.default"),_=(0,s.useMemo)((()=>[...v||[],...b||[],...k||[]]),[v,b,k]),y=po("color.gradients")||yf,E=po("color.custom"),C=po("color.customGradient"),S=po("color.background"),w=po("color.link"),B=po("color.text"),I=E||!b||(null==b?void 0:b.length)>0,x=C||!(null!=y&&y.theme)||(null==y||null===(t=y.theme)||void 0===t?void 0:t.length)>0,T=(0,s.useMemo)((()=>[...(null==y?void 0:y.custom)||[],...(null==y?void 0:y.theme)||[],...(null==y?void 0:y.default)||[]]),[y]),N=(0,s.useRef)(g);if((0,s.useEffect)((()=>{N.current=g}),[g]),!Ef(f))return null;const P=(e=>{if("web"!==s.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,_f);return(0,u.isObject)(t)&&!!t.link})(f)&&w&&I,M=(e=>{const t=(0,r.getBlockSupport)(e,_f);return t&&!1!==t.text})(f)&&B&&I,R=(e=>{const t=(0,r.getBlockSupport)(e,_f);return t&&!1!==t.background})(f)&&S&&I,L=Sf(f)&&x;if(!(P||M||R||L))return null;const{style:A,textColor:D,backgroundColor:O,gradient:F}=g;let z;if(L&&F)z=nf(T,F);else if(L){var V;z=null==A||null===(V=A.color)||void 0===V?void 0:V.gradient}const H=t=>n=>{var o,r;const l=Em(_,n),i=t+"Color",s={...N.current.style,color:{...null===(o=N.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},a=null!=l&&l.slug?l.slug:void 0,c={style:Ko(s),[i]:a};e.setAttributes(c),N.current={...N.current,...c}};return(0,s.createElement)(kf,{enableContrastChecking:!("web"!==s.Platform.OS||F||null!=A&&null!==(n=A.color)&&void 0!==n&&n.gradient),clientId:e.clientId,settings:[...M?[{label:(0,h.__)("Text color"),onColorChange:H("text"),colorValue:ym(_,D,null==A||null===(o=A.color)||void 0===o?void 0:o.text).color}]:[],...R||L?[{label:(0,h.__)("Background color"),onColorChange:R?H("background"):void 0,colorValue:ym(_,O,null==A||null===(l=A.color)||void 0===l?void 0:l.background).color,gradientValue:z,onGradientChange:L?t=>{const n=rf(T,t);let o;if(n){var r,l,i;const e={...null===(r=N.current)||void 0===r?void 0:r.style,color:{...null===(l=N.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:Ko(e),gradient:n}}else{var s,a,c;const e={...null===(s=N.current)||void 0===s?void 0:s.style,color:{...null===(a=N.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:Ko(e),gradient:void 0}}e.setAttributes(o),N.current={...N.current,...o}}:void 0}]:[],...P?[{label:(0,h.__)("Link Color"),onColorChange:t=>{const n=Em(_,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=Ko(function(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},["elements","link","color","text"],n,u.clone)}(A,0,o));e.setAttributes({style:r})},colorValue:Bf(_,null==A||null===(i=A.elements)||void 0===i||null===(a=i.link)||void 0===a||null===(c=a.color)||void 0===c?void 0:c.text),clearable:!(null==A||null===(d=A.elements)||void 0===d||null===(p=d.link)||void 0===p||null===(m=p.color)||void 0===m||!m.text)}]:[]]})}const xf=(0,d.createHigherOrderComponent)((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:l,textColor:a}=r,c=po("color.palette.custom")||[],u=po("color.palette.theme")||[],d=po("color.palette.default")||[],p=(0,s.useMemo)((()=>[...c||[],...u||[],...d||[]]),[c,u,d]);if(!Ef(o)||Cf(o))return(0,s.createElement)(e,t);const m={};var f,h;a&&(m.color=null===(f=ym(p,a))||void 0===f?void 0:f.color),l&&(m.backgroundColor=null===(h=ym(p,l))||void 0===h?void 0:h.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...m,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,s.createElement)(e,i({},t,{wrapperProps:g}))}));(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Ef(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Sf(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",wf),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Ef(e)||Cf(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),wf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",xf);const Tf=[{name:(0,h.__)("Regular"),value:"normal"},{name:(0,h.__)("Italic"),value:"italic"}],Nf=[{name:(0,h.__)("Thin"),value:"100"},{name:(0,h.__)("Extra Light"),value:"200"},{name:(0,h.__)("Light"),value:"300"},{name:(0,h.__)("Regular"),value:"400"},{name:(0,h.__)("Medium"),value:"500"},{name:(0,h.__)("Semi Bold"),value:"600"},{name:(0,h.__)("Bold"),value:"700"},{name:(0,h.__)("Extra Bold"),value:"800"},{name:(0,h.__)("Black"),value:"900"}],Pf=(e,t)=>e?t?(0,h.__)("Appearance"):(0,h.__)("Font style"):(0,h.__)("Font weight");function Mf(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,a=Pf(n,o),c={key:"default",name:(0,h.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,s.useMemo)((()=>n&&o?(()=>{const e=[c];return Tf.forEach((t=>{let{name:n,value:o}=t;Nf.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,h.sprintf)(
62
  /* translators: 1: Font weight name. 2: Font style name. */
63
  (0,h.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[c];return Tf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return Nf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||u[0];return i&&(0,s.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control",label:a,describedBy:d?n?o?(0,h.sprintf)(// translators: %s: Currently selected font appearance.
64
  (0,h.__)("Currently selected font appearance: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font style.
65
  (0,h.__)("Currently selected font style: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font weight.
66
- (0,h.__)("Currently selected font weight: %s"),d.name):(0,h.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}function Rf(e){let{value:t,onChange:n}=e;const o=function(e){return void 0!==e&&""!==e}(t),r=o?t:"";return(0,s.createElement)("div",{className:"block-editor-line-height-control"},(0,s.createElement)(p.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:t}=e;t!==ga.ZERO||o||(e.preventDefault(),n("0"))},onChange:e=>{if(o)return void n(e);let t=e;switch(e){case"0.1":t=1.6;break;case"0":t=1.4}n(t)},label:(0,h.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:r,min:0}))}const Lf="typography.lineHeight";function Af(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Rf,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:Ko(t)})}})}function Df(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!po("typography.lineHeight");return!(0,r.hasBlockSupport)(e,Lf)||t}const Of="typography.__experimentalFontStyle",Ff="typography.__experimentalFontWeight";function zf(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!Vf(e),i=!Hf(e),a=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,s.createElement)(Mf,{onChange:e=>{r({style:Ko({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:c}})}function Vf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Of),n=po("typography.fontStyle");return!t||!n}function Hf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Ff),n=po("typography.fontWeight");return!t||!n}function Uf(e){const t=Vf(e),n=Hf(e);return t&&n}function Gf(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=po("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const a=[{value:"",label:(0,h.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,s.createElement)(p.SelectControl,i({label:(0,h.__)("Font family"),options:a,value:t,onChange:n,labelPosition:"top"},r))}const Wf="typography.__experimentalFontFamily";function $f(e,t,n){if(!(0,r.hasBlockSupport)(t,Wf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;if(null==n||!n.fontFamily)return e;const o=new(ip())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function jf(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=po("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,s.createElement)(Gf,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function Kf(e){let{name:t}=e;const n=po("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,Wf)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Wf)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",$f),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Wf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),$f(o,e,n)},e}));const qf=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Yf(e,t){return(0,u.find)(e,{size:t})||{size:t}}function Zf(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Xf=function(e){const t=po("typography.fontSizes"),n=!po("typography.customFontSize");return(0,s.createElement)(p.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Qf="typography.fontSize";function Jf(e,t,n){if(!(0,r.hasBlockSupport)(t,Qf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(ip())(e.className);o.add(Zf(n.fontSize));const l=o.value;return e.className=l||void 0,e}function eh(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=po("typography.fontSizes"),a=qf(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,s.createElement)(Xf,{onChange:e=>{const t=Yf(i,e).slug;l({style:Ko({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function th(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=po("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,Qf)||!n}const nh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=po("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,Qf)||(0,r.hasBlockSupport)(i,"typography.__experimentalSkipSerialization")||!a||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,s.createElement)(e,t);const d=qf(l,a,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,p)}),"withFontSizeInlineStyles");(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Qf)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Jf),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Qf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Jf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",nh);var oh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),rh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const lh=[{name:(0,h.__)("Underline"),value:"underline",icon:oh},{name:(0,h.__)("Strikethrough"),value:"line-through",icon:rh}];function ih(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,h.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},lh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const sh="typography.__experimentalTextDecoration";function ah(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(ih,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:Ko({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function ch(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,sh),n=po("typography.textDecoration");return t||!n}var uh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),dh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),ph=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const mh=[{name:(0,h.__)("Uppercase"),value:"uppercase",icon:uh},{name:(0,h.__)("Lowercase"),value:"lowercase",icon:dh},{name:(0,h.__)("Capitalize"),value:"capitalize",icon:ph}];function fh(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,h.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},mh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const hh="typography.__experimentalTextTransform";function gh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(fh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:Ko({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function vh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,hh),n=po("typography.textTransform");return t||!n}function bh(e){let{value:t,onChange:n,__unstableInputWidth:o="60px"}=e;const r=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:r,onChange:n})}const kh="typography.__experimentalLetterSpacing";function _h(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(bh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:Ko({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function yh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,kh),n=po("typography.letterSpacing");return t||!n}const Eh="typography",Ch=[Lf,Qf,Of,Ff,Wf,sh,hh,kh];function Sh(e){const{clientId:t}=e,n=Kf(e),o=th(e),l=Uf(e),i=Df(e),a=ch(e),c=vh(e),u=yh(e),d=!Vf(e),m=!Hf(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Uf(e),th(e),Df(e),Kf(e),ch(e),vh(e),yh(e)];return t.filter(Boolean).length===t.length}(e),g=wh(e.name);if(f||!g)return null;const v=(0,r.getBlockSupport)(e.name,[Eh,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,s.createElement)(Jo,{__experimentalGroup:"typography"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,h.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,s.createElement)(jf,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,h.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:Ko({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,s.createElement)(eh,e)),!l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:Pf(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,s.createElement)(zf,e)),!i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,h.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,s.createElement)(Af,e)),!a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,h.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,s.createElement)(ah,e)),!c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,h.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,s.createElement)(gh,e)),!u&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,h.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,s.createElement)(_h,e)))}const wh=e=>Ch.some((t=>(0,r.hasBlockSupport)(e,t)));function Bh(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.blockGap)}function Ih(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!po("spacing.blockGap");return!Bh(e)||t}function xh(e){var t;const{clientId:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["%","px","em","rem","vw"]}),i=wa(n);return Ih(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:e=>{var t;const n={...o,spacing:{...null==o?void 0:o.spacing,blockGap:e}};r({style:Ko(n)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;i.current&&l&&(null===(s=i.current.parentNode)||void 0===s||s.replaceChild(i.current,i.current))},units:l,value:null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap})),native:null})}function Th(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.margin)}function Nh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!po("spacing.margin"),n=!Hh(e,"margin");return!Th(e)||t||n}function Ph(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["%","px","em","rem","vw"]}),i=Vh(n,"margin"),a=i&&i.some((e=>Oh.includes(e)));return Nh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:Ko(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:Ko(t)})},label:(0,h.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}function Mh(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.padding)}function Rh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!po("spacing.padding"),n=!Hh(e,"padding");return!Mh(e)||t||n}function Lh(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["%","px","em","rem","vw"]}),i=Vh(n,"padding"),a=i&&i.some((e=>Oh.includes(e)));return Rh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:Ko(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:Ko(t)})},label:(0,h.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}const Ah="spacing",Dh=["top","right","bottom","left"],Oh=["vertical","horizontal"];function Fh(e){const t=Ih(e),n=Rh(e),o=Nh(e),l=zh(e),i=(a=e.name,"web"===s.Platform.OS&&(Bh(a)||Mh(a)||Th(a)));var a;if(l||!i)return null;const c=(0,r.getBlockSupport)(e.name,[Ah,"__experimentalDefaultControls"]),u=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,s.createElement)(Jo,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:u("padding"),isShownByDefault:null==c?void 0:c.padding,panelId:e.clientId},(0,s.createElement)(Lh,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Ko({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:u("margin"),isShownByDefault:null==c?void 0:c.margin,panelId:e.clientId},(0,s.createElement)(Ph,e)),!t&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:u("blockGap"),isShownByDefault:null==c?void 0:c.blockGap,panelId:e.clientId},(0,s.createElement)(xh,e)))}const zh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ih(e),n=Rh(e),o=Nh(e);return t&&n&&o};function Vh(e,t){const n=(0,r.getBlockSupport)(e,Ah);if(n&&"boolean"!=typeof n[t])return n[t]}function Hh(e,t){const n=Vh(e,t);return!(n&&n.some((e=>Dh.includes(e)))&&n.some((e=>Oh.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const Uh=[...Ch,Ym,_f,Ah],Gh=e=>Uh.some((t=>(0,r.hasBlockSupport)(e,t))),Wh="var:";function $h(e){return(0,u.startsWith)(e,Wh)?`var(--wp--${e.slice(Wh.length).split("|").join("--")})`:e}function jh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return Object.keys(r.__EXPERIMENTAL_STYLE_PROPERTY).forEach((n=>{const o=r.__EXPERIMENTAL_STYLE_PROPERTY[n].value,l=r.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;if((0,u.has)(e,o)&&"elements"!==(0,u.first)(o)){const r=(0,u.get)(e,o);l&&!(0,u.isString)(r)?Object.entries(l).forEach((e=>{const[n,o]=e,l=(0,u.get)(r,[o]);l&&(t[n]=$h(l))})):t[n]=$h((0,u.get)(e,o))}})),t}const Kh={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[_f],"typography.__experimentalSkipSerialization":[Eh],[`${Ah}.__experimentalSkipSerialization`]:["spacing"]},qh={...Kh,[`${Ah}`]:["spacing.blockGap"]};function Yh(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qh;if(!Gh(t))return e;let{style:l}=n;return(0,u.forEach)(o,((e,n)=>{(0,r.getBlockSupport)(t,n)&&(l=(0,u.omit)(l,e))})),e.style={...jh(l),...e.style},e}const Zh=(0,d.createHigherOrderComponent)((e=>t=>{const n=Wn();return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(If,t),(0,s.createElement)(Sh,t),(0,s.createElement)(Zm,t),(0,s.createElement)(Fh,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),Xh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,a=`wp-elements-${(0,d.useInstanceId)(e)}`,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const o=jh(t);return(0,u.isEmpty)(o)?"":[`.${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(a,null===(o=t.attributes.style)||void 0===o?void 0:o.elements),m=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,l&&m&&(0,s.createPortal)((0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:p}}),m),(0,s.createElement)(e,i({},t,{className:l?c()(t.className,a):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Gh(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Yh),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Gh(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Yh(o,e,n,Kh)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",Zh),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Xh);var Qh=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}=e;return(0,s.createElement)(p.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,h.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==ga.DOWN||(e.preventDefault(),n())},label:(0,h.__)("Apply duotone filter"),icon:(0,s.createElement)(p.DuotoneSwatch,{values:l})})},renderContent:()=>(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Duotone")},(0,s.createElement)("div",{className:"block-editor-duotone-control__description"},(0,h.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(p.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}))})};const Jh=[];function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Mc(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function tg(e){let{selector:t,id:n,values:o}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:n},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"})))),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:r}}))}function ng(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=po("color.duotone")||Jh,a=po("color.palette")||Jh,c=!po("color.custom"),u=!po("color.customDuotone")||0===(null==a?void 0:a.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Qh,{duotonePalette:i,colorPalette:a,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Lc([Ac]);const og=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(ng,t))}),"withDuotoneControls"),rg=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const a=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!a||!u)return(0,s.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,a),f=c()(null==t?void 0:t.className,p),h=(0,s.useContext)(pm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,h&&(0,s.createPortal)((0,s.createElement)(tg,{selector:m,id:p,values:eg(u)}),h),(0,s.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",og),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",rg);const lg="__experimentalLayout";function ig(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=po("layout"),a=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,lg,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:g}=c;if(!d)return null;const v=l||g||{},{inherit:b=!1,type:k="default"}=v;if("default"===k&&!a)return null;const _=Bo(k),y=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Jo,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Layout")},f&&!!i&&(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Inherit default layout"),checked:!!b,onChange:()=>t({layout:{inherit:!b}})}),!b&&u&&(0,s.createElement)(sg,{type:k,onChange:e=>t({layout:{type:e}})}),!b&&_&&(0,s.createElement)(_.inspectorControls,{layout:v,onChange:y,layoutBlockSupport:c}))),!b&&_&&(0,s.createElement)(_.toolBarControls,{layout:v,onChange:y,layoutBlockSupport:c}))}function sg(e){let{type:t,onChange:n}=e;return(0,s.createElement)(p.ButtonGroup,null,wo.map((e=>{let{name:o,label:r}=e;return(0,s.createElement)(p.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const ag=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,lg)&&(0,s.createElement)(ig,i({key:"layout"},t)),(0,s.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),cg=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,lg),a=(0,d.useInstanceId)(e),u=po("layout")||{},p=(0,s.useContext)(pm.__unstableElementContext),{layout:m}=o,{default:f}=(0,r.getBlockSupport)(n,lg)||{},h=null!=m&&m.inherit?u:m||f||{},g=c()(null==t?void 0:t.className,{[`wp-container-${a}`]:l});return(0,s.createElement)(s.Fragment,null,l&&p&&(0,s.createPortal)((0,s.createElement)(Po,{selector:`.wp-container-${a}`,layout:h}),p),(0,s.createElement)(e,i({},t,{className:g})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,lg)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",cg),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",ag);const ug=[];function dg(e){var t;let{borderColor:n,style:o}=e;const r=(null==o?void 0:o.border)||{},l=Cm("border-color",n);return{className:c()({[l]:!!l,"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color)})||void 0,style:jh({border:r})}}function pg(e){const t=po("color.palette")||ug,n=dg(e);if(e.borderColor){const o=ym(t,e.borderColor);n.style.borderColor=o.color}return n}function mg(e){var t,n,o,r,l,i;const{backgroundColor:s,textColor:a,gradient:u,style:d}=e,p=Cm("background-color",s),m=Cm("color",a),f=tf(u),h=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!h&&!!p,"has-text-color":a||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":s||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:jh({color:(null==d?void 0:d.color)||{}})}}const fg={};function hg(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=po("color.palette.custom")||[],l=po("color.palette.theme")||[],i=po("color.palette.default")||[],a=po("color.gradients")||fg,c=(0,s.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),u=(0,s.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),d=mg(e);if(t){const e=ym(c,t);d.style.backgroundColor=e.color}if(o&&(d.style.background=nf(u,o)),n){const e=ym(c,n);d.style.color=e.color}return d}function gg(e){const{style:t}=e;return{style:jh({spacing:(null==t?void 0:t.spacing)||{}})}}function vg(e){const[t,n]=(0,s.useState)(e);return(0,s.useEffect)((()=>{e&&n(e)}),[e]),t}const bg=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),kg=()=>(0,d.createHigherOrderComponent)((e=>t=>{const n=po("color.palette.custom"),o=po("color.palette.theme"),r=po("color.palette.default"),l=(0,s.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,s.createElement)(e,i({},t,{colors:l}))}),"withEditorColorPalette");function _g(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Mc(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=(0,u.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=Em(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=ym(r,o[l],o[`custom${(0,u.upperFirst)(l)}`]),s=t[l];return(null==s?void 0:s.color)===i.color&&s?e[l]=s:e[l]={...i,class:Cm(n,i.slug)},e}),{})}render(){return(0,s.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function yg(e){return function(){const t=bg(e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(0,d.createHigherOrderComponent)(_g(o,t),"withCustomColors")}}function Eg(){const e=kg();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,d.createHigherOrderComponent)(_g(n,e),"withColors")}const Cg=[];var Sg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=(0,u.reduce)(t,((e,t)=>(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=po("typography.fontSizes")||Cg;return(0,s.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=qf(r,l,n[t]);return e[o]={...i,class:Zf(l)},e}),{});return{...t,...i}}render(){return(0,s.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},wg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),Bg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),Ig=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const xg=[{icon:wg,title:(0,h.__)("Align text left"),align:"left"},{icon:Bg,title:(0,h.__)("Align text center"),align:"center"},{icon:Ig,title:(0,h.__)("Align text right"),align:"right"}],Tg={position:"bottom right",isAlternate:!0};var Ng=function(e){let{value:t,onChange:n,alignmentControls:o=xg,label:r=(0,h.__)("Align"),describedBy:l=(0,h.__)("Change text alignment"),isCollapsed:a=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const m=(0,u.find)(o,(e=>e.align===t)),f=c?p.ToolbarGroup:p.ToolbarDropdownMenu,g=c?{isCollapsed:a}:{};return(0,s.createElement)(f,i({icon:m?m.icon:(0,h.isRTL)()?Ig:wg,label:r,toggleProps:{describedBy:l},popoverProps:Tg,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:a?"menuitemradio":void 0,onClick:d(n)}}))},g))};function Pg(e){return(0,s.createElement)(Ng,i({},e,{isToolbar:!1}))}function Mg(e){return(0,s.createElement)(Ng,i({},e,{isToolbar:!0}))}var Rg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(zn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=wu(t,u.noop),i=(0,s.useMemo)((()=>(e.trim()?Yu(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]);return[(0,s.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ha,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}};const Lg=[];function Ag(e){let{completers:t=Lg}=e;const{name:n}=Gn();return(0,s.useMemo)((()=>{let e=t;return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([Rg])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Dg=function(e){return(0,s.createElement)(p.Autocomplete,i({},e,{completers:Ag(e)}))},Og=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Fg=function(e){let{isActive:t,label:n=(0,h.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,s.createElement)(p.ToolbarButton,{isActive:t,icon:Og,label:n,onClick:()=>o(!t),disabled:r})},zg=function(e){const{label:t=(0,h.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",a=`${i}__popover`;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:i,popoverProps:{className:a,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,s.createElement)(p.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==ga.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,s.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},Vg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Hg=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,m.useDispatch)(zn),{clientId:r,parents:l,hasSelection:i}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(zn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),a=t||(0,h.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,h.__)("Block breadcrumb")},(0,s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},a),!i&&a,!!r&&(0,s.createElement)(So,{icon:Vg,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,s.createElement)(Ld,{clientId:e})),(0,s.createElement)(So,{icon:Vg,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(Ld,{clientId:r})))};function Ug(e){let{clientId:t,tagName:n="div",wrapperProps:o,className:r}=e;const[l,a]=(0,s.useState)(!0),[u,d]=(0,s.useState)(!1),{isParentSelected:p,hasChildSelected:f,isDraggingBlocks:h,isParentHighlighted:g}=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=e(zn);return{isParentSelected:n(t),hasChildSelected:o(t,!0),isDraggingBlocks:r(),isParentHighlighted:l(t)}}),[t]),v=c()("block-editor-block-content-overlay",null==o?void 0:o.className,r,{"overlay-active":l,"parent-highlighted":g,"is-dragging-blocks":h});return(0,s.useEffect)((()=>{p||f||l||a(!0),p&&!u&&l&&a(!1),f&&l&&a(!1)}),[p,f,l,u]),(0,s.createElement)(n,i({},o,{className:v,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseUp:l?()=>a(!1):void 0}),null==o?void 0:o.children)}const Gg=()=>(0,s.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Wg=e=>{let{style:t,className:n}=e;return(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,s.createElement)(Gg,null)))},$g=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,h.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==ga.DOWN||(e.preventDefault(),o())},icon:(0,s.createElement)(n,null,(0,s.createElement)(t,null,(0,s.createElement)(Wg,null)))}))}};var jg=e=>{let{children:t,...n}=e;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:$g(n),renderContent:()=>t})},Kg=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const qg=ta(p.__experimentalTreeGridRow);function Yg(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:a,path:u,...d}=e;const p=ra({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,s.createElement)(qg,i({ref:p,className:c()("block-editor-list-view-leaf",a),level:o,positionInSet:n,setSize:r},d),l)}function Zg(e){let{onClick:t}=e;return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)(So,{icon:Vg}))}var Xg=(0,s.forwardRef)((function e(t,n){let{className:o,block:{clientId:r},isSelected:l,onClick:i,onToggleExpanded:a,position:u,siblingBlockCount:m,level:f,tabIndex:g,onFocus:v,onDragStart:b,onDragEnd:k,draggable:_}=t;const y=Rd(r),E=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,C=((e,t,n)=>(0,h.sprintf)(
67
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
68
- (0,h.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,m,f);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{className:c()("block-editor-list-view-block-select-button",o),onClick:i,onKeyDown:function(e){e.keyCode!==ga.ENTER&&e.keyCode!==ga.SPACE||(e.preventDefault(),i(e))},"aria-describedby":E,ref:n,tabIndex:g,onFocus:v,onDragStart:e=>{e.dataTransfer.clearData(),b(e)},onDragEnd:k,draggable:_,href:`#block-${r}`},(0,s.createElement)(Zg,{onClick:a}),(0,s.createElement)(Ha,{icon:null==y?void 0:y.icon,showColors:!0}),(0,s.createElement)(Ld,{clientId:r}),(null==y?void 0:y.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},y.anchor),l&&(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("(selected block)"))),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:E},C))})),Qg=(0,s.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:a,siblingBlockCount:u,level:d,...p}=e;const{clientId:f}=r,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(zn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),v=h&&g===f,b=c()("block-editor-list-view-block-contents",{"is-dropping-before":v});return(0,s.createElement)(Ad,{clientIds:[r.clientId]},(e=>{let{draggable:c,onDragStart:m,onDragEnd:f}=e;return(0,s.createElement)(Xg,i({ref:t,className:b,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:a,siblingBlockCount:u,level:d,draggable:c,onDragStart:m,onDragEnd:f},p))}))}));const Jg=(0,s.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),ev=()=>(0,s.useContext)(Jg);var tv=(0,s.memo)((function(e){let{block:t,isDragged:n,isSelected:o,isBranchSelected:r,selectBlock:l,position:i,level:a,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:g}=e;const v=(0,s.useRef)(null),[b,k]=(0,s.useState)(!1),{clientId:_}=t,{toggleBlockHighlight:y}=(0,m.useDispatch)(zn),{__experimentalFeatures:E,__experimentalPersistentListViewFeatures:C,__experimentalHideContainerBlockActions:S,isTreeGridMounted:w,expand:B,collapse:I}=ev(),x=f&&d>0,T=c()("block-editor-list-view-block__mover-cell",{"is-visible":b||o}),N=c()("block-editor-list-view-block__menu-cell",{"is-visible":b||o});(0,s.useEffect)((()=>{C&&!w&&o&&v.current.focus()}),[]);const P=C?y:()=>{},M=(0,s.useCallback)((()=>{k(!0),P(_,!0)}),[_,k,P]),R=(0,s.useCallback)((()=>{k(!1),P(_,!1)}),[_,k,P]),L=(0,s.useCallback)((e=>{e.stopPropagation(),l(_)}),[_,l]),A=(0,s.useCallback)((e=>{e.stopPropagation(),!0===g?I(_):!1===g&&B(_)}),[_,B,I,g]),D=E&&(!S||S&&a>1),O=E&&!D;let F;x?F=2:O&&(F=3);const z=c()({"is-selected":o,"is-branch-selected":C&&r,"is-dragging":n,"has-single-cell":O});return(0,s.createElement)(Yg,{className:z,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:a,position:i,rowCount:u,path:h,id:`list-view-block-${_}`,"data-block":_,isExpanded:g},(0,s.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:F,ref:v},(e=>{let{ref:n,tabIndex:r,onFocus:l}=e;return(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(Qg,{block:t,onClick:L,onToggleExpanded:A,isSelected:o,position:i,siblingBlockCount:d,level:a,ref:n,tabIndex:r,onFocus:l}))})),x&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalTreeGridCell,{className:T,withoutGridItem:!0},(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(jd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})),(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Kd,{orientation:"vertical",clientIds:[_],ref:t,tabIndex:n,onFocus:o})})))),D&&(0,s.createElement)(p.__experimentalTreeGridCell,{className:N},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Fp,{clientIds:[_],icon:_p,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L})})))}));function nv(e,t,n){var o;return(null==n?void 0:n.includes(e.clientId))?0:null===(o=t[e.clientId])||void 0===o||o?1+e.innerBlocks.reduce(ov(t,n),0):1}const ov=(e,t)=>(n,o)=>{var r;return(null==t?void 0:t.includes(o.clientId))?n:(null===(r=e[o.clientId])||void 0===r||r)&&o.innerBlocks.length>0?n+nv(o,e,t):n+1};function rv(e){const{blocks:t,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:d=0,fixedListWindow:p}=e,{expandedState:f,draggedClientIds:h,__experimentalPersistentListViewFeatures:g}=ev(),v=(0,u.compact)(t),b=v.length;let k=d;return(0,s.createElement)(s.Fragment,null,v.map(((e,t)=>{var d;const{clientId:_,innerBlocks:y}=e;t>0&&(k+=nv(v[t-1],f,h));const E=g,{itemInView:C}=p,S=!E||C(k),w=t+1,B=a.length>0?`${a}_${w}`:`${w}`,I=r&&!!y&&!!y.length,x=I?null===(d=f[_])||void 0===d||d:void 0,T=!(null==h||!h.includes(_)),N=T||S,P=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(_,l),M=c||P&&I;return(0,s.createElement)(m.AsyncModeProvider,{key:_,value:!P},N&&(0,s.createElement)(tv,{block:e,selectBlock:n,isSelected:P,isBranchSelected:M,isDragged:T,level:i,position:w,rowCount:b,siblingBlockCount:b,showBlockMovers:o,path:B,isExpanded:x,listPosition:k}),!N&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,s.createElement)(rv,{blocks:y,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,level:i+1,path:B,listPosition:k+1,fixedListWindow:p,isBranchSelected:M,selectedClientIds:l}))})))}rv.defaultProps={selectBlock:()=>{}};var lv=(0,s.memo)(rv);function iv(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(0,s.useMemo)((()=>t.current?[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]:[]),[o,r]),c=a||i,u=(0,s.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,s.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,s.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===l?{...o,top:t.top,bottom:t.top}:"bottom"===l||"inside"===l?{...o,top:t.bottom,bottom:t.bottom}:{}}),[c,l,u]);return c?(0,s.createElement)(p.Popover,{noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function sv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const av=["top","bottom"];const cv=()=>{},uv=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};var dv=(0,s.forwardRef)((function(e,t){let{blocks:n,onSelect:o=cv,__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,showNestedBlocks:c,showBlockMovers:u,...f}=e;const{clientIdsTree:g,draggedClientIds:v,selectedClientIds:b}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(zn);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(n),{selectBlock:k}=(0,m.useDispatch)(zn),{visibleBlockCount:_}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(zn),o=(null==v?void 0:v.length)>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),y=(0,s.useCallback)((e=>{k(e),o(e)}),[k,o]),[E,C]=(0,s.useReducer)(uv,{}),{ref:S,target:w}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,m.useSelect)(zn),[l,i]=(0,s.useState)(),{rootClientId:a,blockIndex:c}=l||{},u=Jp(a,c),p=o(),f=(0,d.useThrottle)((0,s.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==p||!p.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=tm(t,s,av),u=sv(t,s);if(void 0===r||a<r||u){r=a;const t=e.indexOf(i),d=e[t-1];if("top"===c&&d&&d.rootClientId===i.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",l=d.element.getBoundingClientRect()):(o=i,n=c,l=s),u)break}}if(!o)return;const i="bottom"===n;if(i&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l,i),element:o,isDraggedBlock:!!a&&p.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(p,i),canInsertDraggedBlocksAsChild:!a||r(p,l)}})),s);c&&i(c)}),[p]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}(),B=(0,s.useRef)(),I=(0,d.useMergeRefs)([B,S,t]),x=(0,s.useRef)(!1);(0,s.useEffect)((()=>{x.current=!0}),[]);const[T]=(0,d.__experimentalUseFixedWindowList)(B,36,_,{useWindowing:l,windowOverscan:40}),N=(0,s.useCallback)((e=>{e&&C({type:"expand",clientId:e})}),[C]),P=(0,s.useCallback)((e=>{e&&C({type:"collapse",clientId:e})}),[C]),M=(0,s.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,s.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),L=(0,s.useMemo)((()=>({__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,isTreeGridMounted:x.current,draggedClientIds:v,expandedState:E,expand:N,collapse:P})),[r,l,a,x.current,v,E,N,P]);return(0,s.createElement)(m.AsyncModeProvider,{value:!0},(0,s.createElement)(iv,{listViewRef:B,blockDropTarget:w}),(0,s.createElement)(p.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,h.__)("Block navigation structure"),ref:I,onCollapseRow:R,onExpandRow:M},(0,s.createElement)(Jg.Provider,{value:L},(0,s.createElement)(lv,i({blocks:g,selectBlock:y,showNestedBlocks:c,showBlockMovers:u,fixedListWindow:T,selectedClientIds:b},f)))))}));function pv(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,s.createElement)(p.Button,i({},l,{ref:r,icon:Kg,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0
69
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var mv=(0,s.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:o,...r}=e;const l=(0,m.useSelect)((e=>!!e(zn).getBlockCount()),[])&&!n;return(0,s.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,s.createElement)(pv,i({},r,{innerRef:t,isOpen:n,onToggle:o,isEnabled:l}))},renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,h.__)("List view")),(0,s.createElement)(dv,{showNestedBlocks:!0,__experimentalFeatures:o}))})}));function fv(e){let{genericPreviewBlock:t,style:n,className:o,activeStyle:r}=e;const l=sp(o,r,n),i=(0,s.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:l+" block-editor-block-styles__block-preview-container"}})),[t,l]);return(0,s.createElement)(mu,{item:i,isStylePreview:!0})}function hv(e){let{children:t,scope:n,...o}=e;return(0,s.createElement)(p.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,s.createElement)("div",o,t))}function gv(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:o=u.noop,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:a,genericPreviewBlock:m,className:f}=cp({clientId:t,onSwitch:n}),[h,g]=(0,s.useState)(null),[v,b]=(0,s.useState)(0),k=(0,d.useViewportMatch)("medium","<");if((0,s.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[h]),!i||0===i.length)return null;const _=(0,u.debounce)(g,250),y=e=>{l(e),o(null),g(null),_.cancel()},E=e=>{var t;h!==e?(_(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.Button,{className:c()("block-editor-block-styles__item",{"is-active":a.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{ga.ENTER!==t.keyCode&&ga.SPACE!==t.keyCode||(t.preventDefault(),y(e))},onClick:()=>y(e),role:"button",tabIndex:"0"},(0,s.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},t))}))),h&&!k&&(0,s.createElement)(hv,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>E(null)},(0,s.createElement)(fv,{activeStyle:a,className:f,genericPreviewBlock:m,style:h})))}gv.Slot=function(e){let{scope:t}=e;return(0,s.createElement)(p.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var vv=gv,bv=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),kv=function(e){let{icon:t=bv,label:n=(0,h.__)("Choose variation"),instructions:o=(0,h.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const a=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,s.createElement)(p.Placeholder,{icon:t,label:n,instructions:o,className:a},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,h.__)("Block variations")},r.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(p.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(p.Button,{variant:"link",onClick:()=>l()},(0,h.__)("Skip"))))},_v=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{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-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const yv="carousel",Ev="grid",Cv=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(p.Button,{onClick:t},(0,h.__)("Start blank")),(0,s.createElement)(p.Button,{variant:"primary",onClick:n},(0,h.__)("Choose")))},Sv=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(p.Button,{icon:Vd,label:(0,h.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,s.createElement)(p.Button,{icon:zd,label:(0,h.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var wv=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:a,onStartBlank:c}=e;const u=t===yv,d=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(p.Button,{icon:to,label:(0,h.__)("Carousel view"),onClick:()=>n(yv),isPressed:u}),(0,s.createElement)(p.Button,{icon:_v,label:(0,h.__)("Grid view"),onClick:()=>n(Ev),isPressed:t===Ev}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,s.createElement)(Sv,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),d,u&&(0,s.createElement)(Cv,{onBlockPatternSelect:a,onStartBlank:c}))};const Bv=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r}=e;const l=(0,p.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===yv){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,s.createElement)("div",{className:a},(0,s.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,s.createElement)(xv,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,s.createElement)(p.__unstableComposite,i({},l,{role:"listbox",className:a,"aria-label":(0,h.__)("Patterns list")}),o.map((e=>(0,s.createElement)(Iv,{key:e.name,pattern:e,onSelect:r,composite:l}))))};function Iv(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,title:a,description:c,viewportWidth:u=700}=t,m=(0,d.useInstanceId)(Iv,`${r}__item-description`);return(0,s.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?m:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,s.createElement)(du,{blocks:l,viewportWidth:u}),(0,s.createElement)("div",{className:`${r}__item-title`},a)),!!c&&(0,s.createElement)(p.VisuallyHidden,{id:m},c))}function xv(e){let{className:t,pattern:n}=e;const{blocks:o,title:r,description:l}=n,i=(0,d.useInstanceId)(xv,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":r,"aria-describedby":l?i:void 0},(0,s.createElement)(du,{blocks:o,__experimentalLive:!0}),!!l&&(0,s.createElement)(p.VisuallyHidden,{id:i},l))}var Tv=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,startBlankComponent:l,onBlockPatternSelect:i}=e;const[a,c]=(0,s.useState)(yv),[u,d]=(0,s.useState)(0),[p,f]=(0,s.useState)(!1),{replaceBlock:h}=(0,m.useDispatch)(zn),g=function(e,t,n){return(0,m.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(zn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(t,n,o);if(null==g||!g.length||p)return l;const v=i||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));h(t,n)});return(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${a}`},(0,s.createElement)(wv,{viewMode:a,setViewMode:c,activeSlide:u,totalSlides:g.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{v(g[u].blocks)},onStartBlank:()=>{f(!0)}}),(0,s.createElement)(Bv,{viewMode:a,activeSlide:u,patterns:g,onBlockPatternSelect:v}))};const Nv=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};var Pv=function(e){let{blockClientId:t}=e;const[n,o]=(0,s.useState)(),{updateBlockAttributes:l}=(0,m.useDispatch)(zn),{variations:i,blockAttributes:a}=(0,m.useSelect)((e=>{const{getBlockVariations:n}=e(r.store),{getBlockName:o,getBlockAttributes:l}=e(zn),i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:l(t)}}),[t]);if((0,s.useEffect)((()=>{var e;o(null===(e=Nv(a,i))||void 0===e?void 0:e.name)}),[a,i]),null==i||!i.length)return null;const c=i.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}})),u=e=>{l(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},d="block-editor-block-variation-transforms";return(0,s.createElement)(p.DropdownMenu,{className:d,label:(0,h.__)("Transform to variation"),text:(0,h.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${d}__popover`},icon:Ud,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${d}__container`},(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItemsChoice,{choices:c,value:n,onSelect:u})))))};const Mv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Rv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Lv={top:{icon:(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Rv,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Mv,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},Av=["top","center","bottom"],Dv={isAlternate:!0};var Ov=function(e){let{value:t,onChange:n,controls:o=Av,isCollapsed:r=!0,isToolbar:l}=e;const a=Lv[t],c=Lv.top,u=l?p.ToolbarGroup:p.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{};return(0,s.createElement)(u,i({popoverProps:Dv,icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Lv[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};function Fv(e){return(0,s.createElement)(Ov,i({},e,{isToolbar:!1}))}function zv(e){return(0,s.createElement)(Ov,i({},e,{isToolbar:!0}))}var Vv=(0,d.createHigherOrderComponent)((e=>t=>{const n=po("color.palette"),o=!po("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!(0,u.isEmpty)(r)||!l;return(0,s.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:a}))}),"withColorContext"),Hv=Vv(p.ColorPalette);function Uv(e){let{onChange:t,value:n,...o}=e;return(0,s.createElement)(bm,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Gv=function(e,t){return(Gv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Wv=function(){return(Wv=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function $v(e,t,n,o){void 0===o&&(o=0);var r=nb(e,t,o),l=r.width,i=r.height;return e>=t*n&&l>t*n?{width:t*n,height:t}:l>t*n?{width:e,height:e/n}:l>i*n?{width:i*n,height:i}:{width:l,height:l/n}}function jv(e,t,n,o,r){void 0===r&&(r=0);var l=nb(t.width,t.height,r),i=l.width,s=l.height;return{x:Kv(e.x,i,n.width,o),y:Kv(e.y,s,n.height,o)}}function Kv(e,t,n,o){var r=t*o/2-n/2;return Math.min(r,Math.max(e,-r))}function qv(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Yv(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Zv(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i&&0===l?Xv:Qv,a={x:s(100,((t.width-n.width/r)/2-e.x/r)/t.width*100),y:s(100,((t.height-n.height/r)/2-e.y/r)/t.height*100),width:s(100,n.width/t.width*100/r),height:s(100,n.height/t.height*100/r)},c=Math.round(s(t.naturalWidth,a.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,a.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*o?{width:Math.round(u*o),height:u}:{width:c,height:Math.round(c/o)};return{croppedAreaPercentages:a,croppedAreaPixels:Wv(Wv({},d),{x:Math.round(s(t.naturalWidth-d.width,a.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,a.y*t.naturalHeight/100))})}}function Xv(e,t){return Math.min(e,Math.max(0,t))}function Qv(e,t){return t}function Jv(e,t,n){var o=t.width/t.naturalWidth,r=function(e,t,n){var o=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/o/e.height:n.width/o/e.width;var r=e.width/e.height;return t.naturalWidth>=t.naturalHeight*r?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),l=o*r;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*l,y:((t.naturalHeight-e.height)/2-e.y)*l},zoom:r}}function eb(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function tb(e,t,n,o,r){var l=Math.cos,i=Math.sin,s=r*Math.PI/180;return[(e-n)*l(s)-(t-o)*i(s)+n,(e-n)*i(s)+(t-o)*l(s)+o]}function nb(e,t,n){var o=e/2,r=t/2,l=[tb(0,0,o,r,n),tb(e,0,o,r,n),tb(e,t,o,r,n),tb(0,t,o,r,n)],i=Math.min.apply(Math,l.map((function(e){return e[0]}))),s=Math.max.apply(Math,l.map((function(e){return e[0]}))),a=Math.min.apply(Math,l.map((function(e){return e[1]})));return{width:s-i,height:Math.max.apply(Math,l.map((function(e){return e[1]})))-a}}function ob(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var rb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,o=e.cropSize;if(t){var r=Jv(t,n.mediaSize,o),l=r.crop,i=r.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,o,r,l=n.imageRef||n.videoRef;if(l){n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(o=n.imageRef)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef)||void 0===r?void 0:r.videoHeight)||0};var i=n.props.cropSize?n.props.cropSize:$v(l.offsetWidth,l.offsetHeight,n.props.aspect,n.props.rotation);n.setState({cropSize:i},n.recomputeCropPosition)}n.containerRef&&(n.containerRect=n.containerRef.getBoundingClientRect())},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Wv({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?jv(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var o=t.getMousePoint(e),r=n.props.zoom-e.deltaY*n.props.zoomSpeed/200;n.setNewZoom(r,o),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var o=n.getPointOnContainer(t),r=n.getPointOnMedia(o),l=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:r.x*l-o.x,y:r.y*l-o.y},s=n.props.restrictPosition?jv(i,n.mediaSize,n.state.cropSize,l,n.props.rotation):i;n.props.onCropChange(s),n.props.onZoomChange(l)}},n.emitCropData=function(){if(n.state.cropSize){var e=Zv(n.props.restrictPosition?jv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition),t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?jv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function __(){this.constructor=e}Gv(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=qv(n,o),this.lastPinchRotation=Yv(n,o),this.onDragStart(eb(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=eb(o,r);this.onDrag(l),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=qv(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l),n.lastPinchDistance=e;var i=Yv(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.crop,i=l.x,s=l.y,a=t.rotation,c=t.zoom,u=t.cropShape,d=t.showGrid,p=t.style,m=p.containerStyle,f=p.cropAreaStyle,h=p.mediaStyle,g=t.classes,v=g.containerClassName,b=g.cropAreaClassName,k=g.mediaClassName;return Ur().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:ob("reactEasyCrop_Container",v)},n?Ur().createElement("img",Wv({alt:"",className:ob("reactEasyCrop_Image",k)},r,{src:n,ref:function(t){return e.imageRef=t},style:Wv(Wv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),onLoad:this.onMediaLoad})):o&&Ur().createElement("video",Wv({autoPlay:!0,loop:!0,muted:!0,className:ob("reactEasyCrop_Video",k)},r,{src:o,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Wv(Wv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),controls:!1})),this.state.cropSize&&Ur().createElement("div",{style:Wv(Wv({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:ob("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Ur().Component);const lb={position:"bottom right",isAlternate:!0};var ib=window.wp.apiFetch,sb=n.n(ib);const ab=(0,s.createContext)({}),cb=()=>(0,s.useContext)(ab);function ub(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:i,onFinishEditing:a,onSaveImage:c,children:u}=e;const d=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)({x:0,y:0}),[p,m]=(0,s.useState)(),[f,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),[b,k]=(0,s.useState)(),_=(0,s.useCallback)((()=>{d({x:0,y:0}),m(100),h(0),v(n/o),k(n/o)}),[n,o,d,m,h,v,k]),y=(0,s.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),h(e),v(1/g),void d({x:-u.y*r,y:u.x*r});const s=new window.Image;s.src=t,s.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const s=n.getContext("2d");s.translate(o,l),s.rotate(e*Math.PI/180),s.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),h(e),v(1/g),d({x:-u.y*r,y:u.x*r})}))};const a=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(s.crossOrigin=a)}),[f,n,o,i,h,v,d]);return(0,s.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:a,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:h,rotateClockwise:y,aspect:g,setAspect:v,defaultAspect:b,initializeTransformValues:_})),[r,i,a,c,u,d,p,m,f,h,y,g,v,b,_])}(e),{initializeTransformValues:o}=n;return(0,s.useEffect)((()=>{t&&o()}),[t,o]),n}({url:n,naturalWidth:o,naturalHeight:r},i),p=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:a,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,m.useDispatch)(Nu.store),[p,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,s.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,sb()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,h.sprintf)(
70
  /* translators: 1. Error message */
71
- (0,h.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,s.useMemo)((()=>({isInProgress:p,apply:v,cancel:g})),[p,v,g])}({id:t,url:n,onSaveImage:c,onFinishEditing:a,...d}),f=(0,s.useMemo)((()=>({...d,...p})),[d,p]);return(0,s.createElement)(ab.Provider,{value:f},u)}function db(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;const{isInProgress:a,editedUrl:u,position:d,zoom:m,aspect:f,setPosition:h,setCrop:g,setZoom:v,rotation:b}=cb();let k=o||r*l/i;return b%180==90&&(k=r*i/l),(0,s.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":a}),style:{width:n||r,height:k}},(0,s.createElement)(rb,{image:u||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:f,onCropChange:h,onCropComplete:e=>{g(e)},onZoomChange:e=>{v(100*e)}}),a&&(0,s.createElement)(p.Spinner,null))}var pb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function mb(){const{isInProgress:e,zoom:t,setZoom:n}=cb();return(0,s.createElement)(p.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:lb,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(p.ToolbarButton,{icon:pb,label:(0,h.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,s.createElement)(p.RangeControl,{label:(0,h.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var fb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{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"}));function hb(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,s.createElement)(p.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,s.createElement)(p.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?rp:void 0},t)})))}function gb(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=cb();return(0,s.createElement)(p.DropdownMenu,{icon:fb,label:(0,h.__)("Aspect Ratio"),popoverProps:lb,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(hb,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("Original"),aspect:l},{title:(0,h.__)("Square"),aspect:1}]}),(0,s.createElement)(hb,{label:(0,h.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("16:10"),aspect:1.6},{title:(0,h.__)("16:9"),aspect:16/9},{title:(0,h.__)("4:3"),aspect:4/3},{title:(0,h.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(hb,{label:(0,h.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("10:16"),aspect:.625},{title:(0,h.__)("9:16"),aspect:9/16},{title:(0,h.__)("3:4"),aspect:3/4},{title:(0,h.__)("2:3"),aspect:2/3}]}))}))}var vb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function bb(){const{isInProgress:e,rotateClockwise:t}=cb();return(0,s.createElement)(p.ToolbarButton,{icon:vb,label:(0,h.__)("Rotate"),onClick:t,disabled:e})}function kb(){const{isInProgress:e,apply:t,cancel:n}=cb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{onClick:t,disabled:e},(0,h.__)("Apply")),(0,s.createElement)(p.ToolbarButton,{onClick:n},(0,h.__)("Cancel")))}function _b(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(db,{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Yn,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(mb,null),(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(gb,{toggleProps:e}))),(0,s.createElement)(bb,null)),(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(kb,null))))}const yb=[25,50,75,100];function Eb(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=u.noop}=e;const{currentHeight:m,currentWidth:f,updateDimension:g,updateDimensions:v}=function(e,t,n,o,r){var l,i;const[a,c]=(0,s.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,s.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,s.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,s.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,!(0,u.isEmpty)(o)&&(0,s.createElement)(p.SelectControl,{label:(0,h.__)("Image size"),value:l,options:o,onChange:d}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,h.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,h.__)("Width"),value:f,min:1,onChange:e=>g("width",e)}),(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,h.__)("Height"),value:m,min:1,onChange:e=>g("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.ButtonGroup,{"aria-label":(0,h.__)("Image size presets")},yb.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=f===o&&m===r;return(0,s.createElement)(p.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>v(r,o)},e,"%")}))),(0,s.createElement)(p.Button,{isSmall:!0,onClick:()=>v()},(0,h.__)("Reset")))))}var Cb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(O.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Sb=e=>{let{value:t,onChange:n=u.noop,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,s.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(p.VisuallyHidden,{as:"legend"},(0,h.__)("Currently selected link settings")),l)};class wb extends s.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,s.createRef)(),this.inputRef=(0,s.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,_a()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,rd.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,h.sprintf)(
72
  /* translators: %s: number of results. */
73
- (0,h._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,h.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case ga.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case ga.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case ga.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case ga.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case ga.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case ga.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,h.__)("Link selected.")));break;case ga.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,h.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:m,suggestionOptionIdPrefix:f}=this.state,g={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},v={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,h.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(g,v,a):(0,s.createElement)(p.BaseControl,g,(0,s.createElement)("input",v),a&&(0,s.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:m,loading:f}=this.state,h={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${m}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:a,suggestionsListProps:h,buildSuggestionItemProps:g,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,s.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,s.createElement)("div",i({},h,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,s.createElement)(p.Button,i({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Bb=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,m.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(zn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wb),Ib=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:a}=e;return n?(t=a?(0,u.isFunction)(a)?a(n):a:(0,s.createInterpolateElement)((0,h.sprintf)(
74
  /* translators: %s: search term. */
75
- (0,h.__)("Create: <mark>%s</mark>"),n),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(p.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,s.createElement)(So,{className:"block-editor-link-control__search-item-icon",icon:Oa}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},xb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Tb=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:a="",shouldShowType:u=!1}=e;return(0,s.createElement)(p.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&(0,s.createElement)(So,{className:"block-editor-link-control__search-item-icon",icon:xb}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,s.createElement)(p.TextHighlight,{text:n.title,highlight:a})),(0,s.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(n.url))||""),l&&(0,h.__)("Press ENTER to add this link"))),u&&n.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};const Nb="__CREATE__",Pb=[{id:"opensInNewTab",title:(0,h.__)("Open in new tab")}];function Mb(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:a,suggestions:u,selectedSuggestion:d,isLoading:m,isInitialSuggestions:f,createSuggestionButtonText:g,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":m}),k=["url","mailto","tel","internal"],_=1===u.length&&k.includes(u[0].type.toLowerCase()),y=n&&!_&&!f,E=!(null!=v&&v.type),C=`block-editor-link-control-search-results-label-${t}`,S=f?(0,h.__)("Recently updated"):(0,h.sprintf)(
76
  /* translators: %s: search term. */
77
- (0,h.__)('Search results for "%s"'),o),w=(0,s.createElement)(f?s.Fragment:p.VisuallyHidden,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:C},S));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,s.createElement)("div",i({},l,{className:b,"aria-labelledby":C}),u.map(((e,t)=>y&&Nb===e.type?(0,s.createElement)(Ib,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:a(e,t),isSelected:t===d}):Nb===e.type?null:(0,s.createElement)(Tb,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:k.includes(e.type.toLowerCase()),searchTerm:o,shouldShowType:E})))))}function Rb(e){const t=(0,u.startsWith)(e,"#");return(0,rd.isURL)(e)||e&&e.includes("www.")||t}const Lb=()=>Promise.resolve([]),Ab=e=>{let t="URL";const n=(0,rd.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,rd.prependHTTP)(e):e,type:t}])};const Db=()=>Promise.resolve([]),Ob=(0,s.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:a=!1,onCreateSuggestion:p=u.noop,onChange:f=u.noop,onSelect:g=u.noop,showSuggestions:v=!0,renderSuggestions:b=(e=>(0,s.createElement)(Mb,e)),fetchSuggestions:k=null,allowDirectEntry:_=!0,showInitialSuggestions:y=!1,suggestionsQuery:E={},withURLSuggestion:C=!0,createSuggestionButtonText:S,useLabel:w=!1}=e;const B=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Ab:Lb;return(0,s.useCallback)(((t,i)=>{let{isInitialSuggestions:s}=i;return Rb(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t;let s=await Promise.all([n(e,t),o(e)]);return s=e.includes(" ")||!l||i?s[0]:s[0].concat(s[1]),i||Rb(e)||!r?s:s.concat({title:e,url:e,type:Nb})})(t,{...e,isInitialSuggestions:s},r,l,n,o)}),[l,r,n])}(E,_,a,C),I=v?k||B:Db,x=(0,d.useInstanceId)(Ob),[T,N]=(0,s.useState)(),P=async e=>{let t=e;if(Nb!==e.type)(_||t&&Object.keys(t).length>=1)&&g({...(0,u.omit)(r,"id","url"),...t},t);else try{var n;t=await p(e.title),null!==(n=t)&&void 0!==n&&n.url&&g(t)}catch(e){}},M=c()(l,{"has-no-label":!w});return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(Bb,{label:w?"URL":void 0,className:M,value:n,onChange:(e,t)=>{f(e),N(t)},placeholder:null!=i?i:(0,h.__)("Search or type url"),__experimentalRenderSuggestions:v?e=>b({...e,instanceId:x,withCreateSuggestion:a,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:E,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),P(t)}}):null,__experimentalFetchLinkSuggestions:I,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:y,onSubmit:(e,t)=>{var o;const r=e||T;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?P(r||{url:n}):t.preventDefault()},ref:t}),o)}));var Fb=Ob,zb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Vb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:Hb,Fill:Ub}=(0,p.createSlotFill)("BlockEditorLinkControlViewer");function Gb(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function Wb(e){let{value:t,onEditClick:n,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:l}=e;const i=o?null==t?void 0:t.url:null,{richData:a,isFetching:u}=function(e){const[t,n]=(0,s.useReducer)(Gb,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,s.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(i),d=a&&Object.keys(a).length,f=t&&(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t.url),16)||"",g=(null==a?void 0:a.title)||(null==t?void 0:t.title)||f,v=!t.url.length;let b;return b=null!=a&&a.icon?(0,s.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):v?(0,s.createElement)(So,{icon:zb,size:32}):(0,s.createElement)(So,{icon:xb}),(0,s.createElement)("div",{"aria-label":(0,h.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!u,"is-preview":!0,"is-error":v})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},b),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},"Link is empty"):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},(0,or.__unstableStripHTML)(g)),(null==t?void 0:t.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,s.createElement)(p.Button,{icon:Vb,label:(0,h.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:n,iconSize:24}),r&&(0,s.createElement)(p.Button,{icon:Dm,label:(0,h.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,s.createElement)(Hb,{fillProps:t})),(d&&((null==a?void 0:a.image)||(null==a?void 0:a.description))||u)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,s.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,s.createElement)(p.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}function $b(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=Pb,onChange:a=u.noop,onRemove:d,noDirectEntry:m=!1,showSuggestions:f=!0,showInitialSuggestions:g,forceIsEditingLink:v,createSuggestion:b,withCreateSuggestion:k,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===k&&b&&(k=!0);const I=(0,s.useRef)(!0),x=(0,s.useRef)(),T=(0,s.useRef)(),[N,P]=(0,s.useState)((null==l?void 0:l.url)||""),[M,R]=(0,s.useState)((null==l?void 0:l.title)||""),L=_||N,[A,D]=(0,s.useState)(void 0!==v?v:!l||!l.url),O=(0,s.useRef)(!1),F=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length);function z(){var e;O.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),D(!1)}(0,s.useEffect)((()=>{void 0!==v&&v!==A&&D(v)}),[v]),(0,s.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(or.focus.focusable.find(x.current)[e]||x.current).focus(),O.current=!1}),[A]),(0,s.useEffect)((()=>{null!=l&&l.title&&l.title!==M&&R(l.title),null!=l&&l.url&&P(l.url)}),[l]);const{createPage:V,isCreatingPage:H,errorMessage:U}=function(e){const t=(0,s.useRef)(),[n,o]=(0,s.useState)(!1),[r,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,h.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(b),G=()=>{L===(null==l?void 0:l.url)&&M===(null==l?void 0:l.title)||a({url:L,title:M}),z()},W=d&&l&&!A&&!H,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&w;return(0,s.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},H&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(p.Spinner,null)," ",(0,h.__)("Creating"),"…"),(A||!l)&&!H&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,s.createElement)(p.TextControl,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:M,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==ga.ENTER||F||(e.preventDefault(),G())}}),(0,s.createElement)(Fb,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:k,onCreateSuggestion:V,onChange:P,onSelect:e=>{a({...e,title:M||(null==e?void 0:e.title)}),z()},showInitialSuggestions:g,allowDirectEntry:!m,showSuggestions:f,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:j},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(p.Button,{onClick:G,label:(0,h.__)("Submit"),icon:Cb,className:"block-editor-link-control__search-submit",disabled:F})))),U&&(0,s.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),l&&!A&&!H&&(0,s.createElement)(Wb,{key:null==l?void 0:l.url,value:l,onEditClick:()=>D(!0),hasRichPreviews:S,hasUnlinkControl:W,onRemove:d}),$&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(Sb,{value:l,settings:i,onChange:a})),B&&B())}$b.ViewerFill=Ub;var jb=$b,Kb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),qb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Yb=(0,p.withFilters)("editor.MediaUpload")((()=>null)),Zb=function(e){let{fallback:t=null,children:n}=e;return(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return!!t().mediaUpload}),[])?n:t},Xb=(0,d.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Nu.store);return{createNotice:t,removeNotice:n}})),(0,p.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,allowedTypes:o,accept:r,onSelect:l,onSelectURL:i,onFilesUpload:a=u.noop,onCloseModal:c=u.noop,name:d=(0,h.__)("Replace"),createNotice:f,removeNotice:g,children:v}=e;const[b,k]=(0,s.useState)(t),_=(0,m.useSelect)((e=>e(zn).getSettings().mediaUpload),[]),y=(0,s.createRef)(),E=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=e=>{const t=document.createElement("div");t.innerHTML=(0,s.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},S=e=>{k(e.url),l(e),(0,Nt.speak)((0,h.__)("The media file has been replaced")),g(E)},w=e=>{e.keyCode===ga.DOWN&&(e.preventDefault(),e.target.click())};return(0,s.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:w},d)},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(Yb,{value:n,onSelect:e=>S(e),allowedTypes:o,onClose:c,render:e=>{let{open:t}=e;return(0,s.createElement)(p.MenuItem,{icon:Kb,onClick:t},(0,h.__)("Open Media Library"))}}),(0,s.createElement)(Zb,null,(0,s.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;a(t),_({allowedTypes:o,filesList:t,onFileChange:e=>{let[t]=e;S(t)},onError:C})})(e)},accept:r,render:e=>{let{openFileDialog:t}=e;return(0,s.createElement)(p.MenuItem,{icon:qb,onClick:()=>{t()}},(0,h.__)("Upload"))}})),v),i&&(0,s.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,h.__)("Current media URL:")),(0,s.createElement)(jb,{value:{url:b},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;k(t),i(t),y.current.focus()}})))}})}));function Qb(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,s.createElement)(p.ExternalLink,{className:r,href:t},n||(0,rd.filterURLForDisplay)((0,rd.safeDecodeURI)(t))):(0,s.createElement)("span",{className:r})}function Jb(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...a}=e;const[c,u]=(0,s.useState)(!1),d=!!o&&c;return(0,s.createElement)(p.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r},a),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,s.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:Ud,label:(0,h.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Jb.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,s.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,s.createElement)(Bb,{value:r,onChange:o,autocompleteRef:t}),(0,s.createElement)(p.Button,{icon:Cb,label:(0,h.__)("Apply"),type:"submit"}))},Jb.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...a}=e;return(0,s.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},a),(0,s.createElement)(Qb,{url:r,urlLabel:l,className:n}),o&&(0,s.createElement)(p.Button,{icon:Vb,label:(0,h.__)("Edit"),onClick:o}))};var ek=Jb;const tk=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,s.createElement)(ek,{onClose:r},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,h.__)("URL"),placeholder:(0,h.__)("Paste or type URL"),onChange:n,value:t}),(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Cb,label:(0,h.__)("Apply"),type:"submit"})))};var nk=(0,p.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:a,isAppender:d,accept:f,addToGallery:g,multiple:v=!1,handleUpload:b=!0,dropZoneUIOnly:k,disableDropZone:_,disableMediaButtons:y,onError:E,onSelect:C,onCancel:S,onSelectURL:w,onDoubleClick:B,onFilesPreUpload:I=u.noop,onHTMLDrop:x=u.noop,onClose:T=u.noop,children:N,mediaLibraryButton:P,placeholder:M,style:R}=e;const L=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return t().mediaUpload}),[]),[A,D]=(0,s.useState)(""),[O,F]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var e;D(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const z=e=>{D(e.target.value)},V=()=>{F(!0)},H=()=>{F(!1)},U=e=>{e.preventDefault(),A&&w&&(w(A),H())},G=e=>{if(!b)return C(e);let o;if(I(e),v)if(g){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));C(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=C;else o=e=>{let[t]=e;return C(t)};L({allowedTypes:n,filesList:e,onFileChange:o,onError:E})},W=e=>{G(e.target.files)},$=null!=M?M:e=>{let{instructions:t,title:u}=l;if(L||w||(t=(0,h.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&L&&(t=(0,h.__)("Upload a media file or pick one from your media library."),l?t=(0,h.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,h.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,h.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,h.__)("Media"),l?u=(0,h.__)("Audio"):i?u=(0,h.__)("Image"):s&&(u=(0,h.__)("Video")))}const m=c()("block-editor-media-placeholder",o,{"is-appender":d});return(0,s.createElement)(p.Placeholder,{icon:r,label:u,instructions:t,className:m,notices:a,onDoubleClick:B,preview:i,style:R},e,N)},j=()=>_?null:(0,s.createElement)(p.DropZone,{onFilesDrop:G,onHTMLDrop:x}),K=()=>S&&(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,h.__)("Cancel"),variant:"link",onClick:S},(0,h.__)("Cancel")),q=()=>w&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:V,isPressed:O,variant:"tertiary"},(0,h.__)("Insert from URL")),O&&(0,s.createElement)(tk,{src:A,onChange:z,onSubmit:U,onClose:H}));return k||y?(k&&Rt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,s.createElement)(Zb,null,j())):(0,s.createElement)(Zb,{fallback:$(q())},(()=>{const e=null!=P?P:e=>{let{open:t}=e;return(0,s.createElement)(p.Button,{variant:"tertiary",onClick:()=>{t()}},(0,h.__)("Media Library"))},o=(0,s.createElement)(Yb,{addToGallery:g,gallery:v&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:v,onSelect:C,onClose:T,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(L&&d)return(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(p.FormFileUpload,{onChange:W,accept:f,multiple:v,render:e=>{let{openFileDialog:t}=e;const n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,h.__)("Upload")),o,q(),K());return $(n)}}));if(L){const e=(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(p.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:W,accept:f,multiple:v},(0,h.__)("Upload")),o,q(),K());return $(e)}return $(o)})())})),ok=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{let{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(hf,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const rk={position:"bottom right",isAlternate:!0};var lk=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link"].map((e=>(0,s.createElement)(p.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(p.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,s.createElement)(p.ToolbarItem,null,(n=>(0,s.createElement)(p.DropdownMenu,{icon:Ud
78
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,h.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:rk})))}))),ik=e=>{let{inline:t,anchorRef:n}=e;return t?(0,s.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(lk,null)))):(0,s.createElement)(Yn,{group:"inline"},(0,s.createElement)(lk,null))};function sk(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(zn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==ga.DELETE&&o!==ga.BACKSPACE&&o!==ga.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function ak(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>`<img src="${(0,yp.createBlobURL)(e)}">`)).join("")}var ck=window.wp.shortcode;function uk(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function dk(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function pk(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?pk.EMPTY_ARRAY:t||n?t||(Rt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((e=>`core/${e}`))):void 0}function mk(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const s=[],[a,c]=(0,Pt.split)(t),u=n.length>0;let d=-1;const p=(0,Pt.isEmpty)(a)&&!(0,Pt.isEmpty)(c);u&&(0,Pt.isEmpty)(a)||(s.push(r((0,Pt.toHTMLString)({value:a,multilineTag:i}),!p)),d+=1),u?(s.push(...n),d+=n.length):l&&s.push(l()),(u||l)&&(0,Pt.isEmpty)(c)||s.push(r((0,Pt.toHTMLString)({value:c,multilineTag:i}),p)),o(s,u?d:1,u?-1:0)}function fk(e,t){return t?(0,Pt.replace)(e,/\n+/g,Pt.__UNSTABLE_LINE_SEPARATOR):(0,Pt.replace)(e,new RegExp(Pt.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function hk(e){const t=(0,s.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:s,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:h}=t.current;if(!n)return void e.preventDefault();const{clipboardData:g}=e;let v="",b="";try{v=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(b),b=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,Pt.insert)(i,v));const k=s.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(k!==i)return void l(k);const _=[...(0,or.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,Pt.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=fk(t,!!m),uk(t,i.activeFormats),void l((0,Pt.insert)(i,t))}if(h)return void l((0,Pt.insert)(i,(0,Pt.create)({text:v})));if(_&&_.length&&!b){const e=(0,r.pasteHandler)({HTML:ak(_),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(c&&(0,Pt.isEmpty)(i)?c(e):mk({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,Pt.isEmpty)(i)&&(E=v,(0,ck.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,Pt.isEmpty)(i)&&(0,rd.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,Pt.create)({html:C});e=fk(e,!!m),uk(e,i.activeFormats),l((0,Pt.insert)(i,e))}else C.length>0&&(c&&(0,Pt.isEmpty)(i)?c(C,C.length-1,-1):mk({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function gk(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(zn),o=(0,s.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const s=i.slice(0,l).trim(),a=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),c=(0,r.findTransform)(a,(e=>{let{prefix:t}=e;return s===t}));if(!c)return;const u=(0,Pt.toHTMLString)({value:(0,Pt.slice)(e,l,i.length)});t([c.transform(u)]),n()}function i(e){const{inputType:r,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<t.length||o.slice(n-t.length,n).toLowerCase()!==t?e:(0,Pt.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(s));d!==s&&(t(),a({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function vk(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(zn),n=(0,s.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==ga.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&s;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,Pt.insert)(m,"\n")):f&&(0,Pt.__unstableIsEmptyLine)(m)?mk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c}):u((0,Pt.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,Pt.insert)(m,"\n")):!f&&r?p():f&&mk({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function bk(e){return e(Pt.store).getFormatTypes()}pk.EMPTY_ARRAY=[];const kk=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function _k(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function yk(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function Ek(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const a=(0,Pt.getActiveFormat)(r,t);let c=void 0!==a;const d=(0,Pt.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,Pt.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,s.createElement)(i,{key:t,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const Ck=(0,s.createContext)(),Sk=(0,s.createContext)(),wk=(0,s.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:a="",onChange:f,isSelected:h,multiline:g,inlineToolbar:v,wrapperClassName:b,autocompleters:k,onReplace:_,placeholder:y,allowedFormats:E,formattingControls:C,withoutInteractiveFormatting:S,onRemove:w,onMerge:B,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:T,identifier:N,preserveWhiteSpace:P,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:D,__unstableAllowPrefixTransformations:O,...F}=t;const z=(0,d.useInstanceId)(e);N=N||z,F=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(F);const V=(0,s.useRef)(),{clientId:H}=Gn(),{selectionStart:U,selectionEnd:G,isSelected:W,disabled:$}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(zn),l=t(),i=n();let s;return void 0===h?s=l.clientId===H&&l.attributeKey===N:h&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:j}=(0,m.useDispatch)(zn),K=dk(g),q=pk({allowedFormats:E,formattingControls:C,disableFormats:L}),Y=!q||q.length>0;let Z=a,X=f;Array.isArray(a)&&(Z=r.children.toHTML(a),X=e=>f(r.children.fromDOM((0,Pt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,s.useCallback)(((e,t)=>{j(H,N,e,t)}),[H,N]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,m.useSelect)(bk,[]),i=(0,s.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&kk.has(n))}))),[l,r,kk]),a=(0,m.useSelect)((e=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),o)),{})),[i,t,n]),c=(0,m.useDispatch)(),u=[],d=[],p=[],f=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=a[e.name],r=e.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(r):u.push(r);for(const e in o)f.push(o[e])}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),p.push(e.__experimentalCreateOnChangeEditableValue({...a[e.name]||{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:f}}({clientId:H,identifier:N,withoutInteractiveFormatting:S,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Pt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:se}=(0,Pt.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;X(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:G,onSelectionChange:Q,placeholder:y,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:P,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ae=function(e){return(0,p.__unstableUseAutocompleteProps)({...e,completers:Ag(e)})}({onReplace:_,completers:k,record:le,onChange:ie});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:o}=(0,m.useSelect)(zn),{enterFormattedText:r,exitFormattedText:l}=(0,m.useDispatch)(zn);(0,s.useEffect)((()=>{n?o()||r():o()&&l()}),[n])}({value:le}),function(e){let{html:t,value:n}=e;const o=(0,s.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,m.useDispatch)(zn);(0,s.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Z,value:le});const ce=(0,s.useRef)(new Set),ue=(0,s.useRef)(new Set);function de(){V.current.focus()}const pe=l,me=(0,s.createElement)(s.Fragment,null,W&&(0,s.createElement)(Ck.Provider,{value:ce},(0,s.createElement)(Sk.Provider,{value:ue},(0,s.createElement)(p.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,s.createElement)(Ek,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:V})))),W&&Y&&(0,s.createElement)(ik,{inline:v,anchorRef:V.current}),(0,s.createElement)(pe,i({role:"textbox","aria-multiline":!0,"aria-label":y},F,ae,{ref:(0,d.useMergeRefs)([ae.ref,F.ref,se,gk({value:le,onChange:ie,__unstableAllowPrefixTransformations:O,formatTypes:J,onReplace:_}),(0,d.useRefEffect)((e=>{function t(e){(ga.isKeyboardEvent.primary(e,"z")||ga.isKeyboardEvent.primary(e,"y")||ga.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),_k(ce),yk(ue),sk(),hk({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:_,onSplit:I,onSplitMiddle:T,__unstableEmbedURLOnPaste:R,multilineTag:K,preserveWhiteSpace:P,pastePlainText:M}),vk({removeEditorOnlyFormats:re,value:le,onReplace:_,onSplit:I,onSplitMiddle:T,multilineTag:K,onChange:ie,disableLineBreaks:A,onSplitAtEnd:x}),V,n]),contentEditable:!$||void 0,suppressContentEditableWarning:!$,className:c()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:D,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===ga.DELETE||t===ga.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===ga.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,Pt.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;B&&B(!l),w&&(0,Pt.isEmpty)(le)&&l&&w(!l),e.preventDefault()}}})));if(!b)return me;Rt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const fe=c()("block-editor-rich-text",b);return(0,s.createElement)("div",{className:fe},me)}));wk.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(t=r.children.toHTML(t));const i=dk(o);!t&&i&&(t=`<${i}></${i}>`);const a=(0,s.createElement)(s.RawHTML,null,t);return n?(0,s.createElement)(n,(0,u.omit)(l,["format"]),a):a},wk.isEmpty=e=>!e||0===e.length;var Bk=wk;const Ik=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Bk,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Ik.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,s.createElement)(n,o,t)};var xk=Ik,Tk=(0,s.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,s.createElement)(xk,i({ref:t},o));const{className:r,onChange:l,...a}=o;return(0,s.createElement)(yr.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},a))}));function Nk(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(Nk),l=o||(0,h.sprintf)(
79
  /* translators: 1: property name. 2: viewport name. */
80
- (0,h._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,s.createElement)(p.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var Pk=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:u={id:"all",
81
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
82
  label:(0,h.__)("All")},viewports:d=[{id:"small",label:(0,h.__)("Small screens")},{id:"medium",label:(0,h.__)("Medium screens")},{id:"large",label:(0,h.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const m=o||(0,h.sprintf)(
83
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
84
- (0,h.__)("Use the same %s on all screensizes."),n),f=(0,h.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,s.createElement)(Nk,{property:n,viewport:u}),u);
85
- /* translators: 'Help text for the responsive mode toggle control.' */return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!a,onChange:r,help:f}),(0,s.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(d):d.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},l((0,s.createElement)(Nk,{property:n,viewport:e}),e))))))))};function Mk(e){let{character:t,type:n,onUse:o}=e;const r=(0,s.useContext)(Ck),l=(0,s.useRef)();return l.current=o,(0,s.useEffect)((()=>{function e(e){ga.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function Rk(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,a="RichText.ToolbarControls";return n&&(a+=`.${n}`),o&&r&&(t=ga.displayShortcut[o](r)),(0,s.createElement)(p.Fill,{name:a},(0,s.createElement)(p.ToolbarButton,i({},l,{shortcut:t})))}function Lk(e){let{inputType:t,onInput:n}=e;const o=(0,s.useContext)(Sk),r=(0,s.useRef)();return r.current=n,(0,s.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const Ak=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{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"}));var Dk=(0,s.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(zn).isNavigationMode()),[]),{setNavigationMode:o}=(0,m.useDispatch)(zn),r=e=>{o("edit"!==e)};return(0,s.createElement)(p.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,s.createElement)(p.Button,i({},e,{ref:t,icon:n?Ak:Vb,"aria-expanded":r,"aria-haspopup":"true",onClick:l
86
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{role:"menu","aria-label":(0,h.__)("Tools")},(0,s.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(So,{icon:Vb}),(0,h.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,Ak,(0,h.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,h.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function Ok(e){let{units:t,...n}=e;const o=(0,p.__experimentalUseCustomUnits)({availableUnits:po("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,s.createElement)(p.__experimentalUnitControl,i({units:o},n))}var Fk=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class zk extends s.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,h.__)("Edit link"):(0,h.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(p.Button,{icon:Am,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(p.Button,{className:"block-editor-url-input__back",icon:Fk,label:(0,h.__)("Close"),onClick:this.toggle}),(0,s.createElement)(Bb,{value:e||"",onChange:t}),(0,s.createElement)(p.Button,{icon:Cb,label:(0,h.__)("Submit"),type:"submit"}))))}}var Vk=zk,Hk=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Uk="none",Gk="custom",Wk="media",$k="attachment",jk=["noreferrer","noopener"],Kk=(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,s.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),qk=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:a,linkClass:c,rel:d}=e;const[m,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!0)})),[v,b]=(0,s.useState)(!1),[k,_]=(0,s.useState)(null),y=(0,s.useRef)(null),E=(0,s.useCallback)((()=>{t!==Wk&&t!==$k||_(""),b(!0)})),C=(0,s.useCallback)((()=>{b(!1)})),S=(0,s.useCallback)((()=>{_(null),C(),f(!1)})),w=e=>{let t=e;return void 0===e||(0,u.isEmpty)(t)||(0,u.isEmpty)(t)||((0,u.each)(jk,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,u.isEmpty)(t)&&(t=void 0)),t},B=(0,s.useCallback)((()=>e=>{const t=y.current;t&&t.contains(e.target)||(f(!1),_(null),C())})),I=(0,s.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=T().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||Gk;n({href:k,linkDestination:e})}C(),_(null),e.preventDefault()})),x=(0,s.useCallback)((()=>{n({linkDestination:Uk,href:""})})),T=()=>{const e=[{linkDestination:Wk,title:(0,h.__)("Media File"),url:"image"===r?l:void 0,icon:Kk}];return"image"===r&&i&&e.push({linkDestination:$k,title:(0,h.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},N=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;return n=t||d?w(d):void 0,{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link Rel"),value:w(d)||"",onChange:e=>{n({rel:e})}}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),P=null!==k?k:o,M=((0,u.find)(T(),["linkDestination",t])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{icon:Am,className:"components-toolbar__control",label:o?(0,h.__)("Edit link"):(0,h.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&(0,s.createElement)(ek,{onFocusOutside:B(),onClose:S,renderSettings:()=>N,additionalControls:!P&&(0,s.createElement)(p.NavigableMenu,null,(0,u.map)(T(),(e=>(0,s.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const t=T();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:Gk}).linkDestination:Uk,n({linkDestination:o,href:e})})(e.url),C()}},e.title))))},(!o||v)&&(0,s.createElement)(ek.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:P,onChangeInputValue:_,onSubmit:I(),autocompleteRef:y}),o&&!v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ek.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:E,urlLabel:M}),(0,s.createElement)(p.Button,{icon:Hk,label:(0,h.__)("Remove link"),onClick:x}))))};function Yk(e){let{children:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l}=e;if((0,d.useViewportMatch)("small","<"))return null;const i={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,
87
  /* translators: button label text should, if possible, be under 16 characters. */
88
- children:(0,h.__)("Preview")};return(0,s.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:a,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&rp},(0,h.__)("Desktop")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&rp},(0,h.__)("Tablet")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&rp},(0,h.__)("Mobile"))),t)))}function Zk(e){const[t,n]=(0,s.useState)(window.innerWidth);(0,s.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var Xk=(0,m.withSelect)((e=>({selectedBlockClientId:e(zn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=wa(t);return t?(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,h.__)("Skip to the selected block")):null})),Qk=window.wp.wordcount,Jk=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(zn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Qk.count)((0,r.serialize)(t),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(Ha,{icon:tp,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,h.sprintf)(
89
  /* translators: %d: number of blocks */
90
  (0,h._n)("%d block","%d blocks",t.length),t.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,h.sprintf)(
91
  /* translators: %d: number of words */
92
- (0,h._n)("%d word","%d words",n),n))))}));function e_(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,m.useSelect)((e=>{var n,o;const l=e(zn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,s.useMemo)((()=>[{label:(0,h.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),a=(0,s.useMemo)((()=>{var e;return null===(e=ap(l))||void 0===e?void 0:e.name}),[l]),c=(0,s.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==a?o&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(p.SelectControl,{options:i,value:n||"",label:(0,h.__)("Default Style"),onChange:c})):null}const t_=e=>{let{clientId:t,blockName:n,hasBlockStyles:o}=e;const l=Rd(t);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Ua,l),(0,s.createElement)(Pv,{blockClientId:t}),o&&(0,s.createElement)("div",null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Styles")},(0,s.createElement)(vv,{scope:"core/block-inspector",clientId:t}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,s.createElement)(e_,{blockName:n}))),(0,s.createElement)(Jo.Slot,null),(0,s.createElement)(Jo.Slot,{__experimentalGroup:"typography",label:(0,h.__)("Typography")}),(0,s.createElement)(Jo.Slot,{__experimentalGroup:"border",label:(0,h.__)("Border")}),(0,s.createElement)(Jo.Slot,{__experimentalGroup:"dimensions",label:(0,h.__)("Dimensions")}),(0,s.createElement)("div",null,(0,s.createElement)(n_,null)),(0,s.createElement)(Xk,{key:"back"}))},n_=()=>{const e=(0,p.__experimentalUseSlot)(Qo.slotName);return Boolean(e.fills&&e.fills.length)?(0,s.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,h.__)("Advanced"),initialOpen:!1},(0,s.createElement)(Jo.Slot,{__experimentalGroup:"advanced"})):null};var o_=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:o,selectedBlockName:l,selectedBlockClientId:i,blockType:a}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(zn),{getBlockStyles:l}=e(r.store),i=t(),s=i&&o(i),a=s&&(0,r.getBlockType)(s),c=s&&l(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Jk,null),(0,s.createElement)(Jo.Slot,null));const c=l===(0,r.getUnregisteredTypeHandlerName)();return a&&i&&!c?(0,s.createElement)(t_,{clientId:i,blockName:a.name,hasBlockStyles:o}):t?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,h.__)("No block selected.")):null};function r_(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),l=(0,m.useSelect)((e=>e(zn).getSettings().hasFixedToolbar),[]),a=(0,ec.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:f}=(0,m.useSelect)(zn),{duplicateBlocks:h,removeBlocks:g,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:k,moveBlocksUp:_,moveBlocksDown:y}=(0,m.useDispatch)(zn);return(0,s.createElement)("div",i({},o,{onKeyDown:function(e){if(a("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));_(t,n)}}else if(a("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),h(t))}else if(a("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),v((0,u.last)(t)))}else if(a("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(a("core/block-editor/delete-multi-selection",e)){const t=c();t.length>1&&(e.preventDefault(),g(t))}else a("core/block-editor/unselect",e)&&c().length>1&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Td,{__unstableContentRef:n},(l||!r)&&(0,s.createElement)(Hp,{isFixed:!0}),(0,s.createElement)($p,{__unstableContentRef:n}),(0,s.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:Bd(n)}),t,(0,s.createElement)(p.Popover.Slot,{name:"__unstable-block-tools-after",ref:Bd(n)})))}var l_=function(e){let{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onSelect:c=u.noop,shouldFocusBlock:d=!1}=e;const p=(0,m.useSelect)((e=>{const{getBlockRootClientId:o}=e(zn);return t||o(n)||void 0}),[n,t]);return(0,s.createElement)(gd,{onSelect:c,rootClientId:p,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l,__experimentalInsertionIndex:i,__experimentalFilterValue:a,shouldFocusBlock:d})};function i_(){return null}i_.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(ec.store);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,h.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,h.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var s_=i_;function a_(){return Rt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const c_=new Set([ga.UP,ga.RIGHT,ga.DOWN,ga.LEFT,ga.ENTER,ga.BACKSPACE]);function u_(){const e=(0,m.useSelect)((e=>e(zn).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function d_(){const e=(0,m.useSelect)((e=>e(zn).isTyping())),{startTyping:t,stopTyping:n}=(0,m.useDispatch)(zn),o=u_(),r=(0,d.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let e;function t(t){const{target:o}=t;e=l.setTimeout((()=>{(0,or.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==ga.ESCAPE&&t!==ga.TAB||n()}function s(){const e=l.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",t),o.addEventListener("keydown",i),r.addEventListener("selectionchange",s),()=>{l.clearTimeout(e),o.removeEventListener("focus",t),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",s)}}function i(e){const{type:n,target:r}=e;(0,or.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&c_.has(t)}(e))&&t()}return o.addEventListener("keypress",i),o.addEventListener("keydown",i),()=>{o.removeEventListener("keypress",i),o.removeEventListener("keydown",i)}}),[e,t,n]);return(0,d.useMergeRefs)([o,r])}var p_=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:d_()},t)};function m_(){return Rt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const f_=-1!==window.navigator.userAgent.indexOf("Trident"),h_=new Set([ga.UP,ga.DOWN,ga.LEFT,ga.RIGHT]);function g_(){const e=(0,m.useSelect)((e=>e(zn).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,or.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(h_.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,or.getScrollContainer)(t);if(!a)return;const c=a===n.body,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:a.clientHeight;i.top+i.height>d+f||i.top<d?i=l:c?o.scrollBy(0,s):a.scrollTop+=s}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,or.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var v_=f_?e=>e.children:function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:g_(),className:"block-editor__typewriter"},t)};const b_=(0,s.createContext)({});function k_(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}function y_(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,s.useContext)(b_),{name:r}=Gn();n=n||r;const l=Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e)),i=(0,s.useMemo)((()=>k_(o,n,e)),[o,n,e]),a=(0,s.useCallback)((e=>{let{children:t}=e;return(0,s.createElement)(b_.Provider,{value:i},t)}),[i]);return[l,a]}function E_(e){if(void 0===e)e=v.colors;else{const t=e.filter((e=>e.color));0===t.length?e=v.colors:t.length<e.length&&(e=t)}return e}function C_(e){if(void 0===e)e=v.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=v.gradients:t.length<e.length&&(e=t)}return e}function S_(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function w_(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>S_(N_(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]<o[0]?o[0]+"px":o[1]>o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function B_(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=w_(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return S_(e)}function I_(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function x_(e){let t=!1;const n=e.split(/[+-/*/]/g).filter(Boolean);for(const o of n){const n=S_(N_(o));if(!parseFloat(n.value)){t=!0;break}e=e.replace(o,n.value)}return t?null:(o=e,Function(`'use strict'; return (${o})`)()).toFixed(0)+"px";var o}function T_(e,t){const n=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),r={em:o.fontSize,rem:o.fontSize,vh:o.height*n,vw:o.width*n,vmin:(o.width<o.height?o.width:o.height)*n,vmax:(o.width>o.height?o.width:o.height)*n,"%":("font"===o.type?o.fontSize:o.width)*n,ch:8,ex:7.15625,lh:o.lineHeight},l={in:96,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return r[e.unit]?(r[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function N_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=S_(e);return n.unit||(n=B_(e)),I_(e)&&!n.unit?x_(e):T_(n,t)}const P_={};function M_(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var R_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+M_(t);return P_[n]||(P_[n]=N_(e,t)),P_[n]}}(),(window.wp=window.wp||{}).blockEditor=o}();
1
+ !function(){var e={9367:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var i=l("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=o)},4184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},1934:function(e){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},5913:function(e,t){"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;l<i;l++){var c=t[l];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,l&&t[l-1].added){var u=t[l-1];t[l-1]=t[l],t[l]=u}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,g=m&&0<=f&&f<c;if(h||g){if(!h||g&&d.newPos<m.newPos?(l=r(m),i.pushComponent(l.components,void 0,!0)):((l=d).newPos++,i.pushComponent(l.components,!0,void 0)),f=i.extractCommon(l,t,e,n),l.newPos+1>=a&&f+1>=c)return s(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var h=f();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,s=i-o,a=0;i+1<r&&s+1<l&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:function(e,t,n){"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5913))&&o.__esModule?o:{default:o}).default)},9010:function(e,t,n){"use strict";var o=n(4657);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=!(!p||!t.frameElement),f=o.offset(e),h=o.outerHeight(e),g=o.outerWidth(e),v=void 0,b=void 0,_=void 0,k=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:f.left-S.left-c,top:f.top-S.top-a},E={left:f.left+g-(S.left+w)+d,top:f.top+h-(S.top+B)+u},k=S):(v=o.offset(t),b=t.clientHeight,_=t.clientWidth,k={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+g-(v.left+_+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,k.top+y.top):!1===i?o.scrollTop(t,k.top+E.top):y.top<0?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top):l||((i=void 0===i||!!i)?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top)),r&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,k.left+y.left):!1===s?o.scrollLeft(t,k.left+E.left):y.left<0?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left)))}},4979:function(e,t,n){"use strict";e.exports=n(9010)},4657:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function r(e){return o(e)}function l(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,l=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||l.clientLeft||0,top:o-=i.clientTop||l.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,l=n||r.defaultView.getComputedStyle(e,null);return l&&(o=l.getPropertyValue(t)||l[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,r=o.left,l=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=r,e.runtimeStyle.left=l}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},r=e.style,l=void 0;for(l in t)t.hasOwnProperty(l)&&(o[l]=r[l],r[l]=t[l]);for(l in n.call(e),t)t.hasOwnProperty(l)&&(r[l]=o[l])}function f(e,t,n){var o=0,r=void 0,l=void 0,i=void 0;for(l=0;l<t.length;l++)if(r=t[l])for(i=0;i<n.length;i++){var s;s="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var g={};function v(e,t,n){if(h(e))return"width"===t?g.viewportWidth(e):g.viewportHeight(e);if(9===e.nodeType)return"width"===t?g.docWidth(e):g.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,l=(c(e),d(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=l?1:-1);var s=void 0!==r||l,a=r||i;if(-1===n)return s?a-f(e,["border","padding"],o):i;if(s){var u=2===n?-f(e,["border"],o):f(e,["margin"],o);return a+(1===n?0:u)}return i+f(e,p.slice(n),o)}u(["Width","Height"],(function(e){g["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],g["viewport"+e](n))},g["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,l=o.documentElement[n];return"CSS1Compat"===o.compatMode&&l||r&&r[n]||l}}));var b={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function k(e,t,o){var r=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):c(e,t);for(var l in t)t.hasOwnProperty(l)&&k(e,l,t[l])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];g[e]=function(t,o){return void 0===o?t&&_(t,e,-1):t?(c(t),d(t)&&(o+=f(t,["padding","border"],n)),k(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===k(e,"position")&&(e.style.position="relative");var n=i(e),o={},r=void 0,l=void 0;for(l in t)t.hasOwnProperty(l)&&(r=parseFloat(k(e,l))||0,o[l]=r+t[l]-n[l]);k(e,o)}(e,t)},isWindow:h,each:u,css:k,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},g)},5717:function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},8303:function(e,t,n){var o=n(1934);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML="&nbsp;","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},2703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4857:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(9196),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},3692:function(e){var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?r(d):d,m={},f=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(f=!1)},delete:function(e){delete h.parent.node[h.key],e&&(f=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(f=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return h;function g(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}g();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),f?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),g(),a(h.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var l=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=l.node),l.isLast=r==h.keys.length-1,l.isFirst=0==r,m.post&&m.post.call(h,l),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function r(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];c.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=r(o);return e.push(o),t.push(s),a(l(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),r=new n(t);return r[e].apply(r,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},9196:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{AlignmentControl:function(){return Pg},AlignmentToolbar:function(){return Mg},Autocomplete:function(){return Dg},BlockAlignmentControl:function(){return zo},BlockAlignmentToolbar:function(){return Vo},BlockBreadcrumb:function(){return Hg},BlockColorsStyleSelector:function(){return jg},BlockContextProvider:function(){return ir},BlockControls:function(){return Yn},BlockEdit:function(){return ur},BlockEditorKeyboardShortcuts:function(){return ak},BlockEditorProvider:function(){return $a},BlockFormatControls:function(){return qn},BlockIcon:function(){return Ua},BlockInspector:function(){return rk},BlockList:function(){return mm},BlockMover:function(){return Yd},BlockNavigationDropdown:function(){return mv},BlockPreview:function(){return pu},BlockSelectionClearer:function(){return qa},BlockSettingsMenu:function(){return Vp},BlockSettingsMenuControls:function(){return Dp},BlockStyles:function(){return vv},BlockTitle:function(){return Ad},BlockToolbar:function(){return Hp},BlockTools:function(){return lk},BlockVerticalAlignmentControl:function(){return Fv},BlockVerticalAlignmentToolbar:function(){return zv},ButtonBlockAppender:function(){return wd},ButtonBlockerAppender:function(){return Sd},ColorPalette:function(){return Hv},ColorPaletteControl:function(){return Uv},ContrastChecker:function(){return bf},CopyHandler:function(){return wp},DefaultBlockAppender:function(){return Ed},FontSizePicker:function(){return Xf},InnerBlocks:function(){return cm},Inserter:function(){return yd},InspectorAdvancedControls:function(){return Jo},InspectorControls:function(){return er},JustifyContentControl:function(){return go},JustifyToolbar:function(){return vo},LineHeightControl:function(){return Rf},MediaPlaceholder:function(){return n_},MediaReplaceFlow:function(){return Xb},MediaUpload:function(){return Yb},MediaUploadCheck:function(){return Zb},MultiSelectScrollIntoView:function(){return ck},NavigableToolbar:function(){return zd},ObserveTyping:function(){return mk},PanelColorSettings:function(){return o_},PlainText:function(){return N_},PreserveScrollInReorder:function(){return fk},RichText:function(){return I_},RichTextShortcut:function(){return R_},RichTextToolbarButton:function(){return L_},SETTINGS_DEFAULTS:function(){return v},SkipToSelectedBlock:function(){return Q_},ToolSelector:function(){return O_},Typewriter:function(){return bk},URLInput:function(){return Bb},URLInputButton:function(){return H_},URLPopover:function(){return e_},Warning:function(){return pr},WritingFlow:function(){return rc},__experimentalBlockAlignmentMatrixControl:function(){return zg},__experimentalBlockContentOverlay:function(){return Ug},__experimentalBlockFullHeightAligmentControl:function(){return Fg},__experimentalBlockPatternSetup:function(){return Tv},__experimentalBlockVariationPicker:function(){return _v},__experimentalBlockVariationTransforms:function(){return Pv},__experimentalBorderRadiusControl:function(){return Um},__experimentalBorderStyleControl:function(){return qm},__experimentalColorGradientControl:function(){return _m},__experimentalColorGradientSettingsDropdown:function(){return km},__experimentalDuotoneControl:function(){return Qh},__experimentalFontAppearanceControl:function(){return Mf},__experimentalFontFamilyControl:function(){return Gf},__experimentalGetBorderClassesAndStyles:function(){return dg},__experimentalGetColorClassesAndStyles:function(){return mg},__experimentalGetGradientClass:function(){return of},__experimentalGetGradientObjectByGradientValue:function(){return lf},__experimentalGetMatchingVariation:function(){return Nv},__experimentalGetSpacingClassesAndStyles:function(){return gg},__experimentalImageEditingProvider:function(){return ub},__experimentalImageEditor:function(){return kb},__experimentalImageSizeControl:function(){return Eb},__experimentalImageURLInputUI:function(){return Y_},__experimentalLayoutStyle:function(){return Mo},__experimentalLetterSpacingControl:function(){return bh},__experimentalLibrary:function(){return ik},__experimentalLinkControl:function(){return jb},__experimentalLinkControlSearchInput:function(){return Fb},__experimentalLinkControlSearchItem:function(){return Tb},__experimentalLinkControlSearchResults:function(){return Mb},__experimentalListView:function(){return dv},__experimentalPanelColorGradientSettings:function(){return gf},__experimentalPreviewOptions:function(){return Z_},__experimentalResponsiveBlockControl:function(){return M_},__experimentalTextDecorationControl:function(){return ih},__experimentalTextTransformControl:function(){return fh},__experimentalUnitControl:function(){return F_},__experimentalUseBlockPreview:function(){return mu},__experimentalUseBorderProps:function(){return pg},__experimentalUseColorProps:function(){return hg},__experimentalUseCustomSides:function(){return Vh},__experimentalUseGradient:function(){return af},__experimentalUseNoRecursiveRenders:function(){return yk},__experimentalUseResizeCanvas:function(){return X_},__unstableBlockSettingsMenuFirstItem:function(){return Pp},__unstableEditorStyles:function(){return cu},__unstableIframe:function(){return sc},__unstableInserterMenuExtension:function(){return ud},__unstableRichTextInputEvent:function(){return A_},__unstableUseBlockSelectionClearer:function(){return Ka},__unstableUseClipboardHandler:function(){return Sp},__unstableUseMouseMoveTypingReset:function(){return dk},__unstableUseTypewriter:function(){return vk},__unstableUseTypingObserver:function(){return pk},createCustomColorsHOC:function(){return yg},getColorClassName:function(){return wm},getColorObjectByAttributeValues:function(){return Cm},getColorObjectByColorValue:function(){return Sm},getFontSize:function(){return qf},getFontSizeClass:function(){return Zf},getFontSizeObjectByValue:function(){return Yf},getGradientSlugByValue:function(){return sf},getGradientValueBySlug:function(){return rf},getPxFromCssUnit:function(){return Rk},store:function(){return zn},storeConfig:function(){return Fn},transformStyles:function(){return iu},useBlockDisplayInformation:function(){return Ld},useBlockEditContext:function(){return Gn},useBlockProps:function(){return Pa},useCachedTruthy:function(){return vg},useInnerBlocksProps:function(){return am},useSetting:function(){return mo},validateThemeColors:function(){return Ek},validateThemeGradients:function(){return Ck},withColorContext:function(){return Vv},withColors:function(){return Eg},withFontSizes:function(){return Sg}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return xt},__experimentalGetAllowedBlocks:function(){return at},__experimentalGetAllowedPatterns:function(){return pt},__experimentalGetBlockListSettingsForBlocks:function(){return bt},__experimentalGetDirectInsertBlock:function(){return ct},__experimentalGetLastBlockAttributeChanges:function(){return yt},__experimentalGetParsedPattern:function(){return ut},__experimentalGetPatternTransformItems:function(){return ft},__experimentalGetPatternsByBlockTypes:function(){return mt},__experimentalGetReusableBlockTitle:function(){return _t},__unstableGetBlockWithoutInnerBlocks:function(){return W},__unstableGetClientIdWithClientIdsTree:function(){return j},__unstableGetClientIdsTree:function(){return K},__unstableIsLastBlockChangeIgnored:function(){return kt},areInnerBlocksControlled:function(){return It},canInsertBlockType:function(){return qe},canInsertBlocks:function(){return Ye},canMoveBlock:function(){return Qe},canMoveBlocks:function(){return Je},canRemoveBlock:function(){return Ze},canRemoveBlocks:function(){return Xe},didAutomaticChange:function(){return wt},getAdjacentBlockClientId:function(){return pe},getBlock:function(){return G},getBlockAttributes:function(){return U},getBlockCount:function(){return Q},getBlockHierarchyRootClientId:function(){return ue},getBlockIndex:function(){return Ie},getBlockInsertionPoint:function(){return He},getBlockListSettings:function(){return ht},getBlockMode:function(){return Le},getBlockName:function(){return V},getBlockOrder:function(){return Be},getBlockParents:function(){return ae},getBlockParentsByBlockName:function(){return ce},getBlockRootClientId:function(){return se},getBlockSelectionEnd:function(){return ne},getBlockSelectionStart:function(){return te},getBlockTransformItems:function(){return it},getBlocks:function(){return $},getBlocksByClientId:function(){return X},getClientIdsOfDescendants:function(){return q},getClientIdsWithDescendants:function(){return Y},getDraggedBlockClientIds:function(){return Oe},getFirstMultiSelectedBlockClientId:function(){return _e},getGlobalBlockCount:function(){return Z},getInserterItems:function(){return lt},getLastMultiSelectedBlockClientId:function(){return ke},getLowestCommonAncestorWithSelectedBlock:function(){return de},getMultiSelectedBlockClientIds:function(){return ve},getMultiSelectedBlocks:function(){return be},getMultiSelectedBlocksEndClientId:function(){return we},getMultiSelectedBlocksStartClientId:function(){return Se},getNextBlockClientId:function(){return fe},getPreviousBlockClientId:function(){return me},getSelectedBlock:function(){return ie},getSelectedBlockClientId:function(){return le},getSelectedBlockClientIds:function(){return ge},getSelectedBlockCount:function(){return oe},getSelectedBlocksInitialCaretPosition:function(){return he},getSelectionEnd:function(){return ee},getSelectionStart:function(){return J},getSettings:function(){return gt},getTemplate:function(){return We},getTemplateLock:function(){return $e},hasBlockMovingClientId:function(){return St},hasInserterItems:function(){return st},hasMultiSelection:function(){return Pe},hasSelectedBlock:function(){return re},hasSelectedInnerBlock:function(){return Te},isAncestorBeingDragged:function(){return ze},isAncestorMultiSelected:function(){return Ce},isBlockBeingDragged:function(){return Fe},isBlockHighlighted:function(){return Bt},isBlockInsertionPointVisible:function(){return Ue},isBlockMultiSelected:function(){return Ee},isBlockSelected:function(){return xe},isBlockValid:function(){return H},isBlockWithinSelection:function(){return Ne},isCaretWithinFormattedText:function(){return Ve},isDraggingBlocks:function(){return De},isFirstMultiSelectedBlock:function(){return ye},isLastBlockChangePersistent:function(){return vt},isMultiSelecting:function(){return Me},isNavigationMode:function(){return Ct},isSelectionEnabled:function(){return Re},isTyping:function(){return Ae},isValidTemplate:function(){return Ge},wasBlockJustInserted:function(){return Tt}});var t={};n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return xn},__unstableMarkLastChangeAsPersistent:function(){return Bn},__unstableMarkNextChangeAsNotPersistent:function(){return In},__unstableSaveReusableBlock:function(){return wn},clearSelectedBlock:function(){return jt},duplicateBlocks:function(){return Pn},enterFormattedText:function(){return bn},exitFormattedText:function(){return kn},flashBlock:function(){return An},hideInsertionPoint:function(){return ln},insertAfterBlock:function(){return Rn},insertBeforeBlock:function(){return Mn},insertBlock:function(){return nn},insertBlocks:function(){return on},insertDefaultBlock:function(){return En},mergeBlocks:function(){return cn},moveBlockToPosition:function(){return tn},moveBlocksDown:function(){return Qt},moveBlocksToPosition:function(){return en},moveBlocksUp:function(){return Jt},multiSelect:function(){return $t},receiveBlocks:function(){return Ot},removeBlock:function(){return dn},removeBlocks:function(){return un},replaceBlock:function(){return Zt},replaceBlocks:function(){return Yt},replaceInnerBlocks:function(){return pn},resetBlocks:function(){return Lt},resetSelection:function(){return Dt},selectBlock:function(){return Vt},selectNextBlock:function(){return Ut},selectPreviousBlock:function(){return Ht},selectionChange:function(){return yn},setBlockMovingClientId:function(){return Nn},setHasControlledInnerBlocks:function(){return Dn},setNavigationMode:function(){return Tn},setTemplateValidity:function(){return sn},showInsertionPoint:function(){return rn},startDraggingBlocks:function(){return gn},startMultiSelect:function(){return Gt},startTyping:function(){return fn},stopDraggingBlocks:function(){return vn},stopMultiSelect:function(){return Wt},stopTyping:function(){return hn},synchronizeTemplate:function(){return an},toggleBlockHighlight:function(){return Ln},toggleBlockMode:function(){return mn},toggleSelection:function(){return Kt},updateBlock:function(){return zt},updateBlockAttributes:function(){return Ft},updateBlockListSettings:function(){return Cn},updateSettings:function(){return Sn},validateBlocksToTemplate:function(){return At}});var r=window.wp.blocks,l=window.wp.hooks;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}(0,l.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,r.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));var s=window.wp.element,a=n(4184),c=n.n(a),u=window.lodash,d=window.wp.compose,p=window.wp.components,m=window.wp.data,f={default:(0,p.createSlotFill)("BlockControls"),block:(0,p.createSlotFill)("BlockControlsBlock"),inline:(0,p.createSlotFill)("BlockFormatControls"),other:(0,p.createSlotFill)("BlockControlsOther"),parent:(0,p.createSlotFill)("BlockControlsParent")},h=window.wp.i18n;const g={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],__unstableGalleryWithImageBlocks:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function _(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,k(r,o))})),n}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function C(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function S(e){return E(e,(e=>e.attributes))}function w(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function B(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function I(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const x=(0,u.flow)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=B(o,n.blocks);o.tree=I(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=I(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=I(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(o,n.blocks);o.tree=I(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=I(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=I(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),o.tree=I(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=I(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=I(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:C(n.blocks),attributes:S(n.blocks),order:k(n.blocks),parents:y(n.blocks),controlledInnerBlocks:{}},o=B(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!w(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=k(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=k(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:_(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=e[o];if(!l.length||r===(0,u.first)(l))return e;const i=l.indexOf(r);return{...e,[o]:_(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=(0,u.last)(n),i=e[o];if(!i.length||l===(0,u.last)(i))return e;const s=i.indexOf(r);return{...e,[o]:_(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=k(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...y(t.blocks)};case"INSERT_BLOCKS":return{...e,...y(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var N,P,M=(0,m.combineReducers)({blocks:x,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;switch(o.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.startOffset},selectionEnd:{clientId:o.clientId,attributeKey:o.attributeKey,offset:o.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=o;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=o;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,c=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!a&&!c)return n;if(!o.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!o.blocks.some((e=>e.clientId===c)))return{...n,selectionEnd:n.selectionStart}}return{selectionStart:T(n.selectionStart,o),selectionEnd:T(n.selectionEnd,o)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,m.select)(r.store).getActiveBlockVariation(l,o);let s=null!=i&&i.name?`${l}/${i.name}`:l;const a={name:s};return"core/block"===l&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t}});function R(e){return[e]}function L(){var e={clear:function(){e.head=null}};return e}function A(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function D(e,t){var n,o;function r(){n=P?new WeakMap:L()}function l(){var n,r,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for(s=t.apply(null,i),(n=o(s)).isUniqueByDependants||(n.lastDependants&&!A(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(A(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=R),o=P?function(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has(N)||((l=L()).isUniqueByDependants=a,s.set(N,l)),s.get(N)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}N={},P="undefined"!=typeof WeakMap;var O=window.wp.primitives,F=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const z=[];function V(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:r}=n;return r?`core/social-link-${r}`:o}return n?n.name:null}function H(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function U(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function G(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const W=D(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:U(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function $(e,t){var n;const o=t&&It(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||z}const j=D(((e,t)=>({clientId:t,innerBlocks:K(e,t)})),(e=>[e.blocks.order])),K=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Be(e,t),(t=>j(e,t)))}),(e=>[e.blocks.order])),q=(e,t)=>(0,u.flatMap)(t,(t=>{const n=Be(e,t);return[...n,...q(e,n)]})),Y=D((e=>{const t=Be(e);return[...t,...q(e,t)]}),(e=>[e.blocks.order])),Z=D(((e,t)=>{const n=Y(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),X=D(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>G(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function Q(e,t){return Be(e,t).length}function J(e){return e.selection.selectionStart}function ee(e){return e.selection.selectionEnd}function te(e){return e.selection.selectionStart.clientId}function ne(e){return e.selection.selectionEnd.clientId}function oe(e){return ve(e).length||(e.selection.selectionStart.clientId?1:0)}function re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function le(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ie(e){const t=le(e);return t?G(e,t):null}function se(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ae=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),ce=D((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=ae(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:V(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ue(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function de(e,t){const n=le(e),o=[...ae(e,t),t],r=[...ae(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function pe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=le(e)),void 0===t&&(t=n<0?_e(e):ke(e)),!t)return null;const o=se(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),s=i+1*n;return s<0||s===l.length?null:l[s]}function me(e,t){return pe(e,t,-1)}function fe(e,t){return pe(e,t,1)}function he(e){return e.initialPosition}const ge=D((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return z;if(t.clientId===n.clientId)return[t.clientId];const o=se(e,t.clientId);if(null===o)return z;const r=Be(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?z:ge(e)}const be=D((e=>{const t=ve(e);return t.length?t.map((t=>G(e,t))):z}),(e=>[...ge.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function _e(e){return(0,u.first)(ve(e))||null}function ke(e){return(0,u.last)(ve(e))||null}function ye(e,t){return _e(e)===t}function Ee(e,t){return-1!==ve(e).indexOf(t)}const Ce=D(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=se(e,n),o=Ee(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Se(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function we(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Be(e,t){return e.blocks.order[t||""]||z}function Ie(e,t){return Be(e,se(e,t)).indexOf(t)}function xe(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Te(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Be(e,t),(t=>xe(e,t)||Ee(e,t)||n&&Te(e,t,n)))}function Ne(e,t){if(!t)return!1;const n=ve(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Me(e){return e.isMultiSelecting}function Re(e){return e.isSelectionEnabled}function Le(e,t){return e.blocksMode[t]||"visual"}function Ae(e){return e.isTyping}function De(e){return!!e.draggedBlocks.length}function Oe(e){return e.draggedBlocks}function Fe(e,t){return e.draggedBlocks.includes(t)}function ze(e,t){if(!De(e))return!1;const n=ae(e,t);return(0,u.some)(n,(t=>Fe(e,t)))}function Ve(e){return e.isCaretWithinFormattedText}function He(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=se(e,l)||void 0,n=Ie(e,r.clientId)+1):n=Be(e).length,{rootClientId:t,index:n}}function Ue(e){return null!==e.insertionPoint}function Ge(e){return e.template.isValid}function We(e){return e.settings.template}function $e(e,t){if(!t)return e.settings.templateLock;const n=ht(e,t);return n?n.templateLock:null}const je=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},Ke=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=gt(e),s=je(i,t,!0);if(!s)return!1;const a=!!$e(e,o);if(a)return!1;const c=ht(e,o);if(o&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,d=je(u,t),p=n.parent,m=V(e,o),f=je(p,m),h=null===d&&null===f||!0===d||!0===f;return h?(0,l.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,o,{getBlock:G.bind(null,e),getBlockParentsByBlockName:ce.bind(null,e)}):h},qe=D(Ke,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Ye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>qe(e,V(e,t),n)))}function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=U(e,t);if(null===o)return!0;const{lock:r}=o,l=!!$e(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function Xe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Ze(e,t,n)))}function Qe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=U(e,t);if(null===o)return;const{lock:r}=o,l="all"===$e(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function Je(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>Qe(e,t,n)))}function et(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const tt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&Ke(e,t.name,n),nt=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=et(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:ot(r,l)}},ot=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},rt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(X(e,Y(e)),{name:t.name}));const{time:i,count:s=0}=et(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:ot(i,s)};if("transform"===n)return a;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},lt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=rt(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=F;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:a=0}=et(e,l)||{},c=ot(i,a);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>tt(e,n,t))).map(n),a=Ke(e,"core/block",t)?Et(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=nt(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Et(e),(0,r.getBlockTypes)()])),it=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=rt(e,{buildScope:"transform"}),l=(0,r.getBlockTypes)().filter((t=>tt(e,t,n))).map(o),i=(0,u.mapKeys)(l,(e=>{let{name:t}=e;return t})),s=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]),a=(0,u.orderBy)(s,(e=>i[e.name].frecency),"desc");return a}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),st=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>tt(e,n,t)));if(n)return!0;const o=Ke(e,"core/block",t)&&Et(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Et(e),(0,r.getBlockTypes)()])),at=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>tt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),ct=D((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l(G(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),ut=D(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),dt=D((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=gt(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return ut(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!je(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),pt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=dt(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return qe(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),mt=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return z;const o=pt(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...pt.getDependants(e,t)])),ft=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return z;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||It(e,n)})))return z;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return mt(e,o,n)}),((e,t)=>[...mt.getDependants(e,t)]));function ht(e,t){return e.blockListSettings[t]}function gt(e){return e.settings}function vt(e){return e.blocks.isPersistentChange}const bt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),_t=D(((e,t)=>{var n;const o=(0,u.find)(Et(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Et(e)]));function kt(e){return e.blocks.isIgnoredChange}function yt(e){return e.lastBlockAttributesChange}function Et(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:z}function Ct(e){return e.isNavigationMode}function St(e){return e.hasBlockMovingClientId}function wt(e){return!!e.automaticChangeStatus}function Bt(e,t){return e.highlightedBlock===t}function It(e,t){return!!e.blocks.controlledInnerBlocks[t]}const xt=D(((e,t)=>{if(!t.length)return null;const n=le(e);if(t.includes(V(e,n)))return n;const o=ve(e),r=ce(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Tt(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var Nt=window.wp.a11y,Pt=window.wp.richText,Mt=window.wp.deprecated,Rt=n.n(Mt);const Lt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(At(e))},At=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),s=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function Dt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ot(e){return Rt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function zt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Vt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Ht=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},Ut=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function Gt(){return{type:"START_MULTI_SELECT"}}function Wt(){return{type:"STOP_MULTI_SELECT"}}const $t=(e,t)=>n=>{let{select:o,dispatch:r}=n;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t});const l=o.getSelectedBlockCount();(0,Nt.speak)((0,h.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
+ (0,h._n)("%s block selected.","%s blocks selected.",l),l),"assertive")};function jt(){return{type:"CLEAR_SELECTED_BLOCK"}}function Kt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function qt(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const Yt=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:s}=l;e=(0,u.castArray)(e),t=qt((0,u.castArray)(t),i.getSettings());const a=i.getBlockRootClientId((0,u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function Zt(e,t){return Yt(e,t)}const Xt=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},Qt=Xt("MOVE_BLOCKS_DOWN"),Jt=Xt("MOVE_BLOCKS_UP"),en=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return en([e],t,n,o)}function nn(e,t,n,o,r){return on([e],t,n,o,0,r)}const on=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;(0,u.isObject)(r)&&(l=r,r=0,Rt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=qt((0,u.castArray)(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function ln(){return{type:"HIDE_INSERTION_POINT"}}function sn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const an=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},cn=(e,t)=>n=>{let{select:o,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[s,a]=i,c=o.getBlock(s),d=(0,r.getBlockType)(c.name);if(d&&!d.merge)return void l.selectBlock(c.clientId);const p=o.getBlock(a),m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:h,offset:g}=o.getSelectionStart(),v=(f===s?d:m).attributes[h],b=(f===s||f===a)&&void 0!==h&&void 0!==g&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const _=(0,r.cloneBlock)(c),k=(0,r.cloneBlock)(p);if(b){const e=f===s?_:k,t=e.attributes[h],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=v,l=(0,Pt.insert)((0,Pt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),"†",g,g);e.attributes[h]=(0,Pt.toHTMLString)({value:l,multilineTag:n,preserveWhiteSpace:r})}const y=c.name===p.name?[k]:(0,r.switchToBlockType)(k,c.name);if(!y||!y.length)return;const E=d.merge(_.attributes,y[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=d.attributes[e],i=(0,Pt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),s=i.text.indexOf("†"),a=(0,Pt.remove)(i,s,s+1),p=(0,Pt.toHTMLString)({value:a,multilineTag:n,preserveWhiteSpace:r});E[e]=p,l.selectionChange(c.clientId,e,s,s)}l.replaceBlocks([c.clientId,p.clientId],[{...c,attributes:{...c.attributes,...E}},...y.slice(1)],0)},un=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function dn(e,t){return un([e],t)}function pn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function mn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function fn(){return{type:"START_TYPING"}}function hn(){return{type:"STOP_TYPING"}}function gn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function vn(){return{type:"STOP_DRAGGING_BLOCKS"}}function bn(){return{type:"ENTER_FORMATTED_TEXT"}}function kn(){return{type:"EXIT_FORMATTED_TEXT"}}function yn(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function En(e,t,n){const o=(0,r.getDefaultBlockName)();if(o)return nn((0,r.createBlock)(o,e),n,t)}function Cn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Sn(e){return{type:"UPDATE_SETTINGS",settings:e}}function wn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Bn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function In(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const xn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Tn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Nt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Nt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Nn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Nt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Pn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if((0,u.some)(i,(e=>!e)))return;if(i.map((e=>e.name)).some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),a=o.getBlockIndex((0,u.last)((0,u.castArray)(e))),c=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(c,a+1,s,t),c.length>1&&t&&l.multiSelect((0,u.first)(c).clientId,(0,u.last)(c).clientId),c.map((e=>e.clientId))}},Mn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l)},Rn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l+1)};function Ln(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const An=e=>async t=>{let{dispatch:n}=t;n(Ln(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Ln(e,!1))};function Dn(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const On="core/block-editor",Fn={reducer:M,selectors:e,actions:t,__experimentalUseThunks:!0},zn=(0,m.createReduxStore)(On,{...Fn,persist:["preferences"]});(0,m.registerStore)(On,{...Fn,persist:["preferences"]});const Vn={name:"",isSelected:!1},Hn=(0,s.createContext)(Vn),{Provider:Un}=Hn;function Gn(){return(0,s.useContext)(Hn)}function Wn(){const{isSelected:e,clientId:t,name:n}=Gn();return(0,m.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(zn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function $n(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=Wn(),{clientId:o}=Gn(),l=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(zn),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,s.createElement)(p.ToolbarGroup,{controls:n}),o)}))):null}function jn(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(p.__experimentalToolbarContext),r=f[t].Slot,l=(0,p.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const Kn=$n;Kn.Slot=jn;const qn=e=>(0,s.createElement)($n,i({group:"inline"},e));qn.Slot=e=>(0,s.createElement)(jn,i({group:"inline"},e));var Yn=Kn,Zn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Xn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Qn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),Jn=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),eo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),to=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),no=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),oo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),ro=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),lo=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),io=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),so=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function ao(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const co=["color","border","typography","spacing"],uo={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0:e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>void 0===e.fontSizes?void 0:e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},po={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function mo(e){const{name:t}=Gn();return(0,m.useSelect)((n=>{var o;if(co.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");const l=n(zn).getSettings(),i=(e=>po[e]||e)(e),s=`__experimentalFeatures.${i}`,a=`__experimentalFeatures.blocks.${t}.${i}`,c=null!==(o=(0,u.get)(l,a))&&void 0!==o?o:(0,u.get)(l,s);var d,p;if(void 0!==c)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(p=c.custom)&&void 0!==p?p:c.theme)&&void 0!==d?d:c.default:c;const m=uo[i]?uo[i](l):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,e])}const fo={left:no,center:oo,right:ro,"space-between":lo};var ho=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:a}=e;const c=e=>{o(e===r?void 0:e)},u=r?fo[r]:fo.left,d=[{name:"left",icon:no,title:(0,h.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:oo,title:(0,h.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:ro,title:(0,h.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:lo,title:(0,h.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],m=a?p.ToolbarGroup:p.ToolbarDropdownMenu,f=a?{isCollapsed:n}:{};return(0,s.createElement)(m,i({icon:u,popoverProps:l,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};function go(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!1}))}function vo(e){return(0,s.createElement)(ho,i({},e,{isToolbar:!0}))}const bo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},_o={left:"flex-start",right:"flex-end",center:"center"},ko=["wrap","nowrap"];var yo={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n}=e;const{allowOrientation:o=!0}=t;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Flex,null,(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Eo,{layout:t,onChange:n})),(0,s.createElement)(p.FlexItem,null,o&&(0,s.createElement)(So,{layout:t,onChange:n}))),(0,s.createElement)(Co,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;return null!=o&&o.allowSwitching?null:(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Eo,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){var t,n;let{selector:o,layout:r,style:l}=e;const{orientation:i="horizontal"}=r,a=null!==mo("spacing.blockGap"),c=null!==(t=null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap)&&void 0!==t?t:"var( --wp--style--block-gap, 0.5em )",u=bo[r.justifyContent]||bo.left,d=ko.includes(r.flexWrap)?r.flexWrap:"wrap",p=`\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tjustify-content: ${u};\n\t\t`,m=`\n\t\tflex-direction: column;\n\t\talign-items: ${_o[r.justifyContent]||_o.left};\n\t\t`;return(0,s.createElement)("style",null,`\n\t\t\t\t${ao(o)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${a?c:"0.5em"};\n\t\t\t\t\tflex-wrap: ${d};\n\t\t\t\t\t${"horizontal"===i?p:m}\n\t\t\t\t}\n\n\t\t\t\t${ao(o,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Eo(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l&&a.push("space-between"),o)return(0,s.createElement)(go,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:no,label:(0,h.__)("Justify items left")},{value:"center",icon:oo,label:(0,h.__)("Justify items center")},{value:"right",icon:ro,label:(0,h.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:lo,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(p.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function Co(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function So(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(p.Button,{label:"horizontal",icon:io,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(p.Button,{label:"vertical",icon:so,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var wo=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})};const Bo=[{name:"default",label:(0,h.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r}=t,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:l}),(0,s.createElement)(wo,{icon:Qn})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:l}),(0,s.createElement)(wo,{icon:eo}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(p.Button,{variant:"secondary",isSmall:!0,disabled:!r&&!o,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,h.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){var t,n;let{selector:o,layout:r={},style:l}=e;const{contentSize:i,wideSize:a}=r,c=null!==mo("spacing.blockGap"),u=null!==(t=null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap)&&void 0!==t?t:"var( --wp--style--block-gap )";let d=i||a?`\n\t\t\t\t\t${ao(o,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:a};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t${ao(o,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=a?a:i};\n\t\t\t\t\t}\n\n\t\t\t\t\t${ao(o,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return d+=`\n\t\t\t${ao(o,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\n\t\t\t${ao(o,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,c&&(d+=`\n\t\t\t\t${ao(o,"> *")} {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t\t${ao(o,"> * + *")} {\n\t\t\t\t\tmargin-top: ${u};\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,d)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(
4
  // translators: %s: container size (i.e. 600px etc)
5
  o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),r.test(n)&&(
6
  // translators: %s: container size (i.e. 600px etc)
7
+ o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},yo];function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Bo.find((t=>t.name===e))}const xo={type:"default"},To=(0,s.createContext)(xo),No=To.Provider;function Po(){return(0,s.useContext)(To)}function Mo(e){let{layout:t={},...n}=e;const o=Io(t.type);return o?(0,s.createElement)(o.save,i({layout:t},n)):null}const Ro=["none","left","center","right","wide","full"],Lo=["wide","full"];function Ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ro;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=Po(),r=Io(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name)return[];const{alignments:i=Ro}=o,s=e.filter((e=>(o.alignments||t||!Lo.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const Do={none:{icon:Zn,title:(0,h.__)("None")},left:{icon:Xn,title:(0,h.__)("Align left")},center:{icon:Qn,title:(0,h.__)("Align center")},right:{icon:Jn,title:(0,h.__)("Align right")},wide:{icon:eo,title:(0,h.__)("Wide width")},full:{icon:to,title:(0,h.__)("Full width")}},Oo={isAlternate:!0};var Fo=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const a=Ao(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Do[t],m=Do.none,f=r?p.ToolbarGroup:p.ToolbarDropdownMenu,g={popoverProps:Oo,icon:d?d.icon:m.icon,label:(0,h.__)("Align"),toggleProps:{describedBy:(0,h.__)("Change alignment")}},v=r||s.Platform.isNative?{isCollapsed:r?l:void 0,controls:a.map((e=>{let{name:n}=e;return{...Do[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Do[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(p.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,s.createElement)(f,i({},g,v))};function zo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!1}))}function Vo(e){return(0,s.createElement)(Fo,i({},e,{isToolbar:!0}))}const Ho=["left","center","right","wide","full"],Uo=["wide","full"];function Go(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Ho.filter((t=>e.includes(t))):!0===e?[...Ho]:[],!o||!0===e&&!n?(0,u.without)(t,...Uo):t}const Wo=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,s.createElement)(s.Fragment,null,!!o.length&&(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(zo,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),(0,s.createElement)(e,t))}),"withToolbarControls"),$o=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=Ao(Go((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Ho,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",$o),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Wo),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Go((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e})),window.wp.warning;var jo={default:(0,p.createSlotFill)("InspectorControls"),advanced:(0,p.createSlotFill)("InspectorAdvancedControls"),border:(0,p.createSlotFill)("InspectorControlsBorder"),dimensions:(0,p.createSlotFill)("InspectorControlsDimensions"),typography:(0,p.createSlotFill)("InspectorControlsTypography")};function Ko(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=Wn(),l=null===(t=jo[n])||void 0===t?void 0:t.Fill;return l?r?(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(p.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const qo=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,qo),u.identity);return(0,u.isEmpty)(t)?void 0:t};function Yo(e){let{children:t,group:n,label:o}=e;const{attributes:r,clientIds:l,panelId:i}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getMultiSelectedBlockClientIds:n,getSelectedBlockClientId:o,hasMultiSelection:r}=e(zn),l=o();if(r()){const e=n(),o=e.reduce(((e,n)=>(e[n]=t(n),e)),{});return{panelId:l,clientIds:e,attributes:o}}return{panelId:l,clientIds:[l],attributes:{[l]:t(l)}}}),[]),{updateBlockAttributes:a}=(0,m.useDispatch)(zn);return(0,s.createElement)(p.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};l.forEach((n=>{const{style:o}=r[n];let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:qo(l.style)},t[n]=l})),a(l,t,!0)},key:i,panelId:i,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0},t)}function Zo(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(p.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function Xo(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=jo[n])||void 0===t?void 0:t.Slot,a=(0,p.__experimentalUseSlot)(null==l?void 0:l.__unstableName);return l&&a?Boolean(a.fills&&a.fills.length)?o?(0,s.createElement)(Yo,{group:n,label:o},(0,s.createElement)(Zo,i({},r,{Slot:l}))):(0,s.createElement)(l,i({},r,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const Qo=Ko;Qo.Slot=Xo;const Jo=e=>(0,s.createElement)(Ko,i({},e,{__experimentalGroup:"advanced"}));Jo.Slot=e=>(0,s.createElement)(Xo,i({},e,{__experimentalGroup:"advanced"})),Jo.slotName="InspectorAdvancedControls";var er=Qo;const tr=/[\s#]/g,nr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(p.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(p.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(tr,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(er,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",nr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const or=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(er,{__experimentalGroup:"advanced"},(0,s.createElement)(p.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",or),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));var rr=window.wp.dom;const lr=(0,s.createContext)({});function ir(e){let{value:t,children:n}=e;const o=(0,s.useContext)(lr),r=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)(lr.Provider,{value:r,children:n})}var sr=lr;const ar={};var cr=(0,p.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(sr),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):ar),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function ur(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(Un,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(cr,e))}var dr=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),pr=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||r)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,s.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:dr,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(p.MenuGroup,null,r.map(((e,t)=>(0,s.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},mr=n(7630);function fr(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(p.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var hr=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const a=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=a,(0,mr.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(fr,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(fr,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))};const gr=e=>(0,r.rawHandler)({HTML:e.originalContent});var vr=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(zn).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(zn);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,gr(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const a=!!(0,r.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),m=(0,s.useCallback)((()=>u(!1)),[]),f=(0,s.useMemo)((()=>[{
8
  // translators: Button to fix block content
9
+ title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(pr,{actions:[(0,s.createElement)(p.Button,{key:"recover",onClick:l,variant:"primary"},(0,h.__)("Attempt Block Recovery"))],secondaryActions:f},(0,h.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(p.Modal,{title:// translators: Dialog title to fix block content
10
+ (0,h.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,s.createElement)(hr,{block:i,onKeep:t,onConvert:n,convertor:gr,convertButtonText:(0,h.__)("Convert to Blocks")})))}));const br=(0,s.createElement)(pr,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed."));var _r=()=>br;class kr extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var yr=kr,Er=n(4042),Cr=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),l=(0,m.useSelect)((e=>e(zn).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(zn);return(0,s.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,s.createElement)(Er.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const s=(0,r.getBlockAttributes)(e,n,l.attributes),a=n||(0,r.getSaveContent)(e,s),c=!n||(0,r.isValidBlockContent)(e,s,a);i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let Sr=zr();const wr=e=>Ar(e,Sr);let Br=zr();wr.write=e=>Ar(e,Br);let Ir=zr();wr.onStart=e=>Ar(e,Ir);let xr=zr();wr.onFrame=e=>Ar(e,xr);let Tr=zr();wr.onFinish=e=>Ar(e,Tr);let Nr=[];wr.setTimeout=(e,t)=>{let n=wr.now()+t,o=()=>{let e=Nr.findIndex((e=>e.cancel==o));~e&&Nr.splice(e,1),Hr.count-=~e?1:0},r={time:n,handler:e,cancel:o};return Nr.splice(Pr(n),0,r),Hr.count+=1,Dr(),r};let Pr=e=>~(~Nr.findIndex((t=>t.time>e))||~Nr.length);wr.cancel=e=>{Sr.delete(e),Br.delete(e)},wr.sync=e=>{Lr=!0,wr.batchedUpdates(e),Lr=!1},wr.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,wr.onStart(n)}return o.handler=e,o.cancel=()=>{Ir.delete(n),t=null},o};let Mr="undefined"!=typeof window?window.requestAnimationFrame:()=>{};wr.use=e=>Mr=e,wr.now="undefined"!=typeof performance?()=>performance.now():Date.now,wr.batchedUpdates=e=>e(),wr.catch=console.error,wr.frameLoop="always",wr.advance=()=>{"demand"!==wr.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Fr()};let Rr=-1,Lr=!1;function Ar(e,t){Lr?(t.delete(e),e(0)):(t.add(e),Dr())}function Dr(){Rr<0&&(Rr=0,"demand"!==wr.frameLoop&&Mr(Or))}function Or(){~Rr&&(Mr(Or),wr.batchedUpdates(Fr))}function Fr(){let e=Rr;Rr=wr.now();let t=Pr(Rr);t&&(Vr(Nr.splice(0,t),(e=>e.handler())),Hr.count-=t),Ir.flush(),Sr.flush(e?Math.min(64,Rr-e):16.667),xr.flush(),Br.flush(),Tr.flush()}function zr(){let e=new Set,t=e;return{add(n){Hr.count+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Hr.count-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Hr.count-=t.size,Vr(t,(t=>t(n)&&e.add(t))),Hr.count+=e.size,t=e)}}}function Vr(e,t){e.forEach((e=>{try{t(e)}catch(e){wr.catch(e)}}))}const Hr={count:0,clear(){Rr=-1,Nr=[],Ir=zr(),Sr=zr(),xr=zr(),Br=zr(),Tr=zr(),Hr.count=0}};var Ur=n(9196),Gr=n.n(Ur);function Wr(){}const $r={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function jr(e,t){if($r.arr(e)){if(!$r.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Kr=(e,t)=>e.forEach(t);function qr(e,t,n){for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const Yr=e=>$r.und(e)?[]:$r.arr(e)?e:[e];function Zr(e,t){if(e.size){const n=Array.from(e);e.clear(),Kr(n,t)}}const Xr=(e,...t)=>Zr(e,(e=>e(...t)));let Qr,Jr,el=null,tl=!1,nl=Wr;var ol=Object.freeze({__proto__:null,get createStringInterpolator(){return Qr},get to(){return Jr},get colors(){return el},get skipAnimation(){return tl},get willAdvance(){return nl},assign:e=>{e.to&&(Jr=e.to),e.now&&(wr.now=e.now),void 0!==e.colors&&(el=e.colors),null!=e.skipAnimation&&(tl=e.skipAnimation),e.createStringInterpolator&&(Qr=e.createStringInterpolator),e.requestAnimationFrame&&wr.use(e.requestAnimationFrame),e.batchedUpdates&&(wr.batchedUpdates=e.batchedUpdates),e.willAdvance&&(nl=e.willAdvance),e.frameLoop&&(wr.frameLoop=e.frameLoop)}});const rl=new Set;let ll=[],il=[],sl=0;const al={get idle(){return!rl.size&&!ll.length},start(e){sl>e.priority?(rl.add(e),wr.onStart(cl)):(ul(e),wr(pl))},advance:pl,sort(e){if(sl)wr.onFrame((()=>al.sort(e)));else{const t=ll.indexOf(e);~t&&(ll.splice(t,1),dl(e))}},clear(){ll=[],rl.clear()}};function cl(){rl.forEach(ul),rl.clear(),wr(pl)}function ul(e){ll.includes(e)||dl(e)}function dl(e){ll.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(ll),0,e)}function pl(e){const t=il;for(let n=0;n<ll.length;n++){const o=ll[n];sl=o.priority,o.idle||(nl(o),o.advance(e),o.idle||t.push(o))}return sl=0,il=ll,il.length=0,ll=t,ll.length>0}const ml="[-+]?\\d*\\.?\\d+",fl=ml+"%";function hl(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const gl=new RegExp("rgb"+hl(ml,ml,ml)),vl=new RegExp("rgba"+hl(ml,ml,ml,ml)),bl=new RegExp("hsl"+hl(ml,fl,fl)),_l=new RegExp("hsla"+hl(ml,fl,fl,ml)),kl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,yl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,El=/^#([0-9a-fA-F]{6})$/,Cl=/^#([0-9a-fA-F]{8})$/;function Sl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wl(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=Sl(r,o,e+1/3),i=Sl(r,o,e),s=Sl(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function Bl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Il(e){return(parseFloat(e)%360+360)%360/360}function xl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Tl(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Nl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=El.exec(e))?parseInt(t[1]+"ff",16)>>>0:el&&void 0!==el[e]?el[e]:(t=gl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|255)>>>0:(t=vl.exec(e))?(Bl(t[1])<<24|Bl(t[2])<<16|Bl(t[3])<<8|xl(t[4]))>>>0:(t=kl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Cl.exec(e))?parseInt(t[1],16)>>>0:(t=yl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=bl.exec(e))?(255|wl(Il(t[1]),Tl(t[2]),Tl(t[3])))>>>0:(t=_l.exec(e))?(wl(Il(t[1]),Tl(t[2]),Tl(t[3]))|xl(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const Pl=(e,t,n)=>{if($r.fun(e))return e;if($r.arr(e))return Pl({range:e,output:t,extrapolate:n});if($r.str(e.output[0]))return Qr(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};function Ml(){return(Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const Rl=Symbol.for("FluidValue.get"),Ll=Symbol.for("FluidValue.observers"),Al=e=>Boolean(e&&e[Rl]),Dl=e=>e&&e[Rl]?e[Rl]():e,Ol=e=>e[Ll]||null;function Fl(e,t){let n=e[Ll];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class zl{constructor(e){if(this[Rl]=void 0,this[Ll]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Vl(this,e)}}const Vl=(e,t)=>Gl(e,Rl,t);function Hl(e,t){if(e[Rl]){let n=e[Ll];n||Gl(e,Ll,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ul(e,t){let n=e[Ll];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Ll]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Gl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Wl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,$l=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;let jl;const Kl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ql=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Yl=e=>{jl||(jl=el?new RegExp(`(${Object.keys(el).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Dl(e).replace($l,Nl).replace(jl,Nl))),n=t.map((e=>e.match(Wl).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Pl(Ml({},e,{output:t}))));return e=>{let n=0;return t[0].replace(Wl,(()=>String(o[n++](e)))).replace(Kl,ql)}},Zl="react-spring: ",Xl=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Zl}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ql=Xl(console.warn),Jl=Xl(console.warn);function ei(e){return $r.str(e)&&("#"==e[0]||/\d/.test(e)||e in(el||{}))}const ti=e=>(0,Ur.useEffect)(e,ni),ni=[];function oi(){const e=(0,Ur.useState)()[1],t=(0,Ur.useState)(ri)[0];return ti(t.unmount),()=>{t.current&&e({})}}function ri(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function li(e){const t=(0,Ur.useRef)();return(0,Ur.useEffect)((()=>{t.current=e})),t.current}const ii="undefined"!=typeof window&&window.document&&window.document.createElement?Ur.useLayoutEffect:Ur.useEffect,si=Symbol.for("Animated:node"),ai=e=>e&&e[si],ci=(e,t)=>{return n=e,o=si,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ui=e=>e&&e[si]&&e[si].getPayload();class di{constructor(){this.payload=void 0,ci(this,this)}getPayload(){return this.payload||[]}}class pi extends di{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,$r.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new pi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return $r.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,$r.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class mi extends pi{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=Pl({output:[e,e]})}static create(e){return new mi(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if($r.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Pl({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fi={dependencies:null};class hi extends di{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return qr(this.source,((n,o)=>{var r;(r=n)&&r[si]===r?t[o]=n.getValue(e):Al(n)?t[o]=Dl(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Kr(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return qr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fi.dependencies&&Al(e)&&fi.dependencies.add(e);const t=ui(e);t&&Kr(t,(e=>this.add(e)))}}class gi extends hi{constructor(e){super(e)}static create(e){return new gi(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(vi)),!0)}}function vi(e){return(ei(e)?mi:pi).create(e)}function bi(e){const t=ai(e);return t?t.constructor:$r.arr(e)?gi:ei(e)?mi:pi}function _i(){return(_i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const ki=(e,t)=>{const n=!$r.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ur.forwardRef)(((o,r)=>{const l=(0,Ur.useRef)(null),i=n&&(0,Ur.useCallback)((e=>{l.current=function(e,t){return e&&($r.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,a]=function(e,t){const n=new Set;return fi.dependencies=n,e.style&&(e=_i({},e,{style:t.createAnimatedStyle(e.style)})),e=new hi(e),fi.dependencies=null,[e,n]}(o,t),c=oi(),u=()=>{const e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new yi(u,a),p=(0,Ur.useRef)();ii((()=>{const e=p.current;p.current=d,Kr(a,(e=>Hl(e,d))),e&&(Kr(e.deps,(t=>Ul(t,e))),wr.cancel(e.update))})),(0,Ur.useEffect)(u,[]),ti((()=>()=>{const e=p.current;Kr(e.deps,(t=>Ul(t,e)))}));const m=t.getComponentProps(s.getValue());return Ur.createElement(e,_i({},m,{ref:i}))}))};class yi{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wr.write(this.update)}}const Ei=Symbol.for("AnimatedComponent"),Ci=e=>$r.str(e)?e:e&&$r.str(e.displayName)?e.displayName:$r.fun(e)&&e.name||null;function Si(){return(Si=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function wi(e,...t){return $r.fun(e)?e(...t):e}const Bi=(e,t)=>!0===e||!!(t&&e&&($r.fun(e)?e(t):Yr(e).includes(t))),Ii=(e,t)=>$r.obj(e)?t&&e[t]:e,xi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ti=e=>e,Ni=(e,t=Ti)=>{let n=Pi;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);$r.und(n)||(o[r]=n)}return o},Pi=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Mi={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ri(e){const t=function(e){const t={};let n=0;if(qr(e,((e,o)=>{Mi[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return qr(e,((e,o)=>o in t||(n[o]=e))),n}return Si({},e)}function Li(e){return e=Dl(e),$r.arr(e)?e.map(Li):ei(e)?ol.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ai(e){for(const t in e)return!0;return!1}function Di(e){return $r.fun(e)||$r.arr(e)&&$r.obj(e[0])}function Oi(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Fi(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const zi=Si({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class Vi{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,zi)}}function Hi(e,t){if($r.und(t.decay)){const n=!$r.und(t.tension)||!$r.und(t.friction);!n&&$r.und(t.frequency)&&$r.und(t.damping)&&$r.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ui=[];class Gi{constructor(){this.changed=!1,this.values=Ui,this.toValues=null,this.fromValues=Ui,this.to=void 0,this.from=void 0,this.config=new Vi,this.immediate=!1}}function Wi(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{var a;let c,u,d=Bi(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)f();else{$r.und(n.pause)||(r.paused=Bi(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||Bi(e,t)),c=wi(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-wr.now()}function m(){c>0?(u=wr.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(Si({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const $i=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qi(e.get()):t.every((e=>e.noop))?ji(e.get()):Ki(e.get(),t.every((e=>e.finished))),ji=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ki=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qi=e=>({value:e,cancelled:!0,finished:!1});function Yi(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Ni(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&qi(o)||r!==n.asyncId&&Ki(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new Xi,i=new Qi;return(async()=>{if(ol.skipAnimation)throw Zi(n),i.result=Ki(o,!1),d(i),i;m(l);const s=$r.obj(e)?Si({},e):Si({},t,{to:e});s.parentId=r,qr(c,((e,t)=>{$r.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(ol.skipAnimation)return Zi(n),Ki(o,!1);try{let t;t=$r.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=Ki(o.get(),!0,!1)}catch(e){if(e instanceof Xi)h=e.result;else{if(!(e instanceof Qi))throw e;h=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return $r.fun(i)&&wr.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function Zi(e,t){Zr(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Xi extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Qi extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Ji=e=>e instanceof ts;let es=1;class ts extends zl{constructor(...e){super(...e),this.id=es++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ai(this);return e&&e.getValue()}to(...e){return ol.to(this,e)}interpolate(...e){return Ql(`${Zl}The "interpolate" function is deprecated in v9 (use "to" instead)`),ol.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Fl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||al.sort(this),Fl(this,{type:"priority",parent:this,priority:e})}}const ns=Symbol.for("SpringPhase"),os=e=>(1&e[ns])>0,rs=e=>(2&e[ns])>0,ls=e=>(4&e[ns])>0,is=(e,t)=>t?e[ns]|=3:e[ns]&=-3,ss=(e,t)=>t?e[ns]|=4:e[ns]&=-5;class as extends ts{constructor(e,t){if(super(),this.key=void 0,this.animation=new Gi,this.queue=void 0,this.defaultProps={},this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!$r.und(e)||!$r.und(t)){const n=$r.obj(e)?Si({},e):Si({},t,{from:e});$r.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(rs(this)||this._state.asyncTo)||ls(this)}get goal(){return Dl(this.animation.to)}get velocity(){const e=ai(this);return e instanceof pi?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return os(this)}get isAnimating(){return rs(this)}get isPaused(){return ls(this)}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ui(o.to);!i&&Al(o.to)&&(l=Yr(Dl(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==mi?1:i?i[a].lastPosition:l[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],l=null!=s.v0?s.v0:s.v0=$r.arr(r.velocity)?r.velocity[a]:r.velocity;let i;if($r.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<.1,i=l*o}else{i=null==s.lastVelocity?l:s.lastVelocity;const t=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=r.restVelocity||t/10,a=r.clamp?0:r.bounce,p=!$r.und(a),m=n==c?s.v0>0:n<c;let f,h=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(f=Math.abs(i)>o,f||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==m,h&&(i=-i*a,d=c)),i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*g,d+=i*g}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));const s=ai(this),a=s.getValue();if(t){const e=Dl(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return wr.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(rs(this)){const{to:e,config:t}=this.animation;wr.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return $r.und(e)?(n=this.queue||[],this.queue=[]):n=[$r.obj(e)?e:Si({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>$i(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Zi(this._state,e&&this._lastCallId),wr.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=$r.obj(n)?n[t]:n,(null==n||Di(n))&&(n=void 0),o=$r.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return os(this)||(e.reverse&&([n,o]=[o,n]),o=Dl(o),$r.und(o)?ai(this)||this._set(n):this._set(o)),r}_update(e,t){let n=Si({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Ni(n,((e,t)=>/^on/.test(t)?Ii(e,o):e))),hs(this,n,"onProps"),gs(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Wi(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{ls(this)||(ss(this,!0),Xr(i.pauseQueue),gs(this,"onPause",Ki(this,cs(this,this.animation.to)),this))},resume:()=>{ls(this)&&(ss(this,!1),rs(this)&&this._resume(),Xr(i.resumeQueue),gs(this,"onResume",Ki(this,cs(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=us(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qi(this));const o=!$r.und(e.to),r=!$r.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(qi(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!r||o||t.default&&!$r.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!jr(d,c);p&&(s.from=d),d=Dl(d);const m=!jr(u,a);m&&this._focus(u);const f=Di(t.to),{config:h}=s,{decay:g,velocity:v}=h;(o||r)&&(h.velocity=0),t.config&&!f&&function(e,t,n){n&&(Hi(n=Si({},n),t),t=Si({},n,t)),Hi(e,t),Object.assign(e,t);for(const t in zi)null==e[t]&&(e[t]=zi[t]);let{mass:o,frequency:r,damping:l}=e;$r.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(h,wi(t.config,l),t.config!==i.config?wi(i.config,l):void 0);let b=ai(this);if(!b||$r.und(u))return n(Ki(this,!0));const _=$r.und(t.reset)?r&&!t.default:!$r.und(d)&&Bi(t.reset,l),k=_?d:this.get(),y=Li(u),E=$r.num(y)||$r.arr(y)||ei(y),C=!f&&(!E||Bi(i.immediate||t.immediate,l));if(m){const e=bi(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Al(u),B=!1;if(!w){const e=_||!os(this)&&p;(m||e)&&(B=jr(Li(k),y),w=!B),(jr(s.immediate,C)||C)&&jr(h.decay,g)&&jr(h.velocity,v)||(w=!0)}if(B&&rs(this)&&(s.changed&&!_?w=!0:w||this._stop(a)),!f&&((w||Al(a))&&(s.values=b.getPayload(),s.toValues=Al(u)?null:S==mi?[1]:Yr(y)),s.immediate!=C&&(s.immediate=C,C||_||this._set(a)),w)){const{onRest:e}=s;Kr(fs,(e=>hs(this,t,e)));const o=Ki(this,cs(this,a));Xr(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&wr.batchedUpdates((()=>{s.changed=!_,null==e||e(o,this),_?wi(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}_&&this._set(k),f?n(Yi(t.to,t,this._state,this)):w?this._start():rs(this)&&!m?this._pendingCalls.add(n):n(ji(k))}_focus(e){const t=this.animation;e!==t.to&&(Ol(this)&&this._detach(),t.to=e,Ol(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Al(t)&&(Hl(t,this),Ji(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Al(e)&&Ul(e,this)}_set(e,t=!0){const n=Dl(e);if(!$r.und(n)){const e=ai(this);if(!e||!jr(n,e.getValue())){const o=bi(n);e&&e.constructor==o?e.setValue(n):ci(this,o.create(n)),e&&wr.batchedUpdates((()=>{this._onChange(n,t)}))}}return ai(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,gs(this,"onStart",Ki(this,cs(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),wi(this.animation.onChange,e,this)),wi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ai(this).reset(Dl(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),rs(this)||(is(this,!0),ls(this)||this._resume())}_resume(){ol.skipAnimation?this.finish():al.start(this)}_stop(e,t){if(rs(this)){is(this,!1);const n=this.animation;Kr(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Fl(this,{type:"idle",parent:this});const o=t?qi(this.get()):Ki(this.get(),cs(this,null!=e?e:n.to));Xr(this._pendingCalls,o),n.changed&&(n.changed=!1,gs(this,"onRest",o,this))}}}function cs(e,t){const n=Li(t);return jr(Li(e.get()),n)}function us(e,t=e.loop,n=e.to){let o=wi(t);if(o){const r=!0!==o&&Ri(o),l=(r||e).reverse,i=!r||r.reset;return ds(Si({},e,{loop:t,default:!1,pause:void 0,to:!l||Di(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function ds(e){const{to:t,from:n}=e=Ri(e),o=new Set;return $r.obj(t)&&ms(t,o),$r.obj(n)&&ms(n,o),e.keys=o.size?Array.from(o):null,e}function ps(e){const t=ds(e);return $r.und(t.default)&&(t.default=Ni(t)),t}function ms(e,t){qr(e,((e,n)=>null!=e&&t.add(n)))}const fs=["onStart","onRest","onChange","onPause","onResume"];function hs(e,t,n){e.animation[n]=t[n]!==xi(t,n)?Ii(t[n],e.key):void 0}function gs(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const vs=["onStart","onChange","onRest"];let bs=1;class _s{constructor(e,t){this.id=bs++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(Si({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];$r.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ds(e)),this}start(e){let{queue:t}=this;return e?t=Yr(e).map(ds):this.queue=[],this._flush?this._flush(this,t):(Bs(this,t),ks(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Kr(Yr(t),(t=>n[t].stop(!!e)))}else Zi(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if($r.und(e))this.start({pause:!0});else{const t=this.springs;Kr(Yr(e),(e=>t[e].pause()))}return this}resume(e){if($r.und(e))this.start({pause:!1});else{const t=this.springs;Kr(Yr(e),(e=>t[e].resume()))}return this}each(e){qr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Zr(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Zr(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Zr(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}wr.onFrame(this._onFrame)}}function ks(e,t){return Promise.all(t.map((t=>ys(e,t)))).then((t=>$i(e,t)))}async function ys(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=$r.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=$r.arr(r)||$r.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Kr(vs,(n=>{const o=t[n];if($r.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Xr(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===xi(t,"cancel");(u||m&&d.asyncId)&&p.push(Wi(++e._lastAsyncId,{props:t,state:d,actions:{pause:Wr,resume:Wr,start(t,n){m?(Zi(d,e._lastAsyncId),n(qi(e))):(t.onRest=s,n(Yi(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=$i(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=us(t,i,r);if(n)return Bs(e,[n]),ys(e,n,!0)}return a&&wr.batchedUpdates((()=>a(f,e,e.item))),f}function Es(e,t){const n=Si({},e.springs);return t&&Kr(Yr(t),(e=>{$r.und(e.keys)&&(e=ds(e)),$r.obj(e.to)||(e=Si({},e,{to:void 0})),ws(n,e,(e=>Ss(e)))})),Cs(e,n),n}function Cs(e,t){qr(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Hl(t,e))}))}function Ss(e,t){const n=new as;return n.key=e,t&&Hl(n,t),n}function ws(e,t,n){t.keys&&Kr(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Bs(e,t){Kr(t,(t=>{ws(e.springs,t,(t=>Ss(t,e)))}))}const Is=["children"],xs=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,Is);const o=(0,Ur.useContext)(Ts),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Ur.useState)((()=>({inputs:t,result:e()}))),o=(0,Ur.useRef)(),r=o.current;let l=r;return l?Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs))||(l={inputs:t,result:e()}):l=n,(0,Ur.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=Ts;return Ur.createElement(i,{value:n},t)},Ts=(Ns=xs,Ps={},Object.assign(Ns,Ur.createContext(Ps)),Ns.Provider._context=Ns,Ns.Consumer._context=Ns,Ns);var Ns,Ps;xs.Provider=Ts.Provider,xs.Consumer=Ts.Consumer;const Ms=()=>{const e=[],t=function(t){Jl(`${Zl}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Kr(e,((e,r)=>{if($r.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Kr(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Kr(e,(e=>e.resume(...arguments))),this},t.set=function(t){Kr(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Kr(e,((e,o)=>{if($r.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Kr(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Kr(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return $r.fun(e)?e(n,t):e};return t._getProps=n,t};function Rs(e,t,n){const o=$r.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Ur.useMemo)((()=>o||3==arguments.length?Ms():void 0),[]),l=(0,Ur.useRef)(0),i=oi(),s=(0,Ur.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=Es(e,t);return l.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ks(e,t):new Promise((o=>{Cs(e,n),s.queue.push((()=>{o(ks(e,t))})),i()}))}})),[]),a=(0,Ur.useRef)([...s.ctrls]),c=[],u=li(e)||0;function d(e,n){for(let r=e;r<n;r++){const e=a.current[r]||(a.current[r]=new _s(null,s.flush)),n=o?o(r,e):t[r];n&&(c[r]=ps(n))}}(0,Ur.useMemo)((()=>{Kr(a.current.slice(e,u),(e=>{Oi(e,r),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,Ur.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>Es(e,c[t]))),m=(0,Ur.useContext)(xs),f=li(m),h=m!==f&&Ai(m);ii((()=>{l.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],Kr(e,(e=>e()))),Kr(a.current,((e,t)=>{null==r||r.add(e),h&&e.start({default:m});const n=c[t];n&&(Fi(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ti((()=>()=>{Kr(s.ctrls,(e=>e.stop(!0)))}));const g=p.map((e=>Si({},e)));return r?[g,r]:g}let Ls;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Ls||(Ls={}));class As extends ts{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=Pl(...t);const n=this._get(),o=bi(n);ci(this,o.create(n))}advance(e){const t=this._get();jr(t,this.get())||(ai(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Os(this._active)&&Fs(this)}_get(){const e=$r.arr(this.source)?this.source.map(Dl):Yr(Dl(this.source));return this.calc(...e)}_start(){this.idle&&!Os(this._active)&&(this.idle=!1,Kr(ui(this),(e=>{e.done=!1})),ol.skipAnimation?(wr.batchedUpdates((()=>this.advance())),Fs(this)):al.start(this))}_attach(){let e=1;Kr(Yr(this.source),(t=>{Al(t)&&Hl(t,this),Ji(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Kr(Yr(this.source),(e=>{Al(e)&&Ul(e,this)})),this._active.clear(),Fs(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Yr(this.source).reduce(((e,t)=>Math.max(e,(Ji(t)?t.priority:0)+1)),0))}}function Ds(e){return!1!==e.idle}function Os(e){return!e.size||Array.from(e).every(Ds)}function Fs(e){e.idle||(e.idle=!0,Kr(ui(e),(e=>{e.done=!0})),Fl(e,{type:"idle",parent:e}))}ol.assign({createStringInterpolator:Yl,to:(e,t)=>new As(e,t)}),al.advance;var zs=window.ReactDOM;function Vs(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const Hs=["style","children","scrollTop","scrollLeft"],Us=/^--/;function Gs(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Us.test(e)||$s.hasOwnProperty(e)&&$s[e]?(""+t).trim():t+"px"}const Ws={};let $s={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const js=["Webkit","Ms","Moz","O"];$s=Object.keys($s).reduce(((e,t)=>(js.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),$s);const Ks=["x","y","z"],qs=/^(matrix|translate|scale|rotate|skew)/,Ys=/^(translate)/,Zs=/^(rotate|skew)/,Xs=(e,t)=>$r.num(e)&&0!==e?e+t:e,Qs=(e,t)=>$r.arr(e)?e.every((e=>Qs(e,t))):$r.num(e)?e===t:parseFloat(e)===t;class Js extends hi{constructor(e){let{x:t,y:n,z:o}=e,r=Vs(e,Ks);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Xs(e,"px"))).join(",")})`,Qs(e,0)]))),qr(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(qs.test(t)){if(delete r[t],$r.und(e))return;const n=Ys.test(t)?"px":Zs.test(t)?"deg":"";l.push(Yr(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Xs(r,n)})`,Qs(r,0)]:e=>[`${t}(${e.map((e=>Xs(e,n))).join(",")})`,Qs(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new ea(l,i)),super(r)}}class ea extends zl{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Kr(this.inputs,((n,o)=>{const r=Dl(n[0]),[l,i]=this.transforms[o]($r.arr(r)?r:n.map(Dl));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Hl(e,this)))))}observerRemoved(e){0==e&&Kr(this.inputs,(e=>Kr(e,(e=>Al(e)&&Ul(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Fl(this,e)}}const ta=["scrollTop","scrollLeft"];ol.assign({batchedUpdates:zs.unstable_batchedUpdates,createStringInterpolator:Yl,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const na=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new hi(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=Ci(e)||"Anonymous";return(e=$r.str(e)?l[e]||(l[e]=ki(e,r)):e[Ei]||(e[Ei]=ki(e,r))).displayName=`Animated(${t})`,e};return qr(e,((t,n)=>{$r.arr(e)&&(n=Ci(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:s}=o,a=Vs(o,Hs),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Ws[t]||(Ws[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Gs(t,r[t]);Us.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Js(e),getComponentProps:e=>Vs(e,ta)}).animated,oa=e=>e+1,ra=e=>({top:e.offsetTop,left:e.offsetLeft});var la=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(oa,0),[u,p]=(0,s.useReducer)(oa,0),[m,f]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>l.current?ra(l.current):null),[r]),g=(0,s.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,rr.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);function v(e){let{value:n}=e,{x:o,y:r}=n;o=Math.round(o),r=Math.round(r),o===v.x&&r===v.y||(function(e){let{x:n,y:o}=e;if(!l.current)return;const r=0===n&&0===o;l.current.style.transformOrigin=r?"":"center",l.current.style.transform=r?"":`translate3d(${n}px,${o}px,0)`,l.current.style.zIndex=!t||r?"":"1",g()}({x:o,y:r}),v.x=o,v.y=r)}return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void g();l.current.style.transform="";const e=ra(l.current);c(),f({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[r]),v.x=0,v.y=0,function(e,t){const n=$r.fun(e),[[o],r]=Rs(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:v}),l};const ia=".block-editor-block-list__block",sa=".block-list-appender";function aa(e,t){return t.closest([ia,sa].join(","))===e}function ca(e){const t=(0,s.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(zn);if(l(e)&&!o()&&!r())return n()}),[e])}(e);return(0,s.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=rr.focus.tabbable.find(t.current).filter((e=>(0,rr.isTextField)(e))),r=-1===n,l=(r?u.last:u.first)(o)||t.current;aa(t.current,l)?(0,rr.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function ua(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function da(){const e=(0,m.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(zn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",ua),t.addEventListener("mouseover",ua),()=>{t.removeEventListener("mouseout",ua),t.removeEventListener("mouseover",ua),t.classList.remove("is-hovered")}}),[e])}function pa(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:p}=t(zn),{__experimentalSpotlightEntityBlocks:m,outlineMode:f}=a(),h=n(e),g=l(e),v=s(e),b=u(e,!0),_=p(m);return c()({"is-selected":g,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"has-active-entity":_,"is-active-entity":_===e,"remove-outline":g&&f&&d()})}),[e])}function ma(e){return(0,m.useSelect)((t=>{const n=t(zn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function fa(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(zn),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function ha(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(zn);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(s),l(e))}):void 0}),[e])}function ga(e){const{isBlockSelected:t}=(0,m.useSelect)(zn),{selectBlock:n,selectionChange:o}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):aa(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var va=window.wp.keycodes;function ba(e){const t=(0,m.useSelect)((t=>t(zn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,m.useSelect)(zn),{insertDefaultBlock:r,removeBlock:l}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==va.ENTER&&s!==va.BACKSPACE&&s!==va.DELETE||a!==i||(0,rr.isTextField)(a)||(t.preventDefault(),s===va.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function _a(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(zn),{setNavigationMode:o,selectBlock:r}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}var ka=n(4979),ya=n.n(ka);function Ea(e){const t=(0,s.useRef)(),n=(0,m.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(zn);return n(e)||o()===e}),[e]);return(0,s.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=(0,rr.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&ya()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}const Ca=(0,s.createContext)();function Sa(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Ca.Provider,{value:n},t)}function wa(e){const{refs:t,callbacks:n}=(0,s.useContext)(Ca),o=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Ba(e){const{refs:t}=(0,s.useContext)(Ca),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Ia(e){const{callbacks:t}=(0,s.useContext)(Ca),n=Ba(e),[o,r]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function xa(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function Ta(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,m.useDispatch)(zn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:c}=(0,m.useSelect)(zn);return(0,d.useRefEffect)((u=>{const{ownerDocument:d}=u,{defaultView:p}=d;let m,f;function h(t){let{isSelectionEnd:n}=t;const l=p.getSelection();if(!l.rangeCount||l.isCollapsed)return void xa(u,!0);const i=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ia);return t?t.id.slice("block-".length):void 0}(l.focusNode);if(e===i){if(r(e),n&&(xa(u,!0),l.rangeCount)){const{commonAncestorContainer:e}=l.getRangeAt(0);m.contains(e)&&m.focus()}}else{const t=[...s(e),e],n=[...s(i),i],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function g(){d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),f=p.requestAnimationFrame((()=>{h({isSelectionEnd:!0}),n()}))}function v(n){let{buttons:o}=n;1===o&&l()&&i(e)&&(m=d.activeElement,t(),d.addEventListener("selectionchange",h),p.addEventListener("mouseup",g),xa(u,!1))}function b(t){if(l()&&0===t.button)if(t.shiftKey){const n=a(),r=s(n);if(n&&n!==e&&(null==r||!r.includes(e))){const l=[...r,n],i=[...s(e),e],a=Math.min(l.length,i.length)-1,c=l[a],d=i[a];c!==d&&(xa(u,!1),o(c,d),t.preventDefault())}}else c()&&r(e)}return u.addEventListener("mousedown",b),u.addEventListener("mouseleave",v),()=>{u.removeEventListener("mousedown",b),u.removeEventListener("mouseleave",v),d.removeEventListener("selectionchange",h),p.removeEventListener("mouseup",g),p.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function Na(){const e=(0,s.useContext)(dm);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Pa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(Ma),{index:a,mode:u,name:p,blockApiVersion:f,blockTitle:g,isPartOfSelection:v,adjustScrolling:b,enableAnimation:_}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:o,getBlockName:l,isTyping:i,getGlobalBlockCount:s,isBlockSelected:a,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(zn),p=a(n),m=c(n)||u(n),f=l(n),h=(0,r.getBlockType)(f);return{index:t(n),mode:o(n),name:f,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:null==h?void 0:h.title,isPartOfSelection:p||m,adjustScrolling:p||d(n),enableAnimation:!i()&&s()<=200}}),[n]),k=(0,h.sprintf)((0,h.__)("Block: %s"),g),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,ca(n),Ea(n),wa(n),ga(n),Ta(n),ba(n),_a(n),da(),Na(),la({isSelected:v,adjustScrolling:b,enableAnimation:_,triggerAnimationOnChange:a})]),C=Gn();return f<2&&n===C.clientId&&"undefined"!=typeof process&&process.env,{...l,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":k,"data-block":n,"data-type":p,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,pa(n),ma(n),fa(n),ha(n)),style:{...l.style,...e.style}}}Pa.save=r.__unstableGetBlockProps;const Ma=(0,s.createContext)();function Ra(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",Pa(o,{__unstableIsHtml:n}),t)}const La=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(zn),d=a(n),p=r(n),m=s(o),f=c(n,o),h=u(n,o),{name:g,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:h,block:d,name:g,attributes:v,isValid:b,isSelected:p}})),Aa=(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(zn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(zn),r=n(),{clientId:i}=t,s=r.length?r:[i];l(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(zn),s=l(n);i(e,s+1,r)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=o(zn);if(e){const e=l(n);e&&s(n,e)}else{const e=r(n);e&&s(e,n)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}}));var Da=(0,d.compose)(d.pure,La,Aa,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,p.withFilters)("editor.BlockListBlock"))((function(e){let{mode:t,isLocked:n,canRemove:o,clientId:l,isSelected:i,isSelectionEnabled:a,className:d,name:p,isValid:f,attributes:h,wrapperProps:g,setAttributes:v,onReplace:b,onInsertBlocksAfter:_,onMerge:k,toggleSelection:y}=e;const{removeBlock:E}=(0,m.useDispatch)(zn),C=(0,s.useCallback)((()=>E(l)),[l]);let S=(0,s.createElement)(ur,{name:p,isSelected:i,attributes:h,setAttributes:v,insertBlocksAfter:n?void 0:_,onReplace:o?b:void 0,onRemove:o?C:void 0,mergeBlocks:o?k:void 0,clientId:l,isSelectionEnabled:a,toggleSelection:y});const w=(0,r.getBlockType)(p);null!=w&&w.getEditWrapperProps&&(g=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(g,w.getEditWrapperProps(h)));const B=g&&!!g["data-align"];let I;if(B&&(S=(0,s.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),f)I="html"===t?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},S),(0,s.createElement)(Ra,{isHtml:!0},(0,s.createElement)(Cr,{clientId:l}))):(null==w?void 0:w.apiVersion)>1?S:(0,s.createElement)(Ra,g,S);else{const e=(0,r.getSaveContent)(w,h);I=(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(vr,{clientId:l}),(0,s.createElement)(s.RawHTML,null,(0,rr.safeHTML)(e)))}const x={clientId:l,className:d,wrapperProps:(0,u.omit)(g,["data-align"]),isAligned:B},T=(0,s.useMemo)((()=>x),Object.values(x));return(0,s.createElement)(Ma.Provider,{value:T},(0,s.createElement)(yr,{fallback:(0,s.createElement)(Ra,{className:"has-warning"},(0,s.createElement)(_r,null))},I))})),Oa=window.wp.htmlEntities,Fa=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const za=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")];var Va=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*za.length));return(0,s.createElement)(p.Tip,null,za[e])},Ha=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Ua=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Ha});const l=(0,s.createElement)(p.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)})),Ga=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(Rt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Ua,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))};function Wa(e){let{clientId:t=null,value:n,selection:o,onChange:l=u.noop,onInput:i=u.noop}=e;const a=(0,m.useRegistry)(),{resetBlocks:c,resetSelection:d,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:h}=a.dispatch(zn),{getBlockName:g,getBlocks:v}=a.select(zn),b=(0,m.useSelect)((e=>!t||e(zn).areInnerBlocksControlled(t)),[t]),_=(0,s.useRef)({incoming:null,outgoing:[]}),k=(0,s.useRef)(!1),y=()=>{n&&(h(),t?a.batch((()=>{f(t,!0);const e=n.map((e=>(0,r.cloneBlock)(e)));k.current&&(_.current.incoming=e),h(),p(t,e)})):(k.current&&(_.current.incoming=n),c(n)))},E=(0,s.useRef)(i),C=(0,s.useRef)(l);(0,s.useEffect)((()=>{E.current=i,C.current=l}),[i,l]),(0,s.useEffect)((()=>{_.current.outgoing.includes(n)?(0,u.last)(_.current.outgoing)===n&&(_.current.outgoing=[]):v(t)!==n&&(_.current.outgoing=[],y(),o&&d(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{b||(_.current.outgoing=[],y())}),[b]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l,areInnerBlocksControlled:i}=a.select(zn);let s=v(t),c=r(),u=!1;k.current=!0;const d=a.subscribe((()=>{if(null!==t&&null===g(t))return;if(t&&!i(t))return;const a=r(),d=v(t),p=d!==s;if(s=d,p&&(_.current.incoming||l()))return _.current.incoming=null,void(c=a);(p||u&&!p&&a&&!c)&&(c=a,_.current.outgoing.push(s),(c?C.current:E.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),u=p}));return()=>d()}),[a,t])}var $a=(0,d.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,i({registry:o},r));const[l,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,m.createRegistry)({},o);e.registerStore(On,Fn),a(e)}),[o]),l?(0,s.createElement)(m.RegistryProvider,{value:l},(0,s.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,m.useDispatch)(zn);return(0,s.useEffect)((()=>{o(n)}),[n]),Wa(e),(0,s.createElement)(Sa,null,t)}));function ja(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(p.Disabled,null,(0,s.createElement)(mm,null)))}function Ka(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,m.useSelect)(zn),{clearSelectedBlock:n}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function qa(e){return(0,s.createElement)("div",i({ref:Ka()},e))}function Ya(e,t){const n="start"===t?"firstChild":"lastChild",o="start"===t?"nextSibling":"previousSibling";for(;e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[o];)e=e[o];return e}function Za(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(zn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function Xa(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,m.useSelect)(Za,[]),r=Ba(o),l=Ba((0,u.first)(t)),i=Ba((0,u.last)(t));return(0,d.useRefEffect)((s=>{const{ownerDocument:a}=s,{defaultView:c}=a;if(!n||e){if(!o||e)return;const t=c.getSelection();if(t.rangeCount&&!t.isCollapsed){const e=r.current,{startContainer:n,endContainer:o}=t.getRangeAt(0);!e||e.contains(n)&&e.contains(o)||t.removeAllRanges()}return}const{length:u}=t;if(u<2)return;if(!l.current||!i.current)return;s.focus();const d=c.getSelection(),p=a.createRange(),m=Ya(l.current,"start"),f=Ya(i.current,"end");var h;h=s,Array.from(h.querySelectorAll(".rich-text:not( .editor-post-title__input )")).forEach((e=>{e.removeAttribute("contenteditable")})),p.setStartBefore(m),p.setEndAfter(f),d.removeAllRanges(),d.addRange(p)}),[n,e,t,o])}function Qa(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ja(e,t,n,o){let r,l=rr.focus.focusable.find(n);return t&&(l=(0,u.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,u.find)(l,(function(e){if(!rr.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}))}function ec(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,m.useSelect)(zn),{multiSelect:c,selectBlock:u}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((d=>{let p;function m(){p=null}function f(l){const i=e(),s=t(),a=n(),d=o(a||i),p=r(a||i),m=l?d:p;m&&(s===m?u(m):c(s||i,m))}function h(e){const t=l(),n=i(),o=e?t:n;o&&u(o)}function g(t){const{keyCode:l,target:i}=t,c=l===va.UP,u=l===va.DOWN,m=l===va.LEFT,g=l===va.RIGHT,v=c||m,b=m||g,_=c||u,k=b||_,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=_?rr.isVerticalEdge:rr.isHorizontalEdge,{ownerDocument:S}=d,{defaultView:w}=S;if(a())return void(k&&((y?f:h)(v),t.preventDefault()));if(_?p||(p=(0,rr.computeCaretRect)(w)):p=null,t.defaultPrevented)return;if(!k)return;if(!function(e,t,n){if((t===va.UP||t===va.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,rr.isRTL)(i)?!v:v,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(v&&l||!v&&s)&&function(e,t){const n=Ja(e,t,d);return!n||!function(e,t){return e.closest(ia)===t.closest(ia)}(e,n)}(i,v)&&C(i,v)&&(f(v),t.preventDefault())}else if(_&&(0,rr.isVerticalEdge)(i,v)&&!I){const e=Ja(i,v,d,!0);e&&((0,rr.placeCaretAtVerticalEdge)(e,v,p),t.preventDefault())}else if(b&&w.getSelection().isCollapsed&&(0,rr.isHorizontalEdge)(i,B)&&!I){const e=Ja(i,B,d);(0,rr.placeCaretAtHorizontalEdge)(e,v),t.preventDefault()}}return d.addEventListener("mousedown",m),d.addEventListener("keydown",g),()=>{d.removeEventListener("mousedown",m),d.removeEventListener("keydown",g)}}),[])}var tc=window.wp.keyboardShortcuts;function nc(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(zn),{multiSelect:o}=(0,m.useDispatch)(zn),r=(0,tc.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,rr.isEntirelySelected)(l.target))return;const i=t(),[s]=i,a=n(s);let c=e(a);i.length===c.length&&(c=e(n(a)));const d=(0,u.first)(c),p=(0,u.last)(c);d!==p&&(o(d,p),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function oc(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,m.useSelect)(zn),{setNavigationMode:a}=(0,m.useDispatch)(zn),c=(0,m.useSelect)((e=>e(zn).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function p(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";rr.focus.tabbable[n](t.target).focus()}}const f=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:p}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:p}),g=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===va.ESCAPE&&!r())return e.preventDefault(),void a(!0);if(e.keyCode!==va.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(Qa(e.target)&&Qa(rr.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==va.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=rr.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:f}=m;return f.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,g]),h]}(),o=(0,m.useSelect)((e=>e(zn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,Xa(),nc(),ec(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var rc=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,a]=oc();return(0,s.createElement)(s.Fragment,null,r,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)}));const lc="editor-styles-wrapper";function ic(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var sc=(0,s.forwardRef)((function(e,t){let{contentRef:n,children:o,head:r,tabIndex:l=0,assets:a,...u}=e;const[,m]=(0,s.useReducer)((()=>({}))),[f,g]=(0,s.useState)(),[v,b]=(0,s.useState)([]),_=ic(null==a?void 0:a.styles),k=ic(null==a?void 0:a.scripts),y=Ka(),[E,C,S]=oc(),w=(0,d.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:o,documentElement:r}=t;return("interactive"===o||"complete"===o)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(t),g(t),y(r),b(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||"wp-embed-responsive"===e))),t.dir=n.dir,r.removeChild(t.head),r.removeChild(t.body),!0)}t()||e.addEventListener("load",(()=>{t()}))}),[]),B=(0,d.useRefEffect)((e=>{k.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{m()}))}),[]),I=(0,d.useMergeRefs)([n,y,C]);return(0,s.useEffect)((()=>{var e;f&&(e=f,Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(o).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${lc}`)||t.includes(".wp-block"))}))&&!e.getElementById(n.id)){console.warn(`Stylesheet ${n.id} was not properly added.\nFor blocks, use the block API's style (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#style) or editorStyle (https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#editor-style).\nFor themes, use add_editor_style (https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#editor-styles).`,n.outerHTML),e.head.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.head.appendChild(o.cloneNode(!0))}})))}),[f]),r=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),_.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})})),r),(0,s.createElement)(s.Fragment,null,l>=0&&E,(0,s.createElement)("iframe",i({},u,{ref:(0,d.useMergeRefs)([t,w]),tabIndex:l,title:(0,h.__)("Editor canvas")}),f&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:B},r),(0,s.createElement)("body",{ref:I,className:c()(lc,...v)},(0,s.createElement)(p.__experimentalStyleProvider,{document:f},o))),f.documentElement)),l>=0&&S)})),ac={grad:.9,turn:360,rad:360/(2*Math.PI)},cc=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},uc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},dc=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},pc=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mc=function(e){return{r:dc(e.r,0,255),g:dc(e.g,0,255),b:dc(e.b,0,255),a:dc(e.a)}},fc=function(e){return{r:uc(e.r),g:uc(e.g),b:uc(e.b),a:uc(e.a,3)}},hc=/^#([0-9a-f]{3,8})$/i,gc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},vc=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},bc=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},_c=function(e){return{h:pc(e.h),s:dc(e.s,0,100),l:dc(e.l,0,100),a:dc(e.a)}},kc=function(e){return{h:uc(e.h),s:uc(e.s),l:uc(e.l),a:uc(e.a,3)}},yc=function(e){return bc((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Ec=function(e){return{h:(t=vc(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},Cc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sc=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bc=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ic={string:[[function(e){var t=hc.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?uc(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?uc(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=wc.exec(e)||Bc.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mc({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Cc.exec(e)||Sc.exec(e);if(!t)return null;var n,o,r=_c({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(ac[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return yc(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return cc(t)&&cc(n)&&cc(o)?mc({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=_c({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return yc(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!cc(t)||!cc(n)||!cc(o))return null;var i=function(e){return{h:pc(e.h),s:dc(e.s,0,100),v:dc(e.v,0,100),a:dc(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return bc(i)},"hsv"]]},xc=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Tc=function(e,t){var n=Ec(e);return{h:n.h,s:dc(n.s+100*t,0,100),l:n.l,a:n.a}},Nc=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Pc=function(e,t){var n=Ec(e);return{h:n.h,s:n.s,l:dc(n.l+100*t,0,100),a:n.a}},Mc=function(){function e(e){this.parsed=function(e){return"string"==typeof e?xc(e.trim(),Ic.string):"object"==typeof e&&null!==e?xc(e,Ic.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return uc(Nc(this.rgba),2)},e.prototype.isDark=function(){return Nc(this.rgba)<.5},e.prototype.isLight=function(){return Nc(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?gc(uc(255*r)):"","#"+gc(t)+gc(n)+gc(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return fc(this.rgba)},e.prototype.toRgbString=function(){return t=(e=fc(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return kc(Ec(this.rgba))},e.prototype.toHslString=function(){return t=(e=kc(Ec(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=vc(this.rgba),{h:uc(e.h),s:uc(e.s),v:uc(e.v),a:uc(e.a,3)};var e},e.prototype.invert=function(){return Rc({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Rc(Tc(this.rgba,-e))},e.prototype.grayscale=function(){return Rc(Tc(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Rc(Pc(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Rc({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):uc(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ec(this.rgba);return"number"==typeof e?Rc({h:e,s:t.s,l:t.l,a:t.a}):uc(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Rc(e).toHex()},e}(),Rc=function(e){return e instanceof Mc?e:new Mc(e)},Lc=[],Ac=function(e){e.forEach((function(e){Lc.indexOf(e)<0&&(e(Mc,Ic),Lc.push(e))}))};function Dc(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Oc=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Fc=function(e){return.2126*Oc(e.r)+.7152*Oc(e.g)+.0722*Oc(e.b)};function zc(e){e.prototype.luminance=function(){return e=Fc(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=Fc(l))>(a=Fc(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var Vc=n(3692),Hc=n.n(Vc);const Uc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Gc(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;s.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function g(){const e=p(/^([^{]+)/);if(e)return Wc(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Wc(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Uc,""),value:n?Wc(n[0]).replace(Uc,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function _(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const k=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let r,i=f();for(;r=_();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Wc(t[1]),media:Wc(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Wc(t[1]);if(!c())return a("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||k()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Wc(t[1]),o=Wc(t[2]);if(!c())return a("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=g()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=l(),t=g();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return $c(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Wc(e){return e?e.replace(/^\s+|\s+$/g,""):""}function $c(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){$c(e,o)})):n&&"object"==typeof n&&$c(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var jc=n(5717),Kc=n.n(jc),qc=Yc;function Yc(e){this.options=e||{}}Yc.prototype.emit=function(e){return e},Yc.prototype.visit=function(e){return this[e.type](e)},Yc.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};var Zc=Xc;function Xc(e){qc.call(this,e)}Kc()(Xc,qc),Xc.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Xc.prototype.comment=function(e){return this.emit("",e.position)},Xc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Xc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Xc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Xc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Xc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Xc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Xc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Xc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Xc.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Xc.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Qc=Jc;function Jc(e){e=e||{},qc.call(this,e),this.indentation=e.indent}Kc()(Jc,qc),Jc.prototype.compile=function(e){return this.stylesheet(e)},Jc.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Jc.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Jc.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Jc.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Jc.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Jc.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Jc.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Jc.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Jc.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Jc.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Jc.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Jc.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Jc.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var eu=function(e,t){try{const r=Gc(e);return n=Hc().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Zc(o):new Qc(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function tu(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function nu(e,t){return new URL(e,t).toString()}var ou=e=>t=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};tu(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+nu(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const ru=/^(body|html|:root).*$/;var lu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(ru)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},iu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(lu(t)),o&&r.push(ou(o)),r.length?eu(n,(0,d.compose)(r)):n}))};const su=".editor-styles-wrapper";function au(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(su);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Rc(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function cu(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>iu(t,su)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:au(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let uu;Ac([Dc,zc]);var du=function(e){let{viewportWidth:t,__experimentalPadding:n}=e;const[o,{width:r}]=(0,d.useResizeObserver)(),[l,{height:i}]=(0,d.useResizeObserver)(),{styles:a,assets:c}=(0,m.useSelect)((e=>{const t=e(zn).getSettings();return{styles:t.styles,assets:t.__unstableResolvedAssets}}),[]);uu=uu||(0,d.pure)(mm);const u=r/t;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,s.createElement)(p.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${u})`,height:i*u}},(0,s.createElement)(sc,{head:(0,s.createElement)(cu,{styles:a}),assets:c,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none"}},l,(0,s.createElement)(uu,{renderAppender:!1}))))},pu=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l}=e;const i=(0,m.useSelect)((e=>e(zn).getSettings()),[]),a=(0,s.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),c=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)($a,{value:c,settings:a},r?(0,s.createElement)(ja,{onClick:l}):(0,s.createElement)(du,{viewportWidth:o,__experimentalPadding:n})):null}));function mu(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,m.useSelect)((e=>e(zn).getSettings()),[]),l=(0,d.__experimentalUseDisabled)(),i=(0,d.useMergeRefs)([n.ref,l]),a=(0,s.useMemo)((()=>({...r,__experimentalBlockPatterns:[]})),[r]),p=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]),f=(0,s.createElement)($a,{value:p,settings:a},(0,s.createElement)(hm,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?f:null}}var fu=function(e){var t,n;let{item:o}=e;const{name:l,title:i,icon:a,description:c,initialAttributes:u}=o,d=(0,r.getBlockType)(l),p=(0,r.isReusableBlock)(o);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},p||null!=d&&d.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(pu,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,r.getBlockFromExample)(o.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,r.createBlock)(l,u)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!p&&(0,s.createElement)(Ga,{title:i,icon:a,description:c}))},hu=(0,s.createContext)(),gu=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const a=(0,s.useContext)(hu);return(0,s.createElement)(p.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,r):"function"==typeof r?r(t):(0,s.createElement)(p.Button,t,r)}))})),vu=(0,s.createElement)(O.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,s.createElement)(O.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function bu(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(p.FlexItem,null,n?(0,s.createElement)(Ua,{icon:n}):(0,h.sprintf)(
11
  /* translators: %d: Number of blocks. */
12
+ (0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:vu})))))}var _u=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,s.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,s.createElement)(bu,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};function ku(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var yu=(0,s.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:a,isDraggable:u,...d}=e;const p=(0,s.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},f=(0,s.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,s.createElement)(_u,{isEnabled:u&&!o.disabled,blocks:f,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:f}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(a(null),u(e))},onDragEnd:e=>{p.current=!1,f&&f(e)}},(0,s.createElement)(gu,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null)},onKeyDown:e=>{const{keyCode:t}=e;t===va.ENTER&&(e.preventDefault(),l(o,ku()?e.metaKey:e.ctrlKey),a(null))},onFocus:()=>{p.current||a(o)},onMouseEnter:()=>{p.current||a(o)},onMouseLeave:()=>a(null),onBlur:()=>a(null)},d),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,s.createElement)(Ua,{icon:o.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},o.title)))}))})),Eu=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,Nt.speak)((0,h.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Cu=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(hu);return(0,s.createElement)(p.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),Su=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:a=!0}=e;return(0,s.createElement)(Eu,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,s.createElement)(Cu,{key:t},e.map(((e,l)=>(0,s.createElement)(yu,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:a,isFirst:0===t&&0===l})))))),l)},wu=function(e){let{title:t,icon:n,children:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(p.Icon,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},Bu=(e,t)=>{const{categories:n,collections:o,items:l}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(zn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const s=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(s,void 0,n)}),[t])]},Iu=function(e){let{children:t}=e;const n=(0,p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(hu.Provider,{value:n},t)};const xu=[];var Tu=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,c]=Bu(t,n),p=(0,s.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,s.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,s.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),g=(0,s.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,s.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,_=(0,s.useMemo)((()=>Object.entries(a)),[a]),k=(0,d.useAsyncList)(b?_:xu);return(0,s.createElement)(Iu,null,(0,s.createElement)("div",null,r&&!!p.length&&(0,s.createElement)(wu,{title:(0,h._x)("Most used","blocks")},(0,s.createElement)(Su,{items:p,onSelect:c,onHover:o,label:(0,h._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,s.createElement)(wu,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Su,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(wu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,h.__)("Uncategorized")},(0,s.createElement)(Su,{items:m,onSelect:c,onHover:o,label:(0,h.__)("Uncategorized")})),(0,u.map)(k,(e=>{let[t,n]=e;const r=g[t];return r&&r.length?(0,s.createElement)(wu,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(Su,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))},Nu=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(p.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(p.FlexItem,{isBlock:!0},(0,s.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,h.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,h.__)("Explore all patterns"),onClick:()=>r()},(0,h._x)("Explore","Label for showing all block patterns"))))},Pu=window.wp.notices,Mu=(e,t)=>{const{patternCategories:n,patterns:o}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(zn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,m.useDispatch)(Pu.store);return[o,n,(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,h.sprintf)(
13
  /* translators: %s: block pattern title. */
14
+ (0,h.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function Ru(e){let{isDraggable:t,pattern:n,onClick:o,composite:r}=e;const{blocks:l,viewportWidth:a}=n,c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(Ru)}`;return(0,s.createElement)(_u,{isEnabled:t,blocks:l},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},r,{className:"block-editor-block-patterns-list__item",onClick:()=>o(n,l)}),(0,s.createElement)(pu,{blocks:l,viewportWidth:a}),(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,s.createElement)(p.VisuallyHidden,{id:c},n.description)))}))}function Lu(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Au=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onClickPattern:r,orientation:l,label:a=(0,h.__)("Block Patterns")}=e;const c=(0,p.__unstableUseCompositeState)({orientation:l});return(0,s.createElement)(p.__unstableComposite,i({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>o.includes(e)?(0,s.createElement)(Ru,{key:e.name,pattern:e,onClick:r,isDraggable:t,composite:c}):(0,s.createElement)(Lu,{key:e.name}))))};function Du(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const r="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${r}__categories-list`},n.map((e=>{let{name:n,label:l}=e;return(0,s.createElement)(p.Button,{key:n,label:l,className:`${r}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},l)})))}function Ou(e){let{filterValue:t,setFilterValue:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)(p.SearchControl,{onChange:n,value:t,label:(0,h.__)("Search for patterns"),placeholder:(0,h.__)("Search")}))}var Fu=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,filterValue:r,setFilterValue:l}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,s.createElement)(Ou,{filterValue:r,setFilterValue:l}),!r&&(0,s.createElement)(Du,{selectedCategory:t,patternCategories:n,onClickCategory:o}))},zu=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)(wo,{className:"block-editor-inserter__no-results-icon",icon:Ha}),(0,s.createElement)("p",null,(0,h.__)("No results found.")))},Vu=function(e){let{rootClientId:t="",insertionIndex:n,clientId:o,isAppender:l,onSelect:i,shouldFocusBlock:a=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(zn),{destinationRootClientId:d,destinationIndex:p}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:r,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=e(zn),c=r();let u,d=t;return void 0!==n?u=n:o?u=s(o):!l&&c?(d=i(c),u=s(c)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,o,l]),{replaceBlocks:f,insertBlocks:g,showInsertionPoint:v,hideInsertionPoint:b}=(0,m.useDispatch)(zn),_=(0,s.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=c();!l&&o&&(0,r.isUnmodifiedDefaultBlock)(o)?f(o.clientId,e,null,a||n?0:null,t):g(e,p,d,!0,a||n?0:null,t);const s=(0,h.sprintf)(// translators: %d: the name of the block that has been added
15
+ (0,h._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,Nt.speak)(s),i&&i()}),[l,c,f,g,d,p,i,a]),k=(0,s.useCallback)((e=>{e?v(d,p):b()}),[v,b,d,p]);return[d,_,k]};const Hu=e=>e.name||"",Uu=e=>e.title,Gu=e=>e.description||"",Wu=e=>e.keywords||[],$u=e=>e.category,ju=()=>null;function Ku(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,u.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const qu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(Ku(e))},Yu=(e,t)=>(0,u.differenceWith)(e,qu(t),((e,t)=>t.includes(e))),Zu=(e,t,n,o)=>0===qu(o).length?e:Xu(e,o,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}}),Xu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=qu(t);if(0===o.length)return e;const r=e.map((e=>[e,Qu(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return r.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),r.map((e=>{let[t]=e;return t}))};function Qu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:o=Hu,getTitle:r=Uu,getDescription:l=Gu,getKeywords:i=Wu,getCategory:s=$u,getCollection:a=ju}=n,c=o(e),d=r(e),p=l(e),m=i(e),f=s(e),h=a(e),g=Ku(t),v=Ku(d);let b=0;if(g===v)b+=30;else if(v.startsWith(g))b+=20;else{const e=[c,d,p,...m,f,h].join(" "),t=(0,u.words)(g);0===Yu(t,e).length&&(b+=10)}return 0!==b&&c.startsWith("core/")&&b++,b}function Ju(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,s.createElement)(p.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,h.sprintf)(
16
  /* translators: %d: number of patterns. %s: block pattern search query */
17
+ (0,h._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var ed=function(e){let{filterValue:t,selectedCategory:n,patternCategories:o}=e;const r=(0,d.useDebounce)(Nt.speak,500),[l,i]=Vu({shouldFocusBlock:!0}),[a,,c]=Mu(i,l),u=(0,s.useMemo)((()=>o.map((e=>e.name))),[o]),p=(0,s.useMemo)((()=>t?Xu(a,t):a.filter((e=>{var t,o;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(o=e.categories)||void 0===o?void 0:o.includes(n)}))),[t,n,a]);(0,s.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,h.sprintf)(
18
  /* translators: %d: number of results. */
19
+ (0,h._n)("%d result found.","%d results found.",e),e);r(n)}),[t,r]);const m=(0,d.useAsyncList)(p,{step:2}),f=!(null==p||!p.length);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},f&&(0,s.createElement)(Ju,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,s.createElement)(Iu,null,!f&&(0,s.createElement)(zu,null),f&&(0,s.createElement)(Au,{shownPatterns:m,blockPatterns:p,onClickPattern:c,isDraggable:!1})))};function td(e){let{initialCategory:t,patternCategories:n}=e;const[o,r]=(0,s.useState)(""),[l,i]=(0,s.useState)(null==t?void 0:t.name);return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,s.createElement)(Fu,{selectedCategory:l,patternCategories:n,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,s.createElement)(ed,{filterValue:o,selectedCategory:l,patternCategories:n}))}var nd=function(e){let{onModalClose:t,...n}=e;return(0,s.createElement)(p.Modal,{title:(0,h.__)("Patterns"),closeLabel:(0,h.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,s.createElement)(td,n))};function od(e){let{rootClientId:t,onInsert:n,selectedCategory:o,populatedCategories:r}=e;const[l,,i]=Mu(n,t),a=(0,s.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=r.reduce(((e,t,n)=>{let{name:o}=t;return e[o]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[r]),c=(0,s.useMemo)((()=>l.filter((e=>{var t;return"uncategorized"===o.name?a(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(o.name)}))),[l,o]),u=(0,s.useMemo)((()=>c.sort(((e,t)=>a(e)-a(t)))),[c,a]),p=(0,d.useAsyncList)(u);return c.length?(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,s.createElement)(Au,{shownPatterns:p,blockPatterns:c,onClickPattern:i,label:o.label,orientation:"vertical",isDraggable:!0})):null}var rd=function(e){let{rootClientId:t,onInsert:n,onClickCategory:o,selectedCategory:r}=e;const[l,i]=(0,s.useState)(!1),[a,c]=Mu(),u=(0,s.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),d=(0,s.useMemo)((()=>{const e=c.filter((e=>a.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:o}=t;return[n,o].includes("featured")?"featured"===n?-1:1:0}));return a.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,h._x)("Uncategorized")}),e}),[a,c]),p=r||d[0];return(0,s.createElement)(s.Fragment,null,!l&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Nu,{selectedCategory:p,patternCategories:d,onClickCategory:o,openPatternExplorer:()=>i(!0)}),(0,s.createElement)(od,{rootClientId:t,onInsert:n,selectedCategory:p,populatedCategories:d})),l&&(0,s.createElement)(nd,{initialCategory:p,patternCategories:d,onModalClose:()=>i(!1)}))},ld=window.wp.url;function id(e){let{onHover:t,onInsert:n,rootClientId:o}=e;const[r,,,l]=Bu(o,n),i=(0,s.useMemo)((()=>r.filter((e=>{let{category:t}=e;return"reusable"===t}))),[r]);return 0===i.length?(0,s.createElement)(zu,null):(0,s.createElement)(wu,{title:(0,h.__)("Reusable blocks")},(0,s.createElement)(Su,{items:i,onSelect:l,onHover:t,label:(0,h.__)("Reusable blocks")}))}var sd=function(e){let{rootClientId:t,onInsert:n,onHover:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(id,{onHover:o,onInsert:n,rootClientId:t}),(0,s.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,s.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,ld.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,h.__)("Manage Reusable blocks"))))};const{Fill:ad,Slot:cd}=(0,p.createSlotFill)("__unstableInserterMenuExtension");ad.Slot=cd;var ud=ad;const dd=[];var pd=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:a,maxBlockPatterns:c,maxBlockTypes:m,showBlockDirectory:f=!1,isDraggable:g=!0,shouldFocusBlock:v=!0}=e;const b=(0,d.useDebounce)(Nt.speak,500),[_,k]=Vu({onSelect:n,rootClientId:r,clientId:l,isAppender:i,insertionIndex:a,shouldFocusBlock:v}),[y,E,C,S]=Bu(_,k),[w,,B]=Mu(k,_),I=(0,s.useMemo)((()=>{const e=Zu((0,u.orderBy)(y,["frecency"],["desc"]),E,C,t);return void 0!==m?e.slice(0,m):e}),[t,y,E,C,m]),x=(0,s.useMemo)((()=>{const e=Xu(w,t);return void 0!==c?e.slice(0,c):e}),[t,w,c]);(0,s.useEffect)((()=>{if(!t)return;const e=I.length+x.length,n=(0,h.sprintf)(
20
  /* translators: %d: number of results. */
21
+ (0,h._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const T=(0,d.useAsyncList)(I,{step:9}),N=(0,d.useAsyncList)(T.length===I.length?x:dd),P=!(0,u.isEmpty)(I)||!(0,u.isEmpty)(x);return(0,s.createElement)(Iu,null,!f&&!P&&(0,s.createElement)(zu,null),!!I.length&&(0,s.createElement)(wu,{title:(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("Blocks"))},(0,s.createElement)(Su,{items:T,onSelect:S,onHover:o,label:(0,h.__)("Blocks"),isDraggable:g})),!!I.length&&!!x.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!x.length&&(0,s.createElement)(wu,{title:(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("Block Patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(Au,{shownPatterns:N,blockPatterns:x,onClickPattern:B,isDraggable:g}))),f&&(0,s.createElement)(ud.Slot,{fillProps:{onSelect:S,onHover:o,filterValue:t,hasItems:P,rootClientId:_}},(e=>e.length?e:P?null:(0,s.createElement)(zu,null))))};const md={name:"blocks",
22
  /* translators: Blocks tab title in the block inserter. */
23
+ title:(0,h.__)("Blocks")},fd={name:"patterns",
24
  /* translators: Patterns tab title in the block inserter. */
25
+ title:(0,h.__)("Patterns")},hd={name:"reusable",
26
  /* translators: Reusable blocks tab title in the block inserter. */
27
+ title:(0,h.__)("Reusable")};var gd=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r}=e;const l=(0,s.useMemo)((()=>{const e=[md];return n&&e.push(fd),o&&e.push(hd),e}),[md,n,fd,o,hd]);return(0,s.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:r},t)},vd=function(e){let{rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,onSelect:l,showInserterHelpPanel:i,showMostUsedBlocks:a,__experimentalFilterValue:c="",shouldFocusBlock:u=!0}=e;const[d,f]=(0,s.useState)(c),[g,v]=(0,s.useState)(null),[b,_]=(0,s.useState)(null),[k,y,E]=Vu({rootClientId:t,clientId:n,isAppender:o,insertionIndex:r,shouldFocusBlock:u}),{showPatterns:C,hasReusableBlocks:S}=(0,m.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(zn);return{showPatterns:!!n(k).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[k]),w=(0,s.useCallback)(((e,t,n)=>{y(e,t,n),l()}),[y,l]),B=(0,s.useCallback)(((e,t)=>{y(e,{patternName:t}),l()}),[y,l]),I=(0,s.useCallback)((e=>{E(!!e),v(e)}),[E,v]),x=(0,s.useCallback)((e=>{_(e)}),[_]),T=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(Tu,{rootClientId:k,onInsert:w,onHover:I,showMostUsedBlocks:a})),i&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(p.VisuallyHidden,{as:"h2"},(0,h.__)("A tip for using the block editor")),(0,s.createElement)(Va,null)))),[k,w,I,d,a,i]),N=(0,s.useMemo)((()=>(0,s.createElement)(rd,{rootClientId:k,onInsert:B,onClickCategory:x,selectedCategory:b})),[k,B,x,b]),P=(0,s.useMemo)((()=>(0,s.createElement)(sd,{rootClientId:k,onInsert:w,onHover:I})),[k,w,I]),M=(0,s.useCallback)((e=>"blocks"===e.name?T:"patterns"===e.name?N:P),[T,N,P]);return(0,s.createElement)("div",{className:"block-editor-inserter__menu"},(0,s.createElement)("div",{className:"block-editor-inserter__main-area"},(0,s.createElement)("div",{className:"block-editor-inserter__content"},(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{g&&v(null),f(e)},value:d,label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),!!d&&(0,s.createElement)(pd,{filterValue:d,onSelect:l,onHover:I,rootClientId:t,clientId:n,isAppender:o,__experimentalInsertionIndex:r,showBlockDirectory:!0,shouldFocusBlock:u}),!d&&(C||S)&&(0,s.createElement)(gd,{showPatterns:C,showReusableBlocks:S},M),!d&&!C&&!S&&T)),i&&g&&(0,s.createElement)(fu,{item:g}))};function bd(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r}=e;const[l,i]=(0,s.useState)(""),[a,u]=Vu({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[d]=Bu(a,u),[f]=Mu(u,a),g=f.length&&!!l,v=g&&f.length>6||d.length>6,{setInserterIsOpened:b,insertionIndex:_}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:r}=e(zn),l=n(o);return{setInserterIsOpened:t().__experimentalSetIsInserterOpened,insertionIndex:-1===l?r():l}}),[o,n]);return(0,s.useEffect)((()=>{b&&b(!1)}),[b]),(0,s.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":v,"has-expand":b})},v&&(0,s.createElement)(p.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{i(e)},label:(0,h.__)("Search for blocks and patterns"),placeholder:(0,h.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(pd,{filterValue:l,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:g?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,s.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:n,insertionIndex:_,filterValue:l})},"aria-label":(0,h.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,h.__)("Browse all")))}const _d=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:a,toggleProps:c={}}=e;t=a?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
28
+ (0,h._x)("Add %s","directly add the only allowed block"),l):(0,h._x)("Add block","Generic label for block inserter button");const{onClick:u,...d}=c;return(0,s.createElement)(p.Button,i({icon:Fa,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),u&&u(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&r,disabled:o},d))};class kd extends s.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s,hasItems:a,renderToggle:c=_d}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!a,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:s})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i}=this.props;return i?(0,s.createElement)(bd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r}):(0,s.createElement)(vd,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||null!=n&&n.length?this.renderToggle({onToggle:o}):(0,s.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,h.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var yd=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{getBlockRootClientId:l,hasInserterItems:i,__experimentalGetAllowedBlocks:s,__experimentalGetDirectInsertBlock:a}=e(zn),{getBlockVariations:c}=e(r.store);o=o||l(n)||void 0;const d=s(o),p=a(o),m=1===(0,u.size)(d)&&0===(0,u.size)(c(d[0].name,"inserter"));let f=!1;return m&&(f=d[0]),{hasItems:i(o),hasSingleBlockType:m,blockTitle:f?f.title:"",allowedBlockType:f,directInsertBlock:p,rootClientId:o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,directInsertBlock:c,onSelectOrClose:u}=t;if(!(s||null!=c&&c.length))return;const{insertBlock:d}=e(zn);d(null!=c&&c.length?(0,r.createBlock)(...c):(0,r.createBlock)(a.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:s}=o(zn);if(l)return e(l);const a=t();return!i&&a&&s(a)===n?e(a)+1:r(n).length}(),n),u&&u();const p=(0,h.sprintf)(// translators: %s: the name of the block that has been added
29
+ (0,h.__)("%s block added"),a.title);(0,Nt.speak)(p)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(kd),Ed=(0,d.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(zn),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(zn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,Oa.decodeEntities)(r)||(0,h.__)("Type / to choose a block");return(0,s.createElement)("div",{"data-root-client-id":l||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,s.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,h.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{va.ENTER!==e.keyCode&&va.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,s.createElement)(yd,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Cd(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,s.createElement)(yd,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:a,isOpen:u,blockTitle:d,hasSingleBlockType:m}=e;n=m?(0,h.sprintf)(// translators: %s: the name of the block when there is only one
30
+ (0,h._x)("Add %s","directly add the only allowed block"),d):(0,h._x)("Add block","Generic label for block inserter button");const f=!m;let g=(0,s.createElement)(p.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:a,label:n},!m&&(0,s.createElement)(p.VisuallyHidden,{as:"span"},n),(0,s.createElement)(wo,{icon:Fa}));return(f||m)&&(g=(0,s.createElement)(p.Tooltip,{text:n},g)),g},isAppender:!0})}const Sd=(0,s.forwardRef)(((e,t)=>(Rt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Cd(e,t))));var wd=(0,s.forwardRef)(Cd),Bd=(0,m.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:o,getTemplateLock:l,getSelectedBlockClientId:i}=e(zn);return{isLocked:!!l(n),canInsertDefaultBlock:o((0,r.getDefaultBlockName)(),n),selectedBlockClientId:i()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:o,isLocked:r,renderAppender:l,className:i,selectedBlockClientId:a,tagName:u="div"}=e;if(r||!1===l)return null;if(l)t=(0,s.createElement)(l,null);else{if(a!==n&&(n||a))return null;t=o?(0,s.createElement)(Ed,{rootClientId:n}):(0,s.createElement)(wd,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,s.createElement)(u,{tabIndex:-1,className:c()("block-list-appender wp-block",i),"data-block":!0},t)}));function Id(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])}const xd=(0,s.createContext)();function Td(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,m.useDispatch)(zn),l=(0,s.useContext)(xd),i=(0,s.useRef)(),{orientation:a,previousClientId:u,nextClientId:f,rootClientId:g,isInserterShown:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(zn),a=r(),c=n(a.rootClientId);if(!c.length)return{};let u=c[a.index-1],d=c[a.index];for(;l(u);)u=i(u);for(;l(d);)d=s(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(a.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:a.rootClientId,isInserterShown:null==a?void 0:a.__unstableWithInserter}}),[]),b=Ia(u),_=Ia(f),k="vertical"===a,y=(0,s.useMemo)((()=>{if(!b&&!_)return{};const e=b?b.getBoundingClientRect():null,t=_?_.getBoundingClientRect():null;if(k)return{width:b?b.offsetWidth:_.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,h.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:b?b.offsetHeight:_.offsetHeight}}),[b,_]),E=(0,s.useCallback)((()=>{if(!b&&!_)return{};const{ownerDocument:e}=b||_,t=b?b.getBoundingClientRect():null,n=_?_.getBoundingClientRect():null;return k?(0,h.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,h.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[b,_]),C=Id(n),S=(0,d.useReducedMotion)(),w=c()("block-editor-block-list__insertion-point","is-"+a),B=b&&_&&v,I={start:{...k?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{...k?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:B?.4:0}},hover:{...k?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},x={start:{scale:S?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,s.createElement)(p.Popover,{ref:C,noArrow:!0,animate:!1,getAnchorRect:E,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:f+"--"+g},(0,s.createElement)(p.__unstableMotion.div,{layout:!S,initial:S?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&f&&o(f,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:c()(w,{"is-with-inserter":B}),onHoverEnd:function(e){e.target!==i.current||l.current||r()},style:y},(0,s.createElement)(p.__unstableMotion.div,{variants:I,className:"block-editor-block-list__insertion-point-indicator"}),B&&(0,s.createElement)(p.__unstableMotion.div,{variants:x,className:c()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(yd,{position:"bottom center",clientId:f,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function Nd(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:o}=e;const r=(0,m.useSelect)((e=>e(zn).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(xd.Provider,{value:(0,s.useRef)(!1)},r&&(0,s.createElement)(Td,{__unstablePopoverSlot:n,__unstableContentRef:o}),t)}function Pd(){const e=(0,s.useContext)(xd),t=(0,m.useSelect)((e=>e(zn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:c}=(0,m.useSelect)(zn),{showInsertionPoint:u,hideInsertionPoint:p}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)};function s(t){var o,s;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&p());let d;if(t.target.classList.contains("is-root-container")||(d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),c(d))return;const m=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),h=t.clientY-f.top,g=t.clientX-f.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===m&&e.offsetTop>h||e.classList.contains("wp-block")&&"horizontal"===m&&e.offsetLeft>g));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(s=v.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(a().includes(b))return;const _=v.getBoundingClientRect();if("horizontal"===m&&(t.clientY>_.bottom||t.clientY<_.top)||"vertical"===m&&(t.clientX>_.right||t.clientX<_.left))return void(l()&&p());const k=r(b);0!==k?u(d,k,{__unstableWithInserter:!0}):l()&&p()}}),[e,n,o,r,l,i,u,p,a])}const Md="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Rd="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Ld(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(zn),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),s=n(e),a=l(s);if(!a)return null;const c=o(e),u=i(s,c),d={title:a.title,icon:a.icon,description:a.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||a.title,icon:u.icon||a.icon,description:u.description||a.description}:d}),[e])}function Ad(e){let{clientId:t}=e;const{attributes:n,name:o,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=e(zn),i=n(t);if(!i)return{};const s=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(t),name:i,reusableBlockTitle:s&&l(o(t).ref)}}),[t]),i=Ld(t);if(!o||!i)return null;const s=(0,r.getBlockType)(o),a=s?(0,r.__experimentalGetBlockLabel)(s,n):null,c=l||a;return c&&c!==s.title?(0,u.truncate)(c,{length:35}):i.title}var Dd=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:a,isDraggable:c,icon:u}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:o,getTemplateLock:l,getBlockName:i}=e(zn),s=o(n[0]),a=s?l(s):null,c=i(n[0]);return{srcRootClientId:s,isDraggable:"all"!==a,icon:null===(t=(0,r.getBlockType)(c))||void 0===t?void 0:t.icon}}),[n]),d=(0,s.useRef)(!1),[f,h,g]=function(){const e=(0,s.useRef)(null),t=(0,s.useRef)(null),n=(0,s.useRef)(null),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,s.useCallback)((r=>{e.current=r.clientY,n.current=(0,rr.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,s.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY<l){const e=Math.max(l-50,0),n=Math.max(l-i-50,0)/e;t.current=-25*n}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,m.useDispatch)(zn);if((0,s.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const _={type:"block",srcClientIds:n,srcRootClientId:a};return(0,s.createElement)(p.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:_,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:h,onDragEnd:()=>{b(),d.current=!1,g(),i&&i()},__experimentalDragComponent:(0,s.createElement)(bu,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))},Od=function(e){let{clientId:t,rootClientId:n,blockElement:o}=e;const l=Ld(t),a=(0,m.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=e(zn),a=l(t),{name:c,attributes:u}=r(t);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(n))||void 0===o?void 0:o.orientation}}),[t,n]),{index:u,name:d,attributes:f,blockMovingMode:g,orientation:v}=a,{setNavigationMode:b,removeBlock:_}=(0,m.useDispatch)(zn),k=(0,s.useRef)(),y=(0,r.getBlockType)(d),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,f,u+1,v);(0,s.useEffect)((()=>{k.current.focus(),(0,Nt.speak)(E)}),[E]);const{hasBlockMovingClientId:C,getBlockIndex:S,getBlockRootClientId:w,getClientIdsOfDescendants:B,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:T,getNextBlockClientId:N,isNavigationMode:P}=(0,m.useSelect)(zn),{selectBlock:M,clearSelectedBlock:R,setBlockMovingClientId:L,moveBlockToPosition:A}=(0,m.useDispatch)(zn),D=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!g}),O=(0,h.__)("Drag");return(0,s.createElement)("div",{className:D},(0,s.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Ua,{icon:null==l?void 0:l.icon,showColors:!0})),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(Dd,{clientIds:[t]},(e=>(0,s.createElement)(p.Button,i({icon:vu,className:"block-selection-button_drag-handle","aria-hidden":"true",label:O,tabIndex:"-1"},e))))),(0,s.createElement)(p.FlexItem,null,(0,s.createElement)(p.Button,{ref:k,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===va.UP,l=n===va.DOWN,i=n===va.LEFT,s=n===va.RIGHT,a=n===va.TAB,c=n===va.ESCAPE,u=n===va.ENTER,d=n===va.SPACE,p=e.shiftKey;if(n===va.BACKSPACE||n===va.DELETE)return _(t),void e.preventDefault();const m=I(),f=x(),h=T(f||m),g=N(f||m),v=a&&p||r,b=a&&!p||l,k=i,y=s;let E;if(v)E=h;else if(b)E=g;else if(k){var D;E=null!==(D=w(m))&&void 0!==D?D:m}else if(y){var O;E=null!==(O=B([m])[0])&&void 0!==O?O:m}const F=C();if(c&&P()&&(R(),e.preventDefault()),c&&F&&!e.defaultPrevented&&(L(null),e.preventDefault()),(u||d)&&F){const e=w(F),t=w(m),n=S(F);let o=S(m);n<o&&e===t&&(o-=1),A(F,e,t,o),M(F),L(null)}if(b||v||k||y)if(E)e.preventDefault(),M(E);else if(a&&m){let t;b?(t=rr.focus.tabbable.findNext(o),t||(t=o.ownerDocument.defaultView.frameElement,t=rr.focus.tabbable.findNext(t))):t=rr.focus.tabbable.findPrevious(o),t&&(e.preventDefault(),t.focus(),R())}},label:E,className:"block-selection-button_select-button"},(0,s.createElement)(Ad,{clientId:t})))))};function Fd(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var zd=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const a=(0,s.useRef)(),c=function(e){const[t,n]=(0,s.useState)(!0),o=(0,s.useCallback)((()=>{const t=!rr.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Rt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,s.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(a);return function(e,t,n,o,r){const[l]=(0,s.useState)(t),[i]=(0,s.useState)(o),a=(0,s.useCallback)((()=>{!function(e){const[t]=rr.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,tc.useShortcut)("core/block-editor/focus-toolbar",a),(0,s.useEffect)((()=>{l&&a()}),[n,l,a]),(0,s.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Fd(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=Fd(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}(a,n,c,o,r),c?(0,s.createElement)(p.Toolbar,i({label:l["aria-label"],ref:a},l),t):(0,s.createElement)(p.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:a},l),t)},Vd=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Hd=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Ud=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Gd=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Wd=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?Vd:Hd:Ud:"down"===e?"horizontal"===t?(0,h.isRTL)()?Hd:Vd:Gd:null,$d=(e,t)=>"up"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move right"):(0,h.__)("Move left"):(0,h.__)("Move up"):"down"===e?"horizontal"===t?(0,h.isRTL)()?(0,h.__)("Move left"):(0,h.__)("Move right"):(0,h.__)("Move down"):null,jd=(0,s.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...a}=e;const f=(0,d.useInstanceId)(jd),g=(0,u.castArray)(n).length,{blockType:v,isDisabled:b,rootClientId:_,isFirst:k,isLast:y,firstIndex:E,orientation:C="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:s,getBlock:a,getBlockListSettings:c}=e(zn),d=(0,u.castArray)(n),p=(0,u.first)(d),m=i(p),f=t(p),h=t((0,u.last)(d)),g=s(m),v=a(p),b=0===f,_=h===g.length-1,{orientation:k}=c(m)||{};return{blockType:v?(0,r.getBlockType)(v.name):null,isDisabled:"up"===o?b:_,rootClientId:m,firstIndex:f,isFirst:b,isLast:_,orientation:l||k}}),[n,o]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(zn),B="up"===o?w:S,I=`block-editor-block-mover-button__description-${f}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:Wd(o,C),label:$d(o,C),"aria-describedby":I},a,{onClick:b?null:e=>{B(n,_),a.onClick&&a.onClick(e)},"aria-disabled":b})),(0,s.createElement)("span",{id:I,className:"block-editor-block-mover-button__description"},function(e,t,n,o,r,l,i){const s=n+1,a=e=>"up"===e?"horizontal"===i?(0,h.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,h.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,h.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,h.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
31
  (0,h._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,l):r>0&&!o?(0,h.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
32
  (0,h._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,l):void 0}(e,n,o,r,l);if(o&&r)return(0,h.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
33
  (0,h.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
42
  (0,h.__)("Move %1$s block from position %2$d right to position %3$d"),t,s,s-1)}if(l<0&&o){const e=a("up");if("up"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
43
  (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
44
  (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,h.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
45
+ (0,h.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(g,v&&v.title,E,k,y,"up"===o?-1:1,C)))})),Kd=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(jd,i({direction:"up",ref:t},e)))),qd=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(jd,i({direction:"down",ref:t},e))));var Yd=(0,m.withSelect)(((e,t)=>{var n;let{clientIds:o}=t;const{getBlock:l,getBlockIndex:i,getBlockListSettings:s,canMoveBlocks:a,getBlockOrder:c,getBlockRootClientId:d}=e(zn),p=(0,u.castArray)(o),m=(0,u.first)(p),f=l(m),h=d((0,u.first)(p)),g=i(m),v=0===g,b=i((0,u.last)(p))===c(h).length-1;return{blockType:f?(0,r.getBlockType)(f.name):null,canMove:a(o,h),rootClientId:h,firstIndex:g,isFirst:v,isLast:b,orientation:null===(n=s(h))||void 0===n?void 0:n.orientation}}))((function(e){let{isFirst:t,isLast:n,clientIds:o,canMove:r,isHidden:l,rootClientId:a,orientation:u,hideDragHandle:d}=e;const[m,f]=(0,s.useState)(!1),g=()=>f(!0),v=()=>f(!1);if(!r||t&&n&&!a)return null;const b=(0,h.__)("Drag");return(0,s.createElement)("div",{className:c()("block-editor-block-mover",{"is-visible":m||!l,"is-horizontal":"horizontal"===u})},!d&&(0,s.createElement)(Dd,{clientIds:o,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,s.createElement)(p.Button,i({icon:vu,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(p.ToolbarItem,{onFocus:g,onBlur:v},(e=>(0,s.createElement)(Kd,i({clientIds:o},e)))),(0,s.createElement)(p.ToolbarItem,{onFocus:g,onBlur:v},(e=>(0,s.createElement)(qd,i({clientIds:o},e))))))}));const{clearTimeout:Zd,setTimeout:Xd}=window,Qd=200;function Jd(e){let{ref:t,isFocused:n,debounceTimeout:o=Qd,onChange:r=u.noop}=e;const[l,i]=(0,s.useState)(!1),a=(0,s.useRef)(),c=e=>{null!=t&&t.current&&i(e),r(e)},d=()=>{const e=a.current;e&&Zd&&Zd(e)};return(0,s.useEffect)((()=>()=>d()),[]),{showMovers:l,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),l||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),a.current=Xd((()=>{(()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e})()&&c(!1)}),o)}}}function ep(e){let{ref:t,debounceTimeout:n=Qd,onChange:o=u.noop}=e;const[r,l]=(0,s.useState)(!1),{showMovers:i,debouncedShowMovers:a,debouncedHideMovers:c}=Jd({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),d=(0,s.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,s.useEffect)((()=>{const e=t.current,n=()=>{p()&&(l(!0),a())},o=()=>{p()||(l(!1),c())};return e&&!d.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),d.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,d,l,a,c]),{showMovers:i,gestures:{onMouseMove:a,onMouseLeave:c}}}function tp(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(zn),{firstParentClientId:n,shouldHide:o,hasReducedUI:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:l}=e(zn),{hasBlockSupport:i}=e(r.store),s=n(o()),a=s[s.length-1],c=t(a),u=(0,r.getBlockType)(c),d=l();return{firstParentClientId:a,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),a=Ld(n),c=(0,s.useRef)(),{gestures:u}=ep({ref:c,onChange(e){e&&l||t(n,e)}});return o||void 0===n?null:(0,s.createElement)("div",i({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,s.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,h.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
+ (0,h.__)("Select %s"),a.title),showTooltip:!0,icon:(0,s.createElement)(Ua,{icon:a.icon})}))}var np=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function op(e){let{blocks:t}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,h.__)("Preview")),(0,s.createElement)(pu,{viewportWidth:500,blocks:t})))))}var rp=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:l}=e;const[i,a]=(0,s.useState)();return(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Transform to"),className:t},i&&(0,s.createElement)(op,{blocks:(0,r.switchToBlockType)(l,i)}),n.map((e=>{const{name:t,icon:n,title:l,isDisabled:i}=e;return(0,s.createElement)(p.MenuItem,{key:t,className:(0,r.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),o(t)},disabled:i,onMouseLeave:()=>a(null),onMouseEnter:()=>a(t)},(0,s.createElement)(Ua,{icon:n,showColors:!0}),l)})))},lp=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),ip=window.wp.tokenList,sp=n.n(ip);function ap(e,t,n){const o=new(sp())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function cp(e){return(0,u.find)(e,"isDefault")}function up(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:l,blockType:i,className:a}=(0,m.useSelect)((e=>{const{getBlock:n}=e(zn),o=n(t);if(!o)return{};const l=(0,r.getBlockType)(o.name),{getBlockStyles:i}=e(r.store);return{block:o,blockType:l,styles:i(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,m.useDispatch)(zn),d=function(e){return e&&0!==e.length?cp(e)?e:[{name:"default",label:(0,h._x)("Default","block style"),isDefault:!0},...e]:[]}(o),p=function(e,t){for(const n of new(sp())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=(0,u.find)(e,{name:t});if(o)return o}return(0,u.find)(e,"isDefault")}(d,a),f=function(e,t){return(0,s.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,r.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,r.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(l,i);return{onSelect:e=>{const o=ap(a,p,e);c(t,{className:o}),n()},stylesToRender:d,activeStyle:p,genericPreviewBlock:f,className:a}}function dp(e){let{clientId:t,onSwitch:n=u.noop}=e;const{onSelect:o,stylesToRender:r,activeStyle:l}=up({clientId:t,onSwitch:n});return r&&0!==r.length?(0,s.createElement)(s.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.MenuItem,{key:e.name,icon:l.name===e.name?lp:null,onClick:()=>o(e)},(0,s.createElement)(p.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function pp(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,s.createElement)(dp,{clientId:o,onSwitch:n}))}const mp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=mp(e,t,n);if(o)return o}}},fp=(e,t)=>{const n=((e,t)=>{const n=(0,r.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};function hp(e){let{patterns:t,onSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,s.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,s.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,s.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,h.__)("Preview")),(0,s.createElement)(gp,{patterns:t,onSelect:n})))))}function gp(e){let{patterns:t,onSelect:n}=e;const o=(0,p.__unstableUseCompositeState)();return(0,s.createElement)(p.__unstableComposite,i({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,h.__)("Patterns list")}),t.map((e=>(0,s.createElement)(vp,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function vp(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",l=(0,d.useInstanceId)(vp,`${r}-list__item-description`);return(0,s.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?l:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,s.createElement)(pu,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,s.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,s.createElement)(p.VisuallyHidden,{id:l},t.description))}var bp=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[l,i]=(0,s.useState)(!1),a=((e,t)=>(0,s.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,r.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=mp(r,t.name,o);if(n){e=!0,o.add(n.clientId),fp(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]))(n,t);return a.length?(0,s.createElement)(p.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},l&&(0,s.createElement)(hp,{patterns:a,onSelect:o}),(0,s.createElement)(p.MenuItem,{onClick:e=>{e.preventDefault(),i(!l)},icon:Vd},(0,h.__)("Patterns"))):null};const _p=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o}=(0,m.useDispatch)(zn),l=Ld(n[0].clientId),{possibleBlockTransformations:i,canRemove:a,hasBlockStyles:c,icon:d,blockTitle:f,patterns:g}=(0,m.useSelect)((e=>{var o;const{getBlockRootClientId:i,getBlockTransformItems:s,__experimentalGetPatternTransformItems:a}=e(zn),{getBlockStyles:c,getBlockType:d}=e(r.store),{canRemoveBlocks:p}=e(zn),m=i((0,u.castArray)(t)[0]),[{name:f}]=n,h=1===n.length,g=h&&c(f);let v;var b;h?v=null==l?void 0:l.icon:v=1===(0,u.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(b=d(f))||void 0===b?void 0:b.icon:np;return{possibleBlockTransformations:s(n,m),canRemove:p(t,m),hasBlockStyles:!(null==g||!g.length),icon:v,blockTitle:null===(o=d(f))||void 0===o?void 0:o.title,patterns:a(n,m)}}),[t,n,null==l?void 0:l.icon]),v=1===n.length&&(0,r.isReusableBlock)(n[0]),b=1===n.length&&(0,r.isTemplatePart)(n[0]),_=!!i.length&&a,k=!(null==g||!g.length)&&a;if(!c&&!_)return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,s.createElement)(Ua,{icon:d,showColors:!0})}));const y=f,E=1===n.length?(0,h.sprintf)(
48
  /* translators: %s: block title. */
49
  (0,h.__)("%s: Change block type or style"),f):(0,h.sprintf)(
50
  /* translators: %d: number of blocks. */
51
+ (0,h._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),C=c||_||k;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:y,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ua,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(v||b)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,s.createElement)(Ad,{clientId:t}))),toggleProps:{describedBy:E,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:l}=e;return C&&(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,s.createElement)(bp,{blocks:n,patterns:g,onSelect:e=>{(e=>{o(t,e)})(e),l()}}),_&&(0,s.createElement)(rp,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{o(t,(0,r.switchToBlockType)(n,e))})(e),l()}}),c&&(0,s.createElement)(pp,{hoveredBlock:n[0],onSwitch:l}))})))))};var kp=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(zn).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,s.createElement)(_p,{clientIds:t,blocks:n})},yp=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Ep=window.wp.blob;function Cp(){const{getBlockName:e}=(0,m.useSelect)(zn),{getBlockType:t}=(0,m.useSelect)(r.store),{createSuccessNotice:n}=(0,m.useDispatch)(Pu.store);return(0,s.useCallback)(((o,r)=>{let l="";if(1===r.length){var i;const n=r[0],s=null===(i=t(e(n)))||void 0===i?void 0:i.title;l="copy"===o?(0,h.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
52
  (0,h.__)('Copied "%s" to clipboard.'),s):(0,h.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
53
  (0,h.__)('Moved "%s" to clipboard.'),s)}else l="copy"===o?(0,h.sprintf)(// Translators: %d: Number of blocks being copied.
54
  (0,h._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,h.sprintf)(// Translators: %d: Number of blocks being cut.
55
+ (0,h._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Sp(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,m.useSelect)(zn),{flashBlock:l,removeBlocks:i,replaceBlocks:s}=(0,m.useDispatch)(zn),a=Cp();return(0,d.useRefEffect)((c=>{function u(u){const d=t();if(0===d.length)return;if(!n()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,rr.documentHasUncollapsedSelection)(t):(0,rr.documentHasSelection)(t))return}if(!c.contains(u.target.ownerDocument.activeElement))return;const p=u.defaultPrevented;if(u.preventDefault(),"copy"===u.type||"cut"===u.type){1===d.length&&l(d[0]),a(u.type,d);const t=e(d),n=(0,r.serialize)(t);u.clipboardData.setData("text/plain",n),u.clipboardData.setData("text/html",n)}if("cut"===u.type)i(d);else if("paste"===u.type){if(p)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,rr.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!o&&(o=r.map((e=>`<img src="${(0,Ep.createBlobURL)(e)}">`)).join(""),n=""),{html:o,plainText:n}}(u),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});s(d,l,l.length-1,-1)}}return c.ownerDocument.addEventListener("copy",u),c.ownerDocument.addEventListener("cut",u),c.ownerDocument.addEventListener("paste",u),()=>{c.ownerDocument.removeEventListener("copy",u),c.ownerDocument.removeEventListener("cut",u),c.ownerDocument.removeEventListener("paste",u)}}),[])}var wp=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:Sp()},t)};function Bp(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:s,canMoveBlocks:a,canRemoveBlocks:c}=(0,m.useSelect)(zn),{getDefaultBlockName:d,getGroupingBlockName:p}=(0,m.useSelect)(r.store),f=s(t),h=i(t[0]),g=(0,u.every)(f,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,h))),v=l(d(),h),b=a(t,h),_=c(t,h),{removeBlocks:k,replaceBlocks:y,duplicateBlocks:E,insertAfterBlock:C,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:B,setNavigationMode:I,selectBlock:x}=(0,m.useDispatch)(zn),T=Cp();return n({canDuplicate:g,canInsertDefaultBlock:v,canMove:b,canRemove:_,rootClientId:h,blocks:f,onDuplicate:()=>E(t,o),onRemove:()=>k(t,o),onInsertBefore(){S((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){C((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),B(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,r.switchToBlockType)(f,e);n&&y(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&w(e[0]),T("copy",e)}})}var Ip=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(zn),s=o(n),a=i().codeEditingEnabled;return{mode:l(n),blockType:s?(0,r.getBlockType)(s.name):null,isCodeEditingEnabled:a}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:o}=t;return{onToggleMode(){e(zn).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const a="visual"===n?(0,h.__)("Edit as HTML"):(0,h.__)("Edit visually");return(0,s.createElement)(p.MenuItem,{onClick:o},!l&&a)})),xp=(0,d.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(zn).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(zn).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,h.__)("Convert to Blocks");return(0,s.createElement)(p.MenuItem,{onClick:n},!o&&r)}));const{Fill:Tp,Slot:Np}=(0,p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Tp.Slot=Np;var Pp=Tp;function Mp(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:a=(()=>{})}=e;const{replaceBlocks:c}=(0,m.useDispatch)(zn);return n||o?(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),a()}},(0,h._x)("Group","verb")),o&&(0,s.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),a()}},(0,h._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:Rp,Slot:Lp}=(0,p.createSlotFill)("BlockSettingsMenuControls");function Ap(e){let{...t}=e;return(0,s.createElement)(p.__experimentalStyleProvider,{document:document},(0,s.createElement)(Rp,t))}Ap.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:o,selectedClientIds:l}=(0,m.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o}=e(zn),r=null!==n?n:o();return{selectedBlocks:(0,u.map)((0,u.compact)(t(r)),(e=>e.name)),selectedClientIds:r}}),[n]),a=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(zn),{getGroupingBlockName:s}=e(r.store),a=i(),c=s(),u=l(c,null!=a&&a.length?n(a[0]):void 0),d=o(a),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:a,isGroupable:u&&d.length&&!p,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}(),{isGroupable:c,isUngroupable:d}=a,f=c||d;return(0,s.createElement)(Lp,{fillProps:{...t,selectedBlocks:o,selectedClientIds:l}},(e=>{if((null==e?void 0:e.length)>0||f)return(0,s.createElement)(p.MenuGroup,null,e,(0,s.createElement)(Mp,i({},a,{onClose:null==t?void 0:t.onClose})))}))};var Dp=Ap;const Op={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Fp(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n);return(0,s.createElement)(p.MenuItem,{ref:o},(0,h.__)("Copy"))}var zp=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,...l}=e;const a=(0,u.castArray)(t),c=a.length,d=a[0],{onlyBlock:f,title:g}=(0,m.useSelect)((e=>{var t;const{getBlockCount:n,getBlockName:o}=e(zn),{getBlockType:l}=e(r.store);return{onlyBlock:1===n(),title:null===(t=l(o(d)))||void 0===t?void 0:t.title}}),[d]),v=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(tc.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=(0,s.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),_=(0,h.sprintf)(
56
  /* translators: %s: block name */
57
+ (0,h.__)("Remove %s"),g),k=1===c?_:(0,h.__)("Remove blocks");return(0,s.createElement)(Bp,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:a,canRemove:m,onDuplicate:g,onInsertAfter:_,onInsertBefore:y,onRemove:E,onCopy:C,onMoveTo:S,blocks:w}=e;return(0,s.createElement)(p.DropdownMenu,i({icon:yp,label:(0,h.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Op,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(Pp.Slot,{fillProps:{onClose:l}}),1===c&&(0,s.createElement)(xp,{clientId:d}),(0,s.createElement)(Fp,{blocks:w,onCopy:C}),n&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,g,b),shortcut:v.duplicate},(0,h.__)("Duplicate")),r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,y),shortcut:v.insertBefore},(0,h.__)("Insert before")),(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,_),shortcut:v.insertAfter},(0,h.__)("Insert after"))),a&&!f&&(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,S)},(0,h.__)("Move to")),1===c&&(0,s.createElement)(Ip,{clientId:d,onToggle:l})),(0,s.createElement)(Dp.Slot,{fillProps:{onClose:l},clientIds:t}),"function"==typeof o?o({onClose:l}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:l}))),m&&(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,E,b),shortcut:v.remove},k)))}))}))},Vp=function(e){let{clientIds:t,...n}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(zp,i({clientIds:t,toggleProps:e},n)))))};function Hp(e){let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:a,hasReducedUI:u,isValid:f,isVisual:h}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:s}=e(zn),a=o(),c=a[0],u=i(c),d=s();return{blockClientIds:a,blockClientId:c,blockType:c&&(0,r.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:a.every((e=>l(e))),isVisual:a.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,m.useDispatch)(zn),v=(0,s.useRef)(),{showMovers:b,gestures:_}=ep({ref:v,onChange(e){e&&u||g(o,e)}}),k=(0,d.useViewportMatch)("medium","<")||a;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const y=k||b;if(0===n.length)return null;const E=f&&h,C=n.length>1,S=c()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,s.createElement)("div",{className:S},!C&&!k&&(0,s.createElement)(tp,{clientIds:n}),(0,s.createElement)("div",i({ref:v},_),(E||C)&&(0,s.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(kp,{clientIds:n}),(0,s.createElement)(Yd,{clientIds:n,hideDragHandle:t||u}))),E&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Yn.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,s.createElement)(Yn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,s.createElement)(Vp,{clientIds:n}))}var Up=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:a,showParentSelector:u}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(zn),{getBlockType:l}=e(r.store),i=o(),s=i[0],a=n(s),c=l(t(a[a.length-1]));return{blockType:s&&l(t(s)),hasParents:a.length,showParentSelector:(0,r.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":a&&u,"is-fixed":n});return(0,s.createElement)(zd,i({focusOnMount:t,className:d
58
+ /* translators: accessibility text for the block toolbar */,"aria-label":(0,h.__)("Block tools")},o),(0,s.createElement)(Hp,{hideDragHandle:n}))};function Gp(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(zn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function Wp(e){let{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:a}=e;const{isNavigationMode:u,isMultiSelecting:f,isTyping:h,isCaretWithinFormattedText:g,hasMultiSelection:v,hasFixedToolbar:b,lastClientId:_}=(0,m.useSelect)(Gp,[]),k=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(zn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),y=(0,d.useViewportMatch)("medium"),[E,C]=(0,s.useState)(!1),[S,w]=(0,s.useState)(!1),{stopTyping:B}=(0,m.useDispatch)(zn),I=!h&&!u&&r&&o,x=u,T=!u&&!b&&y&&!I&&!f&&(!h||g),N=!(u||T||b||r);(0,tc.useShortcut)("core/block-editor/focus-toolbar",(()=>{C(!0),B(!0)}),{isDisabled:!N}),(0,s.useEffect)((()=>{T||C(!1)}),[T]);const P=(0,s.useRef)(),M=Ia(t),R=Ia(_),L=Ia(l),A=Id(a);if(!(x||T||E||I))return null;let D=M;if(!D)return null;l&&(D=L);let O=D;if(v){if(!R)return null;O={top:D,bottom:R}}const F=I?"top left right":"top right left",{ownerDocument:z}=D,V=I?void 0:z.defaultView.frameElement||(0,rr.getScrollContainer)(D)||z.body;return(0,s.createElement)(p.Popover,{ref:A,noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:O,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:D,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==a?void 0:a.current},(T||E)&&(0,s.createElement)("div",{onFocus:function(){w(!0)},onBlur:function(){w(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":S})},(0,s.createElement)(yd,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||E)&&(0,s.createElement)(Up,{focusOnMount:E,__experimentalInitialIndex:P.current,__experimentalOnIndexChange:e=>{P.current=e},key:t}),x&&(0,s.createElement)(Od,{clientId:t,rootClientId:n,blockElement:D}),I&&(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(yd,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function $p(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:s}=e(zn),a=t()||n();if(!a)return;const{name:c,attributes:d={},isValid:p}=l(a)||{},m=i(a),f=s(m),h=(0,u.find)(m,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:a,rootClientId:o(a),name:c,isValid:p,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:h}}function jp(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,m.useSelect)($p,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u}=o;return i?(0,s.createElement)(Wp,{clientId:r,rootClientId:l,isValid:a,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Kp(e){let{children:t}=e;const n=(0,s.useContext)(xd),o=(0,s.useContext)(p.Disabled.Context);return n||o?t:(Rt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,s.createElement)(Nd,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)(jp,{__unstablePopoverSlot:"block-toolbar"}),t))}var qp=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Gn();return(0,s.createElement)(e,i({},t,{clientId:n}))}),"withClientId"),Yp=qp((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,s.createElement)(wd,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})})),Zp=(0,d.compose)([qp,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(zn),r=o(n);return{lastBlockClientId:(0,u.last)(r)}}))])((e=>{let{clientId:t}=e;return(0,s.createElement)(Ed,{rootClientId:t})})),Xp=window.wp.isShallowEqual,Qp=n.n(Xp);const Jp=new WeakMap;function em(e,t){const n=(0,m.useSelect)((e=>e(zn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,m.useSelect)(zn),{insertBlocks:s,moveBlocksToPosition:a,updateBlockAttributes:c,clearSelectedBlock:u}=(0,m.useDispatch)(zn),d=function(e,t,n,o,l,i,s){return a=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a);if("inserter"===d){s();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0]);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,s=u.length;l(u,c,e,i&&r<t?t-s:t)}}}(e,t,l,i,a,s,u),p=function(e,t,n,o,l,i){return s=>{if(!n)return;const a=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(s)));if(a){const n=a.transform(s,o);i(n,t,e)}}}(e,t,n,c,o,s),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,s);return e=>{const t=(0,rr.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?f(n):t.length?p(t):d(e)}}function tm(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,s=o?l:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=a&&i<=c?i:i<c?a:c,Math.sqrt((i-d)**2+(s-u)**2)}function nm(e,t){let n,o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=tm(e,t,r);(void 0===n||l<n)&&(n=l,o=r)})),[n,o]}function om(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,h.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=nm(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}function rm(){let{rootClientId:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,s.useState)(null),o=(0,m.useSelect)((t=>{const{getTemplateLock:n}=t(zn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,m.useSelect)(zn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,m.useDispatch)(zn),a=em(e,t),c=(0,d.useThrottle)((0,s.useCallback)(((t,o)=>{var i;const s=om(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===s?0:s),null!==s&&l(e,s)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function lm(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:a,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:f,renderAppender:h,orientation:g,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,a){const{updateBlockListSettings:c}=(0,m.useDispatch)(zn),{blockListSettings:u,parentLock:d}=(0,m.useSelect)((t=>{const n=t(zn).getBlockRootClientId(e);return{blockListSettings:t(zn).getBlockListSettings(e),parentLock:t(zn).getTemplateLock(n)}}),[e]),p=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===r?d:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=Io(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),Qp()(u,t)||c(e,t)}),[e,u,p,n,o,r,d,l,i,c,a])}(t,n,o,l,a,p,g,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,m.useSelect)(zn),{replaceInnerBlocks:i}=(0,m.useDispatch)(zn),a=(0,m.useSelect)((t=>t(zn).getBlocks(e)),[e]),c=(0,s.useRef)(null);(0,s.useLayoutEffect)((()=>{if((0===a.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,r.synchronizeBlocksWithTemplate)(a,t);(0,u.isEqual)(n,a)||i(e,n,0===a.length&&o&&0!==n.length,l())}}),[a,t,n,e])}(t,i,a,d);const _=(0,m.useSelect)((e=>{const n=e(zn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Jp.has(t)||Jp.set(t,new WeakMap);const n=Jp.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,s.createElement)(ir,{value:_},(0,s.createElement)(hm,{rootClientId:t,renderAppender:h,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function im(e){return Wa(e),(0,s.createElement)(lm,e)}const sm=(0,s.forwardRef)(((e,t)=>{const n=am({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function am(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Gn(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:a}=(0,m.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:s}=e(zn),a=t(n),c=s()||o;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(a,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==a&&!l(n)&&!i(n,!0)&&c}}),[n,o]),u=(0,d.useMergeRefs)([e.ref,rm({rootClientId:n})]),p={__experimentalCaptureToolbars:l,...t},f=p.value&&p.onChange?im:lm;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,s.createElement)(f,i({},p,{clientId:n})):(0,s.createElement)(hm,t)}}am.save=r.__unstableGetInnerBlocksProps,sm.DefaultBlockAppender=Zp,sm.ButtonBlockAppender=Yp,sm.Content=()=>am.save().children;var cm=sm;const um=(0,s.createContext)(),dm=(0,s.createContext)();function pm(e){let{className:t,...n}=e;const[o,r]=(0,s.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,isNavigationMode:u}=(0,m.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(zn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),p=am({ref:(0,d.useMergeRefs)([Ka(),Pd(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":a&&l,"is-navigate-mode":u})},n);return(0,s.createElement)(um.Provider,{value:o},(0,s.createElement)("div",p))}function mm(e){return function(){const e=(0,m.useSelect)((e=>e(zn).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,m.select)(zn).__experimentalGetParsedPattern(e[n].name),t=Md(o))};return t=Md(o),()=>Rd(t)}),[e])}(),(0,s.createElement)(Kp,null,(0,s.createElement)(Un,{value:Vn},(0,s.createElement)(pm,e)))}function fm(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=xo}=e;const[i,a]=(0,s.useState)(new Set),c=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{a((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[a]),{order:u,selectedBlocks:d}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o}=e(zn);return{order:t(n),selectedBlocks:o()}}),[n]);return(0,s.createElement)(No,{value:l},(0,s.createElement)(dm.Provider,{value:c},u.map((e=>(0,s.createElement)(m.AsyncModeProvider,{key:e,value:!i.has(e)&&!d.includes(e)},(0,s.createElement)(Da,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,s.createElement)(Bd,{tagName:r,rootClientId:n,renderAppender:o}))}function hm(e){return(0,s.createElement)(m.AsyncModeProvider,{value:!1},(0,s.createElement)(fm,e))}mm.__unstableElementContext=um;const gm=["colors","disableCustomColors","gradients","disableCustomGradients"];function vm(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,className:a,label:d,onColorChange:m,onGradientChange:f,colorValue:g,gradientValue:v,clearable:b,showTitle:_=!0,enableAlpha:k}=e;const y=m&&(!(0,u.isEmpty)(t)||!o),E=f&&(!(0,u.isEmpty)(n)||!r),[C,S]=(0,s.useState)(v?"gradient":!!y&&"color");return y||E?(0,s.createElement)(p.BaseControl,{className:c()("block-editor-color-gradient-control",a)},(0,s.createElement)("fieldset",null,(0,s.createElement)(p.__experimentalVStack,{spacing:1},_&&(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(p.BaseControl.VisualLabel,null,d))),y&&E&&(0,s.createElement)(p.__experimentalToggleGroupControl,{value:C,onChange:S,label:(0,h.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"color",label:(0,h.__)("Solid")}),(0,s.createElement)(p.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,h.__)("Gradient")})),("color"===C||!E)&&(0,s.createElement)(p.ColorPalette,{value:g,onChange:E?e=>{m(e),f()}:m,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b,enableAlpha:k}),("gradient"===C||!y)&&(0,s.createElement)(p.GradientPicker,{value:v,onChange:y?e=>{f(e),m()}:f,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b})))):null}function bm(e){const t={};return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),t.disableCustomColors=!mo("color.custom"),t.disableCustomGradients=!mo("color.customGradient"),(0,s.createElement)(vm,i({},t,e))}var _m=function(e){return(0,u.every)(gm,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(vm,e):(0,s.createElement)(bm,e)};function km(e){let t,{colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:a,__experimentalIsRenderedInSidebar:u,enableAlpha:d,settings:m}=e;return u&&(t=(0,h.isRTL)()?"bottom right":"bottom left"),(0,s.createElement)(p.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,className:"block-editor-panel-color-gradient-settings__item-group"},m.map(((e,m)=>(0,s.createElement)(p.Dropdown,{key:m,position:t,className:"block-editor-panel-color-gradient-settings__dropdown",contentClassName:"block-editor-panel-color-gradient-settings__dropdown-content",renderToggle:t=>{var n;let{isOpen:o,onToggle:r}=t;return(0,s.createElement)(p.__experimentalItem,{onClick:r,className:c()("block-editor-panel-color-gradient-settings__item",{"is-open":o})},(0,s.createElement)(p.__experimentalHStack,{justify:"flex-start"},(0,s.createElement)(p.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:null!==(n=e.gradientValue)&&void 0!==n?n:e.colorValue}),(0,s.createElement)(p.FlexItem,null,e.label)))},renderContent:()=>(0,s.createElement)(_m,i({showTitle:!1,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:a,__experimentalIsRenderedInSidebar:u,enableAlpha:d},e))}))))}function ym(){return{disableCustomColors:!mo("color.custom"),disableCustomGradients:!mo("color.customGradient")}}function Em(){const e=ym(),t=mo("color.palette.custom"),n=mo("color.palette.theme"),o=mo("color.palette.default"),r=mo("color.defaultPalette");e.colors=(0,s.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,h._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=mo("color.gradients.custom"),i=mo("color.gradients.theme"),a=mo("color.gradients.default"),c=mo("color.defaultGradients");return e.gradients=(0,s.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,h._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&a&&a.length&&e.push({name:(0,h._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),l&&l.length&&e.push({name:(0,h._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,a]),e}Ac([Dc,zc]);const Cm=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},Sm=(e,t)=>(0,u.find)(e,{color:t});function wm(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const Bm=[];function Im(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=Em(),l=r.colors.reduce(((e,t)=>e.concat(t.colors)),[]),{color:a}=(null==n?void 0:n.border)||{},[c,u]=(0,s.useState)((()=>{var e;return null===(e=Cm(l,t,a))||void 0===e?void 0:e.color}));(0,s.useEffect)((()=>{var e;u(null===(e=Cm(l,t,a))||void 0===e?void 0:e.color)}),[t,a,l]);const d=[{label:(0,h.__)("Color"),onColorChange:e=>{u(e);const t=Sm(l,e),r={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},i=null!=t&&t.slug?t.slug:void 0;o({style:qo(r),borderColor:i})},colorValue:c,clearable:!1}];return(0,s.createElement)(km,i({settings:d,disableCustomColors:!0,disableCustomGradients:!0,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,enableAlpha:!0},r))}function xm(e,t,n){var o;if(!Jm(t,"color")||ef(t))return e;const{borderColor:r,style:l}=n,i=wm("border-color",r),s=c()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=s||void 0,e}const Tm=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:a}=l,c=mo("color.palette")||Bm;if(!Jm(r,"color")||ef(r))return(0,s.createElement)(e,t);const u={borderColor:a?null===(n=Cm(c,a))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,s.createElement)(e,i({},t,{wrapperProps:d}))}));function Nm(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Pm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,p.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=Nm(o),i=0===r||r?`${r}${l}`:null;return i}function Mm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Pm(e),n=isNaN(parseFloat(t));return n}function Rm(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function Lm(e){let{onChange:t,values:n,...o}=e;const r=Pm(n),l=Rm(n)&&Mm(n),a=l?(0,h.__)("Mixed"):null;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{"aria-label":(0,h.__)("Border radius"),disableUnits:l,isOnly:!0,value:r,onChange:t,placeholder:a}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Jm(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",xm),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Jm(e,"color")||ef(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),xm(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Tm);const Am={topLeft:(0,h.__)("Top left"),topRight:(0,h.__)("Top right"),bottomLeft:(0,h.__)("Bottom left"),bottomRight:(0,h.__)("Bottom right")};function Dm(e){let{onChange:t,values:n,...o}=e;const r="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(Am).map((e=>{let[n,l]=e;return(0,s.createElement)(p.__experimentalUnitControl,i({},o,{key:n,"aria-label":l,value:r[n],onChange:(a=n,e=>{t&&t({...r,[a]:e||void 0})})}));var a})))}var Om=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),Fm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function zm(e){let{isLinked:t,...n}=e;const o=t?(0,h.__)("Unlink Radii"):(0,h.__)("Link Radii");return(0,s.createElement)(p.Tooltip,{text:o},(0,s.createElement)(p.Button,i({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?Om:Fm,iconSize:16,"aria-label":o})))}const Vm={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},Hm={px:100,em:20,rem:20};function Um(e){let{onChange:t,values:n}=e;const[o,r]=(0,s.useState)(!Rm(n)||!Mm(n)),l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,p.__experimentalParseUnit)(e);return t||"px"}return Nm(Object.values(e).map((e=>{const[,t]=(0,p.__experimentalParseUnit)(e);return t})))||"px"}(n),a=l&&l.find((e=>e.value===i)),c=(null==a?void 0:a.step)||1,[u]=(0,p.__experimentalParseUnit)(Pm(n));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,h.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Lm,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,unit:i,units:l}),(0,s.createElement)(p.RangeControl,{className:"components-border-radius-control__range-control",value:u,min:0,max:Hm[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,s.createElement)(Dm,{min:0,onChange:t,values:n||Vm,units:l}),(0,s.createElement)(zm,{onClick:()=>r(!o),isLinked:o})))}function Gm(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Um,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=qo(t)),o({style:t})}})}var Wm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{d:"M5 11.25h14v1.5H5z"})),$m=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),jm=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(O.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const Km=[{label:(0,h.__)("Solid"),icon:Wm,value:"solid"},{label:(0,h.__)("Dashed"),icon:$m,value:"dashed"},{label:(0,h.__)("Dotted"),icon:jm,value:"dotted"}];function qm(e){let{onChange:t,value:n}=e;return(0,s.createElement)("fieldset",{className:"components-border-style-control"},(0,s.createElement)("legend",null,(0,h.__)("Style")),(0,s.createElement)("div",{className:"components-border-style-control__buttons"},Km.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const Ym=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(qm,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:qo(t)})}})},Zm=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:l,style:i}=(null==n?void 0:n.border)||{},[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)(),[m,f]=(0,s.useState)(),g=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"]});return(0,s.createElement)(p.__experimentalUnitControl,{value:r,label:(0,h.__)("Width"),min:0,onChange:e=>{let s={...n,border:{...null==n?void 0:n.border,width:e}},p=t;const h=0===parseFloat(e),g=0===parseFloat(r);h&&!g&&(d(t),f(l),c(i),p=void 0,s.border.color=void 0,s.border.style="none"),!h&&g&&("none"===i&&(s.border.style=a),void 0===t&&(p=u,s.border.color=m)),void 0!==e&&""!==e||(s=qo(s)),o({borderColor:p,style:s})},units:g})},Xm="__experimentalBorder";function Qm(e){const{clientId:t}=e,n=tf(e),o=Jm(e.name),l=mo("border.color")&&Jm(e.name,"color"),i=mo("border.radius")&&Jm(e.name,"radius"),a=mo("border.style")&&Jm(e.name,"style"),c=mo("border.width")&&Jm(e.name,"width");if(n||!o)return null;const u=(0,r.getBlockSupport)(e.name,[Xm,"__experimentalDefaultControls"]),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var o;return{...n,...t,style:{...n.style,border:{...null===(o=n.style)||void 0===o?void 0:o.border,[e]:void 0}}}}};return(0,s.createElement)(er,{__experimentalGroup:"border"},c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.width)}(e),label:(0,h.__)("Width"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:nf(o,"width")})}(e),isShownByDefault:null==u?void 0:u.width,resetAllFilter:d("width"),panelId:t},(0,s.createElement)(Zm,e)),a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.style)}(e),label:(0,h.__)("Style"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:nf(o,"style")})}(e),isShownByDefault:null==u?void 0:u.style,resetAllFilter:d("style"),panelId:t},(0,s.createElement)(Ym,e)),l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{attributes:{borderColor:n,style:o}}=e;return!!n||!(null==o||null===(t=o.border)||void 0===t||!t.color)}(e),label:(0,h.__)("Color"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({borderColor:void 0,style:nf(o,"color")})}(e),isShownByDefault:null==u?void 0:u.color,resetAllFilter:d("color",{borderColor:void 0}),panelId:t},(0,s.createElement)(Im,e)),i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,h.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:nf(o,"radius")})}(e),isShownByDefault:null==u?void 0:u.radius,resetAllFilter:d("radius"),panelId:t},(0,s.createElement)(Gm,e)))}function Jm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==s.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Xm);return!!(!0===n||("any"===t?null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style:null!=n&&n[t]))}function ef(e){const t=(0,r.getBlockSupport)(e,Xm);return null==t?void 0:t.__experimentalSkipSerialization}const tf=()=>[!mo("border.color"),!mo("border.radius"),!mo("border.style"),!mo("border.width")].every(Boolean);function nf(e,t){return qo({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function of(e){if(e)return`has-${e}-gradient-background`}function rf(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function lf(e,t){return(0,u.find)(e,["gradient",t])}function sf(e,t){const n=lf(e,t);return n&&n.slug}function af(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Gn(),o=mo("color.gradients.custom"),r=mo("color.gradients.theme"),l=mo("color.gradients.default"),i=(0,s.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:a,customGradient:c}=(0,m.useSelect)((o=>{const{getBlockAttributes:r}=o(zn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,m.useDispatch)(zn),d=(0,s.useCallback)((o=>{const r=sf(i,o);u(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,u]),p=of(a);let f;return f=a?rf(i,a):c,{gradientClass:p,gradientValue:f,setGradient:d}}
59
  // translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
60
+ const cf=(0,h.__)("(%s: color %s)"),uf=(0,h.__)("(%s: gradient %s)"),df=["colors","disableCustomColors","gradients","disableCustomGradients"],pf=e=>{let{colors:t,gradients:n,settings:o}=e;return o.map(((e,o)=>{let r,{colorValue:l,gradientValue:i,label:a,colors:c,gradients:u}=e;if(!l&&!i)return null;if(l){const e=Sm(c||t,l);r=(0,h.sprintf)(cf,a.toLowerCase(),e&&e.name||l)}else{const e=lf(u||n,l);r=(0,h.sprintf)(uf,a.toLowerCase(),e&&e.name||i)}return(0,s.createElement)(p.ColorIndicator,{key:o,colorValue:l||i,"aria-label":r})}))},mf=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:a,settings:d,title:m,showTitle:f=!0,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:g,enableAlpha:v,...b}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(d,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const _=(0,s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},m,(0,s.createElement)(pf,{colors:n,gradients:o,settings:d}));return(0,s.createElement)(p.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",t),title:f?_:void 0},b),(0,s.createElement)(km,{settings:d,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:h,__experimentalIsRenderedInSidebar:g,enableAlpha:v}),!!a&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalSpacer,{marginY:4})," ",a))},ff=e=>{const t=ym();return t.colors=mo("color.palette"),t.gradients=mo("color.gradients"),(0,s.createElement)(mf,i({},t,e))},hf=e=>{const t=Em();return(0,s.createElement)(mf,i({},t,e))};// translators: first %s: The type of color or gradient (e.g. background, overlay...), second %s: the color name or value (e.g. red or #ff0000)
61
+ var gf=e=>(0,u.every)(df,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(mf,e):e.__experimentalHasMultipleOrigins?(0,s.createElement)(hf,e):(0,s.createElement)(ff,e);function vf(e){let{colordBackgroundColor:t,colordTextColor:n,backgroundColor:o,textColor:r}=e;const l=t.brightness()<n.brightness()?(0,h.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,h.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,s.useEffect)((()=>{(0,Nt.speak)((0,h.__)("This color combination may be hard for people to read."))}),[o,r]),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(p.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},l))}Ac([Dc,zc]);var bf=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fontSize:r,isLargeText:l,textColor:i}=e;if(!t&&!n||!i&&!o)return null;const a=Rc(t||n),c=Rc(i||o);return 1!==a.alpha()||1!==c.alpha()||c.isReadable(a,{level:"AA",size:l||!1!==l&&r>=24?"large":"small"})?null:(0,s.createElement)(vf,{backgroundColor:t,textColor:i,colordBackgroundColor:a,colordTextColor:c})};function _f(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function kf(e){let{settings:t,clientId:n,enableContrastChecking:o=!0,showTitle:r=!0}=e;const[l,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),u=Ba(n);return(0,s.useEffect)((()=>{if(!o)return;if(!u.current)return;c(_f(u.current).color);let e=u.current,t=_f(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=_f(e).backgroundColor;i(t)})),(0,s.createElement)(er,null,(0,s.createElement)(gf,{title:(0,h.__)("Color"),initialOpen:!1,settings:t,showTitle:r,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0},o&&(0,s.createElement)(bf,{backgroundColor:l,textColor:a})))}const yf="color",Ef=e=>{const t=(0,r.getBlockSupport)(e,yf);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Cf=e=>{const t=(0,r.getBlockSupport)(e,yf);return null==t?void 0:t.__experimentalSkipSerialization},Sf=e=>{const t=(0,r.getBlockSupport)(e,yf);return(0,u.isObject)(t)&&!!t.gradients};function wf(e,t,n){var o,r,l,i,s,a;if(!Ef(t)||Cf(t))return e;const u=Sf(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,h=wm("background-color",d),g=of(m),v=wm("color",p),b=c()(e.className,v,g,{[h]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!h),"has-text-color":p||(null==f||null===(r=f.color)||void 0===r?void 0:r.text),"has-background":d||(null==f||null===(l=f.color)||void 0===l?void 0:l.background)||u&&(m||(null==f||null===(i=f.color)||void 0===i?void 0:i.gradient)),"has-link-color":null==f||null===(s=f.elements)||void 0===s||null===(a=s.link)||void 0===a?void 0:a.color});return e.className=b||void 0,e}const Bf=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Cm(e,n[1]).color:t};function If(e){var t,n,o,l,i,a,c,d,p;const{name:m,attributes:f}=e,g=mo("color.palette.custom"),v=mo("color.palette.theme"),b=mo("color.palette.default"),_=(0,s.useMemo)((()=>[...g||[],...v||[],...b||[]]),[g,v,b]),k=mo("color.gradients.custom"),y=mo("color.gradients.theme"),E=mo("color.gradients.default"),C=(0,s.useMemo)((()=>[...k||[],...y||[],...E||[]]),[k,y,E]),S=mo("color.custom"),w=mo("color.customGradient"),B=mo("color.background"),I=mo("color.link"),x=mo("color.text"),T=S||!v||(null==v?void 0:v.length)>0,N=w||!y||(null==y?void 0:y.length)>0,P=(0,s.useRef)(f);if((0,s.useEffect)((()=>{P.current=f}),[f]),!Ef(m))return null;const M=(e=>{if("web"!==s.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,yf);return(0,u.isObject)(t)&&!!t.link})(m)&&I&&T,R=(e=>{const t=(0,r.getBlockSupport)(e,yf);return t&&!1!==t.text})(m)&&x&&T,L=(e=>{const t=(0,r.getBlockSupport)(e,yf);return t&&!1!==t.background})(m)&&B&&T,A=Sf(m)&&N;if(!(M||R||L||A))return null;const{style:D,textColor:O,backgroundColor:F,gradient:z}=f;let V;if(A&&z)V=rf(C,z);else if(A){var H;V=null==D||null===(H=D.color)||void 0===H?void 0:H.gradient}const U=t=>n=>{var o,r;const l=Sm(_,n),i=t+"Color",s={...P.current.style,color:{...null===(o=P.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},a=null!=l&&l.slug?l.slug:void 0,c={style:qo(s),[i]:a};e.setAttributes(c),P.current={...P.current,...c}};return(0,s.createElement)(kf,{enableContrastChecking:!("web"!==s.Platform.OS||z||null!=D&&null!==(t=D.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...R?[{label:(0,h.__)("Text"),onColorChange:U("text"),colorValue:Cm(_,O,null==D||null===(n=D.color)||void 0===n?void 0:n.text).color}]:[],...L||A?[{label:(0,h.__)("Background"),onColorChange:L?U("background"):void 0,colorValue:Cm(_,F,null==D||null===(o=D.color)||void 0===o?void 0:o.background).color,gradientValue:V,onGradientChange:A?t=>{const n=sf(C,t);let o;if(n){var r,l,i;const e={...null===(r=P.current)||void 0===r?void 0:r.style,color:{...null===(l=P.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:qo(e),gradient:n}}else{var s,a,c;const e={...null===(s=P.current)||void 0===s?void 0:s.style,color:{...null===(a=P.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:qo(e),gradient:void 0}}e.setAttributes(o),P.current={...P.current,...o}}:void 0}]:[],...M?[{label:(0,h.__)("Link"),onColorChange:t=>{const n=Sm(_,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=qo(function(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},["elements","link","color","text"],n,u.clone)}(D,0,o));e.setAttributes({style:r})},colorValue:Bf(_,null==D||null===(l=D.elements)||void 0===l||null===(i=l.link)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.text),clearable:!(null==D||null===(c=D.elements)||void 0===c||null===(d=c.link)||void 0===d||null===(p=d.color)||void 0===p||!p.text)}]:[]]})}const xf=(0,d.createHigherOrderComponent)((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:l,textColor:a}=r,c=mo("color.palette.custom")||[],u=mo("color.palette.theme")||[],d=mo("color.palette.default")||[],p=(0,s.useMemo)((()=>[...c||[],...u||[],...d||[]]),[c,u,d]);if(!Ef(o)||Cf(o))return(0,s.createElement)(e,t);const m={};var f,h;a&&(m.color=null===(f=Cm(p,a))||void 0===f?void 0:f.color),l&&(m.backgroundColor=null===(h=Cm(p,l))||void 0===h?void 0:h.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...m,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,s.createElement)(e,i({},t,{wrapperProps:g}))}));(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Ef(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Sf(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",wf),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Ef(e)||Cf(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),wf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",xf);const Tf=[{name:(0,h.__)("Regular"),value:"normal"},{name:(0,h.__)("Italic"),value:"italic"}],Nf=[{name:(0,h.__)("Thin"),value:"100"},{name:(0,h.__)("Extra Light"),value:"200"},{name:(0,h.__)("Light"),value:"300"},{name:(0,h.__)("Regular"),value:"400"},{name:(0,h.__)("Medium"),value:"500"},{name:(0,h.__)("Semi Bold"),value:"600"},{name:(0,h.__)("Bold"),value:"700"},{name:(0,h.__)("Extra Bold"),value:"800"},{name:(0,h.__)("Black"),value:"900"}],Pf=(e,t)=>e?t?(0,h.__)("Appearance"):(0,h.__)("Font style"):(0,h.__)("Font weight");function Mf(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,a=Pf(n,o),c={key:"default",name:(0,h.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,s.useMemo)((()=>n&&o?(()=>{const e=[c];return Tf.forEach((t=>{let{name:n,value:o}=t;Nf.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,h.sprintf)(
62
  /* translators: 1: Font weight name. 2: Font style name. */
63
  (0,h.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[c];return Tf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return Nf.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||u[0];return i&&(0,s.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control",label:a,describedBy:d?n?o?(0,h.sprintf)(// translators: %s: Currently selected font appearance.
64
  (0,h.__)("Currently selected font appearance: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font style.
65
  (0,h.__)("Currently selected font style: %s"),d.name):(0,h.sprintf)(// translators: %s: Currently selected font weight.
66
+ (0,h.__)("Currently selected font weight: %s"),d.name):(0,h.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}function Rf(e){let{value:t,onChange:n}=e;const o=function(e){return void 0!==e&&""!==e}(t),r=o?t:"";return(0,s.createElement)("div",{className:"block-editor-line-height-control"},(0,s.createElement)(p.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:t}=e;t!==va.ZERO||o||(e.preventDefault(),n("0"))},onChange:e=>{if(o)return void n(e);let t=e;switch(e){case"0.1":t=1.6;break;case"0":t=1.4}n(t)},label:(0,h.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:r,min:0}))}const Lf="typography.lineHeight";function Af(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Rf,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:qo(t)})}})}function Df(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("typography.lineHeight");return!(0,r.hasBlockSupport)(e,Lf)||t}const Of="typography.__experimentalFontStyle",Ff="typography.__experimentalFontWeight";function zf(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!Vf(e),i=!Hf(e),a=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,s.createElement)(Mf,{onChange:e=>{r({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:c}})}function Vf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Of),n=mo("typography.fontStyle");return!t||!n}function Hf(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,Ff),n=mo("typography.fontWeight");return!t||!n}function Uf(e){const t=Vf(e),n=Hf(e);return t&&n}function Gf(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=mo("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const a=[{value:"",label:(0,h.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,s.createElement)(p.SelectControl,i({label:(0,h.__)("Font family"),options:a,value:t,onChange:n,labelPosition:"top"},r))}const Wf="typography.__experimentalFontFamily";function $f(e,t,n){if(!(0,r.hasBlockSupport)(t,Wf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;if(null==n||!n.fontFamily)return e;const o=new(sp())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function jf(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=mo("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,s.createElement)(Gf,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function Kf(e){let{name:t}=e;const n=mo("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,Wf)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Wf)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",$f),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Wf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),$f(o,e,n)},e}));const qf=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Yf(e,t){return(0,u.find)(e,{size:t})||{size:t}}function Zf(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Xf=function(e){const t=mo("typography.fontSizes"),n=!mo("typography.customFontSize");return(0,s.createElement)(p.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Qf="typography.fontSize";function Jf(e,t,n){if(!(0,r.hasBlockSupport)(t,Qf))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(sp())(e.className);o.add(Zf(n.fontSize));const l=o.value;return e.className=l||void 0,e}function eh(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=mo("typography.fontSizes"),a=qf(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==a?void 0:a.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,s.createElement)(Xf,{onChange:e=>{const t=Yf(i,e).slug;l({style:qo({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function th(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=mo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,Qf)||!n}const nh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=mo("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,Qf)||(0,r.hasBlockSupport)(i,"typography.__experimentalSkipSerialization")||!a||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,s.createElement)(e,t);const d=qf(l,a,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,p)}),"withFontSizeInlineStyles");(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Qf)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Jf),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Qf))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Jf(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",nh);var oh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),rh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const lh=[{name:(0,h.__)("Underline"),value:"underline",icon:oh},{name:(0,h.__)("Strikethrough"),value:"line-through",icon:rh}];function ih(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,h.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},lh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const sh="typography.__experimentalTextDecoration";function ah(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(ih,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function ch(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,sh),n=mo("typography.textDecoration");return t||!n}var uh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),dh=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),ph=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const mh=[{name:(0,h.__)("Uppercase"),value:"uppercase",icon:uh},{name:(0,h.__)("Lowercase"),value:"lowercase",icon:dh},{name:(0,h.__)("Capitalize"),value:"capitalize",icon:ph}];function fh(e){let{value:t,onChange:n}=e;return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,h.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},mh.map((e=>(0,s.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const hh="typography.__experimentalTextTransform";function gh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(fh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function vh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,hh),n=mo("typography.textTransform");return t||!n}function bh(e){let{value:t,onChange:n,__unstableInputWidth:o="60px"}=e;const r=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:r,onChange:n})}const _h="typography.__experimentalLetterSpacing";function kh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(bh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:qo({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function yh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,_h),n=mo("typography.letterSpacing");return t||!n}const Eh="typography",Ch=[Lf,Qf,Of,Ff,Wf,sh,hh,_h];function Sh(e){const{clientId:t}=e,n=Kf(e),o=th(e),l=Uf(e),i=Df(e),a=ch(e),c=vh(e),u=yh(e),d=!Vf(e),m=!Hf(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Uf(e),th(e),Df(e),Kf(e),ch(e),vh(e),yh(e)];return t.filter(Boolean).length===t.length}(e),g=wh(e.name);if(f||!g)return null;const v=(0,r.getBlockSupport)(e.name,[Eh,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"typography"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,h.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,s.createElement)(jf,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,h.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:qo({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,s.createElement)(eh,e)),!l&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:Pf(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,s.createElement)(zf,e)),!i&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,h.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,s.createElement)(Af,e)),!a&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,h.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,s.createElement)(ah,e)),!c&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,h.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,s.createElement)(gh,e)),!u&&(0,s.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,h.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,s.createElement)(kh,e)))}const wh=e=>Ch.some((t=>(0,r.hasBlockSupport)(e,t)));function Bh(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.blockGap)}function Ih(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.blockGap");return!Bh(e)||t}function xh(e){var t;const{clientId:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Ba(n);return Ih(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:e=>{var t;const n={...o,spacing:{...null==o?void 0:o.spacing,blockGap:e}};r({style:qo(n)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;i.current&&l&&(null===(s=i.current.parentNode)||void 0===s||s.replaceChild(i.current,i.current))},units:l,value:null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap})),native:null})}function Th(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.margin)}function Nh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.margin"),n=!Hh(e,"margin");return!Th(e)||t||n}function Ph(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Vh(n,"margin"),a=i&&i.some((e=>Oh.includes(e)));return Nh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:qo(t)})},label:(0,h.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}function Mh(e){const t=(0,r.getBlockSupport)(e,Ah);return!!(!0===t||null!=t&&t.padding)}function Rh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!mo("spacing.padding"),n=!Hh(e,"padding");return!Mh(e)||t||n}function Lh(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"]}),i=Vh(n,"padding"),a=i&&i.some((e=>Oh.includes(e)));return Rh(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:qo(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:qo(t)})},label:(0,h.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}const Ah="spacing",Dh=["top","right","bottom","left"],Oh=["vertical","horizontal"];function Fh(e){const t=Ih(e),n=Rh(e),o=Nh(e),l=zh(e),i=(a=e.name,"web"===s.Platform.OS&&(Bh(a)||Mh(a)||Th(a)));var a;if(l||!i)return null;const c=(0,r.getBlockSupport)(e.name,[Ah,"__experimentalDefaultControls"]),u=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,s.createElement)(er,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:u("padding"),isShownByDefault:null==c?void 0:c.padding,panelId:e.clientId},(0,s.createElement)(Lh,e)),!o&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:qo({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:u("margin"),isShownByDefault:null==c?void 0:c.margin,panelId:e.clientId},(0,s.createElement)(Ph,e)),!t&&(0,s.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:u("blockGap"),isShownByDefault:null==c?void 0:c.blockGap,panelId:e.clientId},(0,s.createElement)(xh,e)))}const zh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ih(e),n=Rh(e),o=Nh(e);return t&&n&&o};function Vh(e,t){const n=(0,r.getBlockSupport)(e,Ah);if(n&&"boolean"!=typeof n[t])return n[t]}function Hh(e,t){const n=Vh(e,t);return!(n&&n.some((e=>Dh.includes(e)))&&n.some((e=>Oh.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const Uh=[...Ch,Xm,yf,Ah],Gh=e=>Uh.some((t=>(0,r.hasBlockSupport)(e,t))),Wh="var:";function $h(e){return(0,u.startsWith)(e,Wh)?`var(--wp--${e.slice(Wh.length).split("|").join("--")})`:e}function jh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["spacing.blockGap"],n={};return Object.keys(r.__EXPERIMENTAL_STYLE_PROPERTY).forEach((o=>{const l=r.__EXPERIMENTAL_STYLE_PROPERTY[o].value,i=r.__EXPERIMENTAL_STYLE_PROPERTY[o].properties;if((0,u.has)(e,l)&&"elements"!==(0,u.first)(l)){const r=(0,u.get)(e,l);i&&!(0,u.isString)(r)?Object.entries(i).forEach((e=>{const[t,o]=e,l=(0,u.get)(r,[o]);l&&(n[t]=$h(l))})):t.includes(l.join("."))||(n[o]=$h((0,u.get)(e,l)))}})),n}const Kh={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[yf],"typography.__experimentalSkipSerialization":[Eh],[`${Ah}.__experimentalSkipSerialization`]:["spacing"]},qh={...Kh,[`${Ah}`]:["spacing.blockGap"]};function Yh(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:qh;if(!Gh(t))return e;let{style:l}=n;return(0,u.forEach)(o,((e,n)=>{(0,r.getBlockSupport)(t,n)&&(l=(0,u.omit)(l,e))})),e.style={...jh(l),...e.style},e}const Zh=(0,d.createHigherOrderComponent)((e=>t=>{const n=Wn();return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(If,t),(0,s.createElement)(Sh,t),(0,s.createElement)(Qm,t),(0,s.createElement)(Fh,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),Xh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,a=`wp-elements-${(0,d.useInstanceId)(e)}`,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const o=jh(t);return(0,u.isEmpty)(o)?"":[`.${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(a,null===(o=t.attributes.style)||void 0===o?void 0:o.elements),m=(0,s.useContext)(mm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,l&&m&&(0,s.createPortal)((0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:p}}),m),(0,s.createElement)(e,i({},t,{className:l?c()(t.className,a):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Gh(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Yh),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Gh(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Yh(o,e,n,Kh)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",Zh),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Xh);var Qh=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}=e;return(0,s.createElement)(p.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,h.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:(0,h.__)("Apply duotone filter"),icon:(0,s.createElement)(p.DuotoneSwatch,{values:l})})},renderContent:()=>(0,s.createElement)(p.MenuGroup,{label:(0,h.__)("Duotone")},(0,s.createElement)("div",{className:"block-editor-duotone-control__description"},(0,h.__)("Create a two-tone color effect without losing your original image.")),(0,s.createElement)(p.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}))})};const Jh=[];function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Rc(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function tg(e){let{selector:t,id:n,values:o}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:n},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"})))),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:r}}))}function ng(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=mo("color.duotone")||Jh,a=mo("color.palette")||Jh,c=!mo("color.custom"),u=!mo("color.customDuotone")||0===(null==a?void 0:a.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,s.createElement)(Yn,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Qh,{duotonePalette:i,colorPalette:a,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Ac([Dc]);const og=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(ng,t))}),"withDuotoneControls"),rg=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const a=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!a||!u)return(0,s.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,a),f=c()(null==t?void 0:t.className,p),h=(0,s.useContext)(mm.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,h&&(0,s.createPortal)((0,s.createElement)(tg,{selector:m,id:p,values:eg(u)}),h),(0,s.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",og),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",rg);const lg="__experimentalLayout";function ig(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=mo("layout"),a=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,lg,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:g}=c;if(!d)return null;const v=l||g||{},{inherit:b=!1,type:_="default"}=v;if("default"===_&&!a)return null;const k=Io(_),y=e=>t({layout:e});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(er,null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Layout")},f&&!!i&&(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Inherit default layout"),checked:!!b,onChange:()=>t({layout:{inherit:!b}})}),!b&&u&&(0,s.createElement)(sg,{type:_,onChange:e=>t({layout:{type:e}})}),!b&&k&&(0,s.createElement)(k.inspectorControls,{layout:v,onChange:y,layoutBlockSupport:c}))),!b&&k&&(0,s.createElement)(k.toolBarControls,{layout:v,onChange:y,layoutBlockSupport:c}))}function sg(e){let{type:t,onChange:n}=e;return(0,s.createElement)(p.ButtonGroup,null,Bo.map((e=>{let{name:o,label:r}=e;return(0,s.createElement)(p.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const ag=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,lg)&&(0,s.createElement)(ig,i({key:"layout"},t)),(0,s.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),cg=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,lg),a=(0,d.useInstanceId)(e),u=mo("layout")||{},p=(0,s.useContext)(mm.__unstableElementContext),{layout:m}=o,{default:f}=(0,r.getBlockSupport)(n,lg)||{},h=null!=m&&m.inherit?u:m||f||{},g=c()(null==t?void 0:t.className,{[`wp-container-${a}`]:l});return(0,s.createElement)(s.Fragment,null,l&&p&&(0,s.createPortal)((0,s.createElement)(Mo,{selector:`.wp-container-${a}`,layout:h,style:null==o?void 0:o.style}),p),(0,s.createElement)(e,i({},t,{className:g})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,lg)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",cg),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",ag);const ug=[];function dg(e){var t;let{borderColor:n,style:o}=e;const r=(null==o?void 0:o.border)||{},l=wm("border-color",n);return{className:c()({[l]:!!l,"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color)})||void 0,style:jh({border:r})}}function pg(e){const t=mo("color.palette")||ug,n=dg(e);if(e.borderColor){const o=Cm(t,e.borderColor);n.style.borderColor=o.color}return n}function mg(e){var t,n,o,r,l,i;const{backgroundColor:s,textColor:a,gradient:u,style:d}=e,p=wm("background-color",s),m=wm("color",a),f=of(u),h=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!h&&!!p,"has-text-color":a||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":s||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:jh({color:(null==d?void 0:d.color)||{}})}}const fg={};function hg(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=mo("color.palette.custom")||[],l=mo("color.palette.theme")||[],i=mo("color.palette.default")||[],a=mo("color.gradients")||fg,c=(0,s.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),u=(0,s.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),d=mg(e);if(t){const e=Cm(c,t);d.style.backgroundColor=e.color}if(o&&(d.style.background=rf(u,o)),n){const e=Cm(c,n);d.style.color=e.color}return d}function gg(e){const{style:t}=e;return{style:jh({spacing:(null==t?void 0:t.spacing)||{}})}}function vg(e){const[t,n]=(0,s.useState)(e);return(0,s.useEffect)((()=>{e&&n(e)}),[e]),t}const bg=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),_g=()=>(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("color.palette.custom"),o=mo("color.palette.theme"),r=mo("color.palette.default"),l=(0,s.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,s.createElement)(e,i({},t,{colors:l}))}),"withEditorColorPalette");function kg(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Rc(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=(0,u.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=Sm(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=Cm(r,o[l],o[`custom${(0,u.upperFirst)(l)}`]),s=t[l];return(null==s?void 0:s.color)===i.color&&s?e[l]=s:e[l]={...i,class:wm(n,i.slug)},e}),{})}render(){return(0,s.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function yg(e){return function(){const t=bg(e);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(0,d.createHigherOrderComponent)(kg(o,t),"withCustomColors")}}function Eg(){const e=_g();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,d.createHigherOrderComponent)(kg(n,e),"withColors")}const Cg=[];var Sg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const o=(0,u.reduce)(t,((e,t)=>(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("typography.fontSizes")||Cg;return(0,s.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends s.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=qf(r,l,n[t]);return e[o]={...i,class:Zf(l)},e}),{});return{...t,...i}}render(){return(0,s.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},wg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),Bg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),Ig=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const xg=[{icon:wg,title:(0,h.__)("Align text left"),align:"left"},{icon:Bg,title:(0,h.__)("Align text center"),align:"center"},{icon:Ig,title:(0,h.__)("Align text right"),align:"right"}],Tg={position:"bottom right",isAlternate:!0};var Ng=function(e){let{value:t,onChange:n,alignmentControls:o=xg,label:r=(0,h.__)("Align"),describedBy:l=(0,h.__)("Change text alignment"),isCollapsed:a=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const m=(0,u.find)(o,(e=>e.align===t)),f=c?p.ToolbarGroup:p.ToolbarDropdownMenu,g=c?{isCollapsed:a}:{};return(0,s.createElement)(f,i({icon:m?m.icon:(0,h.isRTL)()?Ig:wg,label:r,toggleProps:{describedBy:l},popoverProps:Tg,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:a?"menuitemradio":void 0,onClick:d(n)}}))},g))};function Pg(e){return(0,s.createElement)(Ng,i({},e,{isToolbar:!1}))}function Mg(e){return(0,s.createElement)(Ng,i({},e,{isToolbar:!0}))}var Rg={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(zn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=Bu(t,u.noop),i=(0,s.useMemo)((()=>(e.trim()?Zu(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]);return[(0,s.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ua,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}};const Lg=[];function Ag(e){let{completers:t=Lg}=e;const{name:n}=Gn();return(0,s.useMemo)((()=>{let e=t;return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([Rg])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Dg=function(e){return(0,s.createElement)(p.Autocomplete,i({},e,{completers:Ag(e)}))},Og=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"})),Fg=function(e){let{isActive:t,label:n=(0,h.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,s.createElement)(p.ToolbarButton,{isActive:t,icon:Og,label:n,onClick:()=>o(!t),disabled:r})},zg=function(e){const{label:t=(0,h.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",a=`${i}__popover`;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:i,popoverProps:{className:a,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,s.createElement)(p.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==va.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,s.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},Vg=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),Hg=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,m.useDispatch)(zn),{clientId:r,parents:l,hasSelection:i}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(zn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),a=t||(0,h.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,h.__)("Block breadcrumb")},(0,s.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},a),!i&&a,!!r&&(0,s.createElement)(wo,{icon:Vg,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,s.createElement)(Ad,{clientId:e})),(0,s.createElement)(wo,{icon:Vg,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(Ad,{clientId:r})))};function Ug(e){let{clientId:t,tagName:n="div",wrapperProps:o,className:r}=e;const[l,a]=(0,s.useState)(!0),[u,d]=(0,s.useState)(!1),{isParentSelected:p,hasChildSelected:f,isDraggingBlocks:h,isParentHighlighted:g}=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=e(zn);return{isParentSelected:n(t),hasChildSelected:o(t,!0),isDraggingBlocks:r(),isParentHighlighted:l(t)}}),[t]),v=c()("block-editor-block-content-overlay",null==o?void 0:o.className,r,{"overlay-active":l,"parent-highlighted":g,"is-dragging-blocks":h});return(0,s.useEffect)((()=>{p||f||l||a(!0),p&&!u&&l&&a(!1),f&&l&&a(!1)}),[p,f,l,u]),(0,s.createElement)(n,i({},o,{className:v,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseUp:l?()=>a(!1):void 0}),null==o?void 0:o.children)}const Gg=()=>(0,s.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),Wg=e=>{let{style:t,className:n}=e;return(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,s.createElement)(Gg,null)))},$g=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,h.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==va.DOWN||(e.preventDefault(),o())},icon:(0,s.createElement)(n,null,(0,s.createElement)(t,null,(0,s.createElement)(Wg,null)))}))}};var jg=e=>{let{children:t,...n}=e;return(0,s.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:$g(n),renderContent:()=>t})},Kg=(0,s.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(O.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const qg=na(p.__experimentalTreeGridRow);function Yg(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:a,path:u,...d}=e;const p=la({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,s.createElement)(qg,i({ref:p,className:c()("block-editor-list-view-leaf",a),level:o,positionInSet:n,setSize:r},d),l)}function Zg(e){let{onClick:t}=e;return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)(wo,{icon:Vg}))}var Xg=(0,s.forwardRef)((function e(t,n){let{className:o,block:{clientId:r},isSelected:l,onClick:i,onToggleExpanded:a,position:u,siblingBlockCount:m,level:f,tabIndex:g,onFocus:v,onDragStart:b,onDragEnd:_,draggable:k}=t;const y=Ld(r),E=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,C=((e,t,n)=>(0,h.sprintf)(
67
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
68
+ (0,h.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(u,m,f);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{className:c()("block-editor-list-view-block-select-button",o),onClick:i,onKeyDown:function(e){e.keyCode!==va.ENTER&&e.keyCode!==va.SPACE||(e.preventDefault(),i(e))},"aria-describedby":E,ref:n,tabIndex:g,onFocus:v,onDragStart:e=>{e.dataTransfer.clearData(),b(e)},onDragEnd:_,draggable:k,href:`#block-${r}`},(0,s.createElement)(Zg,{onClick:a}),(0,s.createElement)(Ua,{icon:null==y?void 0:y.icon,showColors:!0}),(0,s.createElement)(Ad,{clientId:r}),(null==y?void 0:y.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},y.anchor),l&&(0,s.createElement)(p.VisuallyHidden,null,(0,h.__)("(selected block)"))),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:E},C))})),Qg=(0,s.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:a,siblingBlockCount:u,level:d,...p}=e;const{clientId:f}=r,{blockMovingClientId:h,selectedBlockInBlockEditor:g}=(0,m.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(zn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),v=h&&g===f,b=c()("block-editor-list-view-block-contents",{"is-dropping-before":v});return(0,s.createElement)(Dd,{clientIds:[r.clientId]},(e=>{let{draggable:c,onDragStart:m,onDragEnd:f}=e;return(0,s.createElement)(Xg,i({ref:t,className:b,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:a,siblingBlockCount:u,level:d,draggable:c,onDragStart:m,onDragEnd:f},p))}))}));const Jg=(0,s.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),ev=()=>(0,s.useContext)(Jg);var tv=(0,s.memo)((function(e){let{block:t,isDragged:n,isSelected:o,isBranchSelected:r,selectBlock:l,position:i,level:a,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:g}=e;const v=(0,s.useRef)(null),[b,_]=(0,s.useState)(!1),{clientId:k}=t,{toggleBlockHighlight:y}=(0,m.useDispatch)(zn),{__experimentalFeatures:E,__experimentalPersistentListViewFeatures:C,__experimentalHideContainerBlockActions:S,isTreeGridMounted:w,expand:B,collapse:I}=ev(),x=f&&d>0,T=c()("block-editor-list-view-block__mover-cell",{"is-visible":b||o}),N=c()("block-editor-list-view-block__menu-cell",{"is-visible":b||o});(0,s.useEffect)((()=>{C&&!w&&o&&v.current.focus()}),[]);const P=C?y:()=>{},M=(0,s.useCallback)((()=>{_(!0),P(k,!0)}),[k,_,P]),R=(0,s.useCallback)((()=>{_(!1),P(k,!1)}),[k,_,P]),L=(0,s.useCallback)((e=>{e.stopPropagation(),l(k)}),[k,l]),A=(0,s.useCallback)((e=>{e.stopPropagation(),!0===g?I(k):!1===g&&B(k)}),[k,B,I,g]),D=E&&(!S||S&&a>1),O=E&&!D;let F;x?F=2:O&&(F=3);const z=c()({"is-selected":o,"is-branch-selected":C&&r,"is-dragging":n,"has-single-cell":O});return(0,s.createElement)(Yg,{className:z,onMouseEnter:M,onMouseLeave:R,onFocus:M,onBlur:R,level:a,position:i,rowCount:u,path:h,id:`list-view-block-${k}`,"data-block":k,isExpanded:g},(0,s.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:F,ref:v},(e=>{let{ref:n,tabIndex:r,onFocus:l}=e;return(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(Qg,{block:t,onClick:L,onToggleExpanded:A,isSelected:o,position:i,siblingBlockCount:d,level:a,ref:n,tabIndex:r,onFocus:l}))})),x&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.__experimentalTreeGridCell,{className:T,withoutGridItem:!0},(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(Kd,{orientation:"vertical",clientIds:[k],ref:t,tabIndex:n,onFocus:o})})),(0,s.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(qd,{orientation:"vertical",clientIds:[k],ref:t,tabIndex:n,onFocus:o})})))),D&&(0,s.createElement)(p.__experimentalTreeGridCell,{className:N},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,s.createElement)(zp,{clientIds:[k],icon:yp,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:L})})))}));function nv(e,t,n){var o;return(null==n?void 0:n.includes(e.clientId))?0:null===(o=t[e.clientId])||void 0===o||o?1+e.innerBlocks.reduce(ov(t,n),0):1}const ov=(e,t)=>(n,o)=>{var r;return(null==t?void 0:t.includes(o.clientId))?n:(null===(r=e[o.clientId])||void 0===r||r)&&o.innerBlocks.length>0?n+nv(o,e,t):n+1};function rv(e){const{blocks:t,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,selectedClientIds:l,level:i=1,path:a="",isBranchSelected:c=!1,listPosition:d=0,fixedListWindow:p}=e,{expandedState:f,draggedClientIds:h,__experimentalPersistentListViewFeatures:g}=ev(),v=(0,u.compact)(t),b=v.length;let _=d;return(0,s.createElement)(s.Fragment,null,v.map(((e,t)=>{var d;const{clientId:k,innerBlocks:y}=e;t>0&&(_+=nv(v[t-1],f,h));const E=g,{itemInView:C}=p,S=!E||C(_),w=t+1,B=a.length>0?`${a}_${w}`:`${w}`,I=r&&!!y&&!!y.length,x=I?null===(d=f[k])||void 0===d||d:void 0,T=!(null==h||!h.includes(k)),N=T||S,P=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(k,l),M=c||P&&I;return(0,s.createElement)(m.AsyncModeProvider,{key:k,value:!P},N&&(0,s.createElement)(tv,{block:e,selectBlock:n,isSelected:P,isBranchSelected:M,isDragged:T,level:i,position:w,rowCount:b,siblingBlockCount:b,showBlockMovers:o,path:B,isExpanded:x,listPosition:_}),!N&&(0,s.createElement)("tr",null,(0,s.createElement)("td",{className:"block-editor-list-view-placeholder"})),I&&x&&!T&&(0,s.createElement)(rv,{blocks:y,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,level:i+1,path:B,listPosition:_+1,fixedListWindow:p,isBranchSelected:M,selectedClientIds:l}))})))}rv.defaultProps={selectBlock:()=>{}};var lv=(0,s.memo)(rv);function iv(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,a]=(0,s.useMemo)((()=>t.current?[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]:[]),[o,r]),c=a||i,u=(0,s.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,s.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,s.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===l?{...o,top:t.top,bottom:t.top}:"bottom"===l||"inside"===l?{...o,top:t.bottom,bottom:t.bottom}:{}}),[c,l,u]);return c?(0,s.createElement)(p.Popover,{noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function sv(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const av=["top","bottom"];const cv=()=>{},uv=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};var dv=(0,s.forwardRef)((function(e,t){let{blocks:n,onSelect:o=cv,__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,showNestedBlocks:c,showBlockMovers:u,...f}=e;const{clientIdsTree:g,draggedClientIds:v,selectedClientIds:b}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(zn);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(n),{selectBlock:_}=(0,m.useDispatch)(zn),{visibleBlockCount:k}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(zn),o=(null==v?void 0:v.length)>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),y=(0,s.useCallback)((e=>{_(e),o(e)}),[_,o]),[E,C]=(0,s.useReducer)(uv,{}),{ref:S,target:w}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,m.useSelect)(zn),[l,i]=(0,s.useState)(),{rootClientId:a,blockIndex:c}=l||{},u=em(a,c),p=o(),f=(0,d.useThrottle)((0,s.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==p||!p.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const s=i.element.getBoundingClientRect(),[a,c]=nm(t,s,av),u=sv(t,s);if(void 0===r||a<r||u){r=a;const t=e.indexOf(i),d=e[t-1];if("top"===c&&d&&d.rootClientId===i.rootClientId&&!d.isDraggedBlock?(o=d,n="bottom",l=d.element.getBoundingClientRect()):(o=i,n=c,l=s),u)break}}if(!o)return;const i="bottom"===n;if(i&&o.canInsertDraggedBlocksAsChild&&(o.innerBlockCount>0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const s=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+s,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l),element:o,isDraggedBlock:!!a&&p.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(p,i),canInsertDraggedBlocksAsChild:!a||r(p,l)}})),s);c&&i(c)}),[p]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}(),B=(0,s.useRef)(),I=(0,d.useMergeRefs)([B,S,t]),x=(0,s.useRef)(!1);(0,s.useEffect)((()=>{x.current=!0}),[]);const[T]=(0,d.__experimentalUseFixedWindowList)(B,36,k,{useWindowing:l,windowOverscan:40}),N=(0,s.useCallback)((e=>{e&&C({type:"expand",clientId:e})}),[C]),P=(0,s.useCallback)((e=>{e&&C({type:"collapse",clientId:e})}),[C]),M=(0,s.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),R=(0,s.useCallback)((e=>{var t;P(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[P]),L=(0,s.useMemo)((()=>({__experimentalFeatures:r,__experimentalPersistentListViewFeatures:l,__experimentalHideContainerBlockActions:a,isTreeGridMounted:x.current,draggedClientIds:v,expandedState:E,expand:N,collapse:P})),[r,l,a,x.current,v,E,N,P]);return(0,s.createElement)(m.AsyncModeProvider,{value:!0},(0,s.createElement)(iv,{listViewRef:B,blockDropTarget:w}),(0,s.createElement)(p.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,h.__)("Block navigation structure"),ref:I,onCollapseRow:R,onExpandRow:M},(0,s.createElement)(Jg.Provider,{value:L},(0,s.createElement)(lv,i({blocks:g,selectBlock:y,showNestedBlocks:c,showBlockMovers:u,fixedListWindow:T,selectedClientIds:b},f)))))}));function pv(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,s.createElement)(p.Button,i({},l,{ref:r,icon:Kg,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0
69
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var mv=(0,s.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:o,...r}=e;const l=(0,m.useSelect)((e=>!!e(zn).getBlockCount()),[])&&!n;return(0,s.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,s.createElement)(pv,i({},r,{innerRef:t,isOpen:n,onToggle:o,isEnabled:l}))},renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,h.__)("List view")),(0,s.createElement)(dv,{showNestedBlocks:!0,__experimentalFeatures:o}))})}));function fv(e){let{genericPreviewBlock:t,style:n,className:o,activeStyle:r}=e;const l=ap(o,r,n),i=(0,s.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:l+" block-editor-block-styles__block-preview-container"}})),[t,l]);return(0,s.createElement)(fu,{item:i,isStylePreview:!0})}function hv(e){let{children:t,scope:n,...o}=e;return(0,s.createElement)(p.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,s.createElement)("div",o,t))}function gv(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:o=u.noop,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:a,genericPreviewBlock:m,className:f}=up({clientId:t,onSwitch:n}),[h,g]=(0,s.useState)(null),[v,b]=(0,s.useState)(0),_=(0,d.useViewportMatch)("medium","<");if((0,s.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[h]),!i||0===i.length)return null;const k=(0,u.debounce)(g,250),y=e=>{l(e),o(null),g(null),k.cancel()},E=e=>{var t;h!==e?(k(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):k.cancel()};return(0,s.createElement)("div",{className:"block-editor-block-styles"},(0,s.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,s.createElement)(p.Button,{className:c()("block-editor-block-styles__item",{"is-active":a.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{va.ENTER!==t.keyCode&&va.SPACE!==t.keyCode||(t.preventDefault(),y(e))},onClick:()=>y(e),role:"button",tabIndex:"0"},(0,s.createElement)(p.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},t))}))),h&&!_&&(0,s.createElement)(hv,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>E(null)},(0,s.createElement)(fv,{activeStyle:a,className:f,genericPreviewBlock:m,style:h})))}gv.Slot=function(e){let{scope:t}=e;return(0,s.createElement)(p.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var vv=gv,bv=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),_v=function(e){let{icon:t=bv,label:n=(0,h.__)("Choose variation"),instructions:o=(0,h.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const a=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,s.createElement)(p.Placeholder,{icon:t,label:n,instructions:o,className:a},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,h.__)("Block variations")},r.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(p.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,s.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(p.Button,{variant:"link",onClick:()=>l()},(0,h.__)("Skip"))))},kv=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{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-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const yv="carousel",Ev="grid",Cv=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(p.Button,{onClick:t},(0,h.__)("Start blank")),(0,s.createElement)(p.Button,{variant:"primary",onClick:n},(0,h.__)("Choose")))},Sv=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(p.Button,{icon:Hd,label:(0,h.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,s.createElement)(p.Button,{icon:Vd,label:(0,h.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var wv=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:a,onStartBlank:c}=e;const u=t===yv,d=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(p.Button,{icon:to,label:(0,h.__)("Carousel view"),onClick:()=>n(yv),isPressed:u}),(0,s.createElement)(p.Button,{icon:kv,label:(0,h.__)("Grid view"),onClick:()=>n(Ev),isPressed:t===Ev}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,s.createElement)(Sv,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),d,u&&(0,s.createElement)(Cv,{onBlockPatternSelect:a,onStartBlank:c}))};const Bv=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r}=e;const l=(0,p.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===yv){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,s.createElement)("div",{className:a},(0,s.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,s.createElement)(xv,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,s.createElement)(p.__unstableComposite,i({},l,{role:"listbox",className:a,"aria-label":(0,h.__)("Patterns list")}),o.map((e=>(0,s.createElement)(Iv,{key:e.name,pattern:e,onSelect:r,composite:l}))))};function Iv(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,title:a,description:c,viewportWidth:u=700}=t,m=(0,d.useInstanceId)(Iv,`${r}__item-description`);return(0,s.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?m:void 0},(0,s.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,s.createElement)(pu,{blocks:l,viewportWidth:u}),(0,s.createElement)("div",{className:`${r}__item-title`},a)),!!c&&(0,s.createElement)(p.VisuallyHidden,{id:m},c))}function xv(e){let{className:t,pattern:n}=e;const{blocks:o,title:r,description:l}=n,i=(0,d.useInstanceId)(xv,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":r,"aria-describedby":l?i:void 0},(0,s.createElement)(pu,{blocks:o,__experimentalLive:!0}),!!l&&(0,s.createElement)(p.VisuallyHidden,{id:i},l))}var Tv=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,startBlankComponent:l,onBlockPatternSelect:i}=e;const[a,c]=(0,s.useState)(yv),[u,d]=(0,s.useState)(0),[p,f]=(0,s.useState)(!1),{replaceBlock:h}=(0,m.useDispatch)(zn),g=function(e,t,n){return(0,m.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(zn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(t,n,o);if(null==g||!g.length||p)return l;const v=i||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));h(t,n)});return(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${a}`},(0,s.createElement)(wv,{viewMode:a,setViewMode:c,activeSlide:u,totalSlides:g.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{v(g[u].blocks)},onStartBlank:()=>{f(!0)}}),(0,s.createElement)(Bv,{viewMode:a,activeSlide:u,patterns:g,onBlockPatternSelect:v}))};const Nv=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};var Pv=function(e){let{blockClientId:t}=e;const[n,o]=(0,s.useState)(),{updateBlockAttributes:l}=(0,m.useDispatch)(zn),{variations:i,blockAttributes:a}=(0,m.useSelect)((e=>{const{getBlockVariations:n}=e(r.store),{getBlockName:o,getBlockAttributes:l}=e(zn),i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:l(t)}}),[t]);if((0,s.useEffect)((()=>{var e;o(null===(e=Nv(a,i))||void 0===e?void 0:e.name)}),[a,i]),null==i||!i.length)return null;const c=i.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}})),u=e=>{l(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},d="block-editor-block-variation-transforms";return(0,s.createElement)(p.DropdownMenu,{className:d,label:(0,h.__)("Transform to variation"),text:(0,h.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${d}__popover`},icon:Gd,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${d}__container`},(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItemsChoice,{choices:c,value:n,onSelect:u})))))};const Mv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Rv=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Lv={top:{icon:(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Rv,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Mv,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},Av=["top","center","bottom"],Dv={isAlternate:!0};var Ov=function(e){let{value:t,onChange:n,controls:o=Av,isCollapsed:r=!0,isToolbar:l}=e;const a=Lv[t],c=Lv.top,u=l?p.ToolbarGroup:p.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{};return(0,s.createElement)(u,i({popoverProps:Dv,icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...Lv[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};function Fv(e){return(0,s.createElement)(Ov,i({},e,{isToolbar:!1}))}function zv(e){return(0,s.createElement)(Ov,i({},e,{isToolbar:!0}))}var Vv=(0,d.createHigherOrderComponent)((e=>t=>{const n=mo("color.palette"),o=!mo("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,a=!(0,u.isEmpty)(r)||!l;return(0,s.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:a}))}),"withColorContext"),Hv=Vv(p.ColorPalette);function Uv(e){let{onChange:t,value:n,...o}=e;return(0,s.createElement)(_m,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Gv=function(e,t){return(Gv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Wv=function(){return(Wv=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function $v(e,t,n,o){void 0===o&&(o=0);var r=nb(e,t,o),l=r.width,i=r.height;return e>=t*n&&l>t*n?{width:t*n,height:t}:l>t*n?{width:e,height:e/n}:l>i*n?{width:i*n,height:i}:{width:l,height:l/n}}function jv(e,t,n,o,r){void 0===r&&(r=0);var l=nb(t.width,t.height,r),i=l.width,s=l.height;return{x:Kv(e.x,i,n.width,o),y:Kv(e.y,s,n.height,o)}}function Kv(e,t,n,o){var r=t*o/2-n/2;return Math.min(r,Math.max(e,-r))}function qv(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Yv(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Zv(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var s=i&&0===l?Xv:Qv,a={x:s(100,((t.width-n.width/r)/2-e.x/r)/t.width*100),y:s(100,((t.height-n.height/r)/2-e.y/r)/t.height*100),width:s(100,n.width/t.width*100/r),height:s(100,n.height/t.height*100/r)},c=Math.round(s(t.naturalWidth,a.width*t.naturalWidth/100)),u=Math.round(s(t.naturalHeight,a.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*o?{width:Math.round(u*o),height:u}:{width:c,height:Math.round(c/o)};return{croppedAreaPercentages:a,croppedAreaPixels:Wv(Wv({},d),{x:Math.round(s(t.naturalWidth-d.width,a.x*t.naturalWidth/100)),y:Math.round(s(t.naturalHeight-d.height,a.y*t.naturalHeight/100))})}}function Xv(e,t){return Math.min(e,Math.max(0,t))}function Qv(e,t){return t}function Jv(e,t,n){var o=t.width/t.naturalWidth,r=function(e,t,n){var o=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/o/e.height:n.width/o/e.width;var r=e.width/e.height;return t.naturalWidth>=t.naturalHeight*r?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),l=o*r;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*l,y:((t.naturalHeight-e.height)/2-e.y)*l},zoom:r}}function eb(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function tb(e,t,n,o,r){var l=Math.cos,i=Math.sin,s=r*Math.PI/180;return[(e-n)*l(s)-(t-o)*i(s)+n,(e-n)*i(s)+(t-o)*l(s)+o]}function nb(e,t,n){var o=e/2,r=t/2,l=[tb(0,0,o,r,n),tb(e,0,o,r,n),tb(e,t,o,r,n),tb(0,t,o,r,n)],i=Math.min.apply(Math,l.map((function(e){return e[0]}))),s=Math.max.apply(Math,l.map((function(e){return e[0]}))),a=Math.min.apply(Math,l.map((function(e){return e[1]})));return{width:s-i,height:Math.max.apply(Math,l.map((function(e){return e[1]})))-a}}function ob(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var rb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,o=e.cropSize;if(t){var r=Jv(t,n.mediaSize,o),l=r.crop,i=r.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,o,r,l=n.imageRef||n.videoRef;if(l){n.mediaSize={width:l.offsetWidth,height:l.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(o=n.imageRef)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef)||void 0===r?void 0:r.videoHeight)||0};var i=n.props.cropSize?n.props.cropSize:$v(l.offsetWidth,l.offsetHeight,n.props.aspect,n.props.rotation);n.setState({cropSize:i},n.recomputeCropPosition)}n.containerRef&&(n.containerRect=n.containerRef.getBoundingClientRect())},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){e.preventDefault(),document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Wv({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?jv(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var o=t.getMousePoint(e),r=n.props.zoom-e.deltaY*n.props.zoomSpeed/200;n.setNewZoom(r,o),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var o=n.getPointOnContainer(t),r=n.getPointOnMedia(o),l=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:r.x*l-o.x,y:r.y*l-o.y},s=n.props.restrictPosition?jv(i,n.mediaSize,n.state.cropSize,l,n.props.rotation):i;n.props.onCropChange(s),n.props.onZoomChange(l)}},n.emitCropData=function(){if(n.state.cropSize){var e=Zv(n.props.restrictPosition?jv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition),t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?jv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function __(){this.constructor=e}Gv(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&this.styleRef.remove(),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():e.cropSize!==this.props.cropSize&&this.computeSizes(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=qv(n,o),this.lastPinchRotation=Yv(n,o),this.onDragStart(eb(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=eb(o,r);this.onDrag(l),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=qv(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l),n.lastPinchDistance=e;var i=Yv(o,r),s=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.crop,i=l.x,s=l.y,a=t.rotation,c=t.zoom,u=t.cropShape,d=t.showGrid,p=t.style,m=p.containerStyle,f=p.cropAreaStyle,h=p.mediaStyle,g=t.classes,v=g.containerClassName,b=g.cropAreaClassName,_=g.mediaClassName;return Gr().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:m,className:ob("reactEasyCrop_Container",v)},n?Gr().createElement("img",Wv({alt:"",className:ob("reactEasyCrop_Image",_)},r,{src:n,ref:function(t){return e.imageRef=t},style:Wv(Wv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),onLoad:this.onMediaLoad})):o&&Gr().createElement("video",Wv({autoPlay:!0,loop:!0,muted:!0,className:ob("reactEasyCrop_Video",_)},r,{src:o,ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Wv(Wv({},h),{transform:"translate("+i+"px, "+s+"px) rotate("+a+"deg) scale("+c+")"}),controls:!1})),this.state.cropSize&&Gr().createElement("div",{style:Wv(Wv({},f),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:ob("reactEasyCrop_CropArea","round"===u&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",b)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Gr().Component);const lb={position:"bottom right",isAlternate:!0};var ib=window.wp.apiFetch,sb=n.n(ib);const ab=(0,s.createContext)({}),cb=()=>(0,s.useContext)(ab);function ub(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:i,onFinishEditing:a,onSaveImage:c,children:u}=e;const d=function(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,s.useState)(),[a,c]=(0,s.useState)(),[u,d]=(0,s.useState)({x:0,y:0}),[p,m]=(0,s.useState)(),[f,h]=(0,s.useState)(),[g,v]=(0,s.useState)(),[b,_]=(0,s.useState)(),k=(0,s.useCallback)((()=>{d({x:0,y:0}),m(100),h(0),v(n/o),_(n/o)}),[n,o,d,m,h,v,_]),y=(0,s.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),h(e),v(1/g),void d({x:-u.y*r,y:u.x*r});const s=new window.Image;s.src=t,s.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const s=n.getContext("2d");s.translate(o,l),s.rotate(e*Math.PI/180),s.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),h(e),v(1/g),d({x:-u.y*r,y:u.x*r})}))};const a=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof a&&(s.crossOrigin=a)}),[f,n,o,i,h,v,d]);return(0,s.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:a,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:h,rotateClockwise:y,aspect:g,setAspect:v,defaultAspect:b,initializeTransformValues:k})),[r,i,a,c,u,d,p,m,f,h,y,g,v,b,k])}(e),{initializeTransformValues:o}=n;return(0,s.useEffect)((()=>{t&&o()}),[t,o]),n}({url:n,naturalWidth:o,naturalHeight:r},i),p=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:a,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,m.useDispatch)(Pu.store),[p,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,s.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,sb()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,h.sprintf)(
70
  /* translators: 1. Error message */
71
+ (0,h.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,s.useMemo)((()=>({isInProgress:p,apply:v,cancel:g})),[p,v,g])}({id:t,url:n,onSaveImage:c,onFinishEditing:a,...d}),f=(0,s.useMemo)((()=>({...d,...p})),[d,p]);return(0,s.createElement)(ab.Provider,{value:f},u)}function db(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;const{isInProgress:a,editedUrl:u,position:d,zoom:m,aspect:f,setPosition:h,setCrop:g,setZoom:v,rotation:b}=cb();let _=o||r*l/i;return b%180==90&&(_=r*i/l),(0,s.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":a}),style:{width:n||r,height:_}},(0,s.createElement)(rb,{image:u||t,disabled:a,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:f,onCropChange:h,onCropComplete:e=>{g(e)},onZoomChange:e=>{v(100*e)}}),a&&(0,s.createElement)(p.Spinner,null))}var pb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function mb(){const{isInProgress:e,zoom:t,setZoom:n}=cb();return(0,s.createElement)(p.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:lb,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,s.createElement)(p.ToolbarButton,{icon:pb,label:(0,h.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,s.createElement)(p.RangeControl,{label:(0,h.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var fb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{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"}));function hb(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,s.createElement)(p.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,s.createElement)(p.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?lp:void 0},t)})))}function gb(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=cb();return(0,s.createElement)(p.DropdownMenu,{icon:fb,label:(0,h.__)("Aspect Ratio"),popoverProps:lb,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(hb,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("Original"),aspect:l},{title:(0,h.__)("Square"),aspect:1}]}),(0,s.createElement)(hb,{label:(0,h.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("16:10"),aspect:1.6},{title:(0,h.__)("16:9"),aspect:16/9},{title:(0,h.__)("4:3"),aspect:4/3},{title:(0,h.__)("3:2"),aspect:1.5}]}),(0,s.createElement)(hb,{label:(0,h.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,h.__)("10:16"),aspect:.625},{title:(0,h.__)("9:16"),aspect:9/16},{title:(0,h.__)("3:4"),aspect:3/4},{title:(0,h.__)("2:3"),aspect:2/3}]}))}))}var vb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function bb(){const{isInProgress:e,rotateClockwise:t}=cb();return(0,s.createElement)(p.ToolbarButton,{icon:vb,label:(0,h.__)("Rotate"),onClick:t,disabled:e})}function _b(){const{isInProgress:e,apply:t,cancel:n}=cb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{onClick:t,disabled:e},(0,h.__)("Apply")),(0,s.createElement)(p.ToolbarButton,{onClick:n},(0,h.__)("Cancel")))}function kb(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(db,{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,s.createElement)(Yn,null,(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(mb,null),(0,s.createElement)(p.ToolbarItem,null,(e=>(0,s.createElement)(gb,{toggleProps:e}))),(0,s.createElement)(bb,null)),(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(_b,null))))}const yb=[25,50,75,100];function Eb(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:a,onChange:c,onChangeImage:d=u.noop}=e;const{currentHeight:m,currentWidth:f,updateDimension:g,updateDimensions:v}=function(e,t,n,o,r){var l,i;const[a,c]=(0,s.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,s.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,s.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,s.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(a)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:a,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(a,i,n,t,c);return(0,s.createElement)(s.Fragment,null,!(0,u.isEmpty)(o)&&(0,s.createElement)(p.SelectControl,{label:(0,h.__)("Image size"),value:l,options:o,onChange:d}),r&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,h.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,h.__)("Width"),value:f,min:1,onChange:e=>g("width",e)}),(0,s.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,h.__)("Height"),value:m,min:1,onChange:e=>g("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(p.ButtonGroup,{"aria-label":(0,h.__)("Image size presets")},yb.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=f===o&&m===r;return(0,s.createElement)(p.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>v(r,o)},e,"%")}))),(0,s.createElement)(p.Button,{isSmall:!0,onClick:()=>v()},(0,h.__)("Reset")))))}var Cb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(O.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Sb=e=>{let{value:t,onChange:n=u.noop,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,s.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(p.VisuallyHidden,{as:"legend"},(0,h.__)("Currently selected link settings")),l)};class wb extends s.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,s.createRef)(),this.inputRef=(0,s.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,ya()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,ld.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,h.sprintf)(
72
  /* translators: %s: number of results. */
73
+ (0,h._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,h.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case va.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case va.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case va.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case va.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case va.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case va.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,h.__)("Link selected.")));break;case va.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,s=i;const a=n&&n.length;return l||a||(s=!1),!0===r&&(s=!1),{showSuggestions:s,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,s.createElement)(s.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,h.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:m,suggestionOptionIdPrefix:f}=this.state,g={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},v={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,h.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(g,v,a):(0,s.createElement)(p.BaseControl,g,(0,s.createElement)("input",v),a&&(0,s.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:m,loading:f}=this.state,h={id:d,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${m}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:a,suggestionsListProps:h,buildSuggestionItemProps:g,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,s.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,s.createElement)("div",i({},h,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,s.createElement)(p.Button,i({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Bb=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,m.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(zn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(wb),Ib=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:a}=e;return n?(t=a?(0,u.isFunction)(a)?a(n):a:(0,s.createInterpolateElement)((0,h.sprintf)(
74
  /* translators: %s: search term. */
75
+ (0,h.__)("Create: <mark>%s</mark>"),n),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(p.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:Fa}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},xb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Tb=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:a="",shouldShowType:u=!1}=e;return(0,s.createElement)(p.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&(0,s.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:xb}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,s.createElement)(p.TextHighlight,{text:n.title,highlight:a})),(0,s.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,ld.filterURLForDisplay)((0,ld.safeDecodeURI)(n.url))||""),l&&(0,h.__)("Press ENTER to add this link"))),u&&n.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};const Nb="__CREATE__",Pb=[{id:"opensInNewTab",title:(0,h.__)("Open in new tab")}];function Mb(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:a,suggestions:u,selectedSuggestion:d,isLoading:m,isInitialSuggestions:f,createSuggestionButtonText:g,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":m}),_=["url","mailto","tel","internal"],k=1===u.length&&_.includes(u[0].type.toLowerCase()),y=n&&!k&&!f,E=!(null!=v&&v.type),C=`block-editor-link-control-search-results-label-${t}`,S=f?(0,h.__)("Recently updated"):(0,h.sprintf)(
76
  /* translators: %s: search term. */
77
+ (0,h.__)('Search results for "%s"'),o),w=(0,s.createElement)(f?s.Fragment:p.VisuallyHidden,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:C},S));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,(0,s.createElement)("div",i({},l,{className:b,"aria-labelledby":C}),u.map(((e,t)=>y&&Nb===e.type?(0,s.createElement)(Ib,{searchTerm:o,buttonText:g,onClick:()=>r(e),key:e.type,itemProps:a(e,t),isSelected:t===d}):Nb===e.type?null:(0,s.createElement)(Tb,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:_.includes(e.type.toLowerCase()),searchTerm:o,shouldShowType:E})))))}function Rb(e){const t=(0,u.startsWith)(e,"#");return(0,ld.isURL)(e)||e&&e.includes("www.")||t}const Lb=()=>Promise.resolve([]),Ab=e=>{let t="URL";const n=(0,ld.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,ld.prependHTTP)(e):e,type:t}])};const Db=()=>Promise.resolve([]),Ob=(0,s.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:a=!1,onCreateSuggestion:p=u.noop,onChange:f=u.noop,onSelect:g=u.noop,showSuggestions:v=!0,renderSuggestions:b=(e=>(0,s.createElement)(Mb,e)),fetchSuggestions:_=null,allowDirectEntry:k=!0,showInitialSuggestions:y=!1,suggestionsQuery:E={},withURLSuggestion:C=!0,createSuggestionButtonText:S,useLabel:w=!1}=e;const B=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?Ab:Lb;return(0,s.useCallback)(((t,i)=>{let{isInitialSuggestions:s}=i;return Rb(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l)=>{const{isInitialSuggestions:i}=t;let s=await Promise.all([n(e,t),o(e)]);return s=e.includes(" ")||!l||i?s[0]:s[0].concat(s[1]),i||Rb(e)||!r?s:s.concat({title:e,url:e,type:Nb})})(t,{...e,isInitialSuggestions:s},r,l,n,o)}),[l,r,n])}(E,k,a,C),I=v?_||B:Db,x=(0,d.useInstanceId)(Ob),[T,N]=(0,s.useState)(),P=async e=>{let t=e;if(Nb!==e.type)(k||t&&Object.keys(t).length>=1)&&g({...(0,u.omit)(r,"id","url"),...t},t);else try{var n;t=await p(e.title),null!==(n=t)&&void 0!==n&&n.url&&g(t)}catch(e){}},M=c()(l,{"has-no-label":!w});return(0,s.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,s.createElement)(Bb,{label:w?"URL":void 0,className:M,value:n,onChange:(e,t)=>{f(e),N(t)},placeholder:null!=i?i:(0,h.__)("Search or type url"),__experimentalRenderSuggestions:v?e=>b({...e,instanceId:x,withCreateSuggestion:a,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:E,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),P(t)}}):null,__experimentalFetchLinkSuggestions:I,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:y,onSubmit:(e,t)=>{var o;const r=e||T;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?P(r||{url:n}):t.preventDefault()},ref:t}),o)}));var Fb=Ob,zb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Vb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:Hb,Fill:Ub}=(0,p.createSlotFill)("BlockEditorLinkControlViewer");function Gb(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}function Wb(e){let{value:t,onEditClick:n,hasRichPreviews:o=!1,hasUnlinkControl:r=!1,onRemove:l}=e;const i=o?null==t?void 0:t.url:null,{richData:a,isFetching:u}=function(e){const[t,n]=(0,s.useReducer)(Gb,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,s.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t}(i),d=a&&Object.keys(a).length,f=t&&(0,ld.filterURLForDisplay)((0,ld.safeDecodeURI)(t.url),16)||"",g=(null==a?void 0:a.title)||(null==t?void 0:t.title)||f,v=!t.url.length;let b;return b=null!=a&&a.icon?(0,s.createElement)("img",{src:null==a?void 0:a.icon,alt:""}):v?(0,s.createElement)(wo,{icon:zb,size:32}):(0,s.createElement)(wo,{icon:xb}),(0,s.createElement)("div",{"aria-label":(0,h.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":d,"is-fetching":!!u,"is-preview":!0,"is-error":v})},(0,s.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==a?void 0:a.icon})},b),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,s.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},"Link is empty"):(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},(0,rr.__unstableStripHTML)(g)),(null==t?void 0:t.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,s.createElement)(p.Button,{icon:Vb,label:(0,h.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:n,iconSize:24}),r&&(0,s.createElement)(p.Button,{icon:Fm,label:(0,h.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,s.createElement)(Hb,{fillProps:t})),(d&&((null==a?void 0:a.image)||(null==a?void 0:a.description))||u)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==a?void 0:a.image)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=a&&a.image)})},(null==a?void 0:a.image)&&(0,s.createElement)("img",{src:null==a?void 0:a.image,alt:""})),((null==a?void 0:a.description)||u)&&(0,s.createElement)("div",{"aria-hidden":!(null!=a&&a.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=a&&a.description)})},(null==a?void 0:a.description)&&(0,s.createElement)(p.__experimentalText,{truncate:!0,numberOfLines:"2"},a.description))))}function $b(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=Pb,onChange:a=u.noop,onRemove:d,noDirectEntry:m=!1,showSuggestions:f=!0,showInitialSuggestions:g,forceIsEditingLink:v,createSuggestion:b,withCreateSuggestion:_,inputValue:k="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:S=!1,hasTextControl:w=!1,renderControlBottom:B=null}=e;void 0===_&&b&&(_=!0);const I=(0,s.useRef)(!0),x=(0,s.useRef)(),T=(0,s.useRef)(),[N,P]=(0,s.useState)((null==l?void 0:l.url)||""),[M,R]=(0,s.useState)((null==l?void 0:l.title)||""),L=k||N,[A,D]=(0,s.useState)(void 0!==v?v:!l||!l.url),O=(0,s.useRef)(!1),F=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length);function z(){var e;O.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),D(!1)}(0,s.useEffect)((()=>{void 0!==v&&v!==A&&D(v)}),[v]),(0,s.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(rr.focus.focusable.find(x.current)[e]||x.current).focus(),O.current=!1}),[A]),(0,s.useEffect)((()=>{null!=l&&l.title&&l.title!==M&&R(l.title),null!=l&&l.url&&P(l.url)}),[l]);const{createPage:V,isCreatingPage:H,errorMessage:U}=function(e){const t=(0,s.useRef)(),[n,o]=(0,s.useState)(!1),[r,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=(e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}})(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,h.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(b),G=()=>{L===(null==l?void 0:l.url)&&M===(null==l?void 0:l.title)||a({url:L,title:M}),z()},W=d&&l&&!A&&!H,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&w;return(0,s.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},H&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(p.Spinner,null)," ",(0,h.__)("Creating"),"…"),(A||!l)&&!H&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,s.createElement)(p.TextControl,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:M,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==va.ENTER||F||(e.preventDefault(),G())}}),(0,s.createElement)(Fb,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:_,onCreateSuggestion:V,onChange:P,onSelect:e=>{a({...e,title:M||(null==e?void 0:e.title)}),z()},showInitialSuggestions:g,allowDirectEntry:!m,showSuggestions:f,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:j},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(p.Button,{onClick:G,label:(0,h.__)("Submit"),icon:Cb,className:"block-editor-link-control__search-submit",disabled:F})))),U&&(0,s.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},U)),l&&!A&&!H&&(0,s.createElement)(Wb,{key:null==l?void 0:l.url,value:l,onEditClick:()=>D(!0),hasRichPreviews:S,hasUnlinkControl:W,onRemove:d}),$&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(Sb,{value:l,settings:i,onChange:a})),B&&B())}$b.ViewerFill=Ub;var jb=$b,Kb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})),qb=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})),Yb=(0,p.withFilters)("editor.MediaUpload")((()=>null)),Zb=function(e){let{fallback:t=null,children:n}=e;return(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return!!t().mediaUpload}),[])?n:t},Xb=(0,d.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Pu.store);return{createNotice:t,removeNotice:n}})),(0,p.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,allowedTypes:o,accept:r,onSelect:l,onSelectURL:i,onFilesUpload:a=u.noop,onCloseModal:c=u.noop,name:d=(0,h.__)("Replace"),createNotice:f,removeNotice:g,children:v}=e;const[b,_]=(0,s.useState)(t),k=(0,m.useSelect)((e=>e(zn).getSettings().mediaUpload),[]),y=(0,s.createRef)(),E=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),C=e=>{const t=document.createElement("div");t.innerHTML=(0,s.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},S=e=>{_(e.url),l(e),(0,Nt.speak)((0,h.__)("The media file has been replaced")),g(E)},w=e=>{e.keyCode===va.DOWN&&(e.preventDefault(),e.target.click())};return(0,s.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(p.ToolbarButton,{ref:y,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:w},d)},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(Yb,{value:n,onSelect:e=>S(e),allowedTypes:o,onClose:c,render:e=>{let{open:t}=e;return(0,s.createElement)(p.MenuItem,{icon:Kb,onClick:t},(0,h.__)("Open Media Library"))}}),(0,s.createElement)(Zb,null,(0,s.createElement)(p.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;a(t),k({allowedTypes:o,filesList:t,onFileChange:e=>{let[t]=e;S(t)},onError:C})})(e)},accept:r,render:e=>{let{openFileDialog:t}=e;return(0,s.createElement)(p.MenuItem,{icon:qb,onClick:()=>{t()}},(0,h.__)("Upload"))}})),v),i&&(0,s.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,s.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,h.__)("Current media URL:")),(0,s.createElement)(jb,{value:{url:b},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;_(t),i(t),y.current.focus()}})))}})}));function Qb(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,s.createElement)(p.ExternalLink,{className:r,href:t},n||(0,ld.filterURLForDisplay)((0,ld.safeDecodeURI)(t))):(0,s.createElement)("span",{className:r})}function Jb(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...a}=e;const[c,u]=(0,s.useState)(!1),d=!!o&&c;return(0,s.createElement)(p.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r},a),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,s.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:Gd,label:(0,h.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}Jb.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,s.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,s.createElement)(Bb,{value:r,onChange:o,autocompleteRef:t}),(0,s.createElement)(p.Button,{icon:Cb,label:(0,h.__)("Apply"),type:"submit"}))},Jb.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...a}=e;return(0,s.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},a),(0,s.createElement)(Qb,{url:r,urlLabel:l,className:n}),o&&(0,s.createElement)(p.Button,{icon:Vb,label:(0,h.__)("Edit"),onClick:o}))};var e_=Jb;const t_=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,s.createElement)(e_,{onClose:r},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,h.__)("URL"),placeholder:(0,h.__)("Paste or type URL"),onChange:n,value:t}),(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Cb,label:(0,h.__)("Apply"),type:"submit"})))};var n_=(0,p.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:a,isAppender:d,accept:f,addToGallery:g,multiple:v=!1,handleUpload:b=!0,dropZoneUIOnly:_,disableDropZone:k,disableMediaButtons:y,onError:E,onSelect:C,onCancel:S,onSelectURL:w,onDoubleClick:B,onFilesPreUpload:I=u.noop,onHTMLDrop:x=u.noop,onClose:T=u.noop,children:N,mediaLibraryButton:P,placeholder:M,style:R}=e;const L=(0,m.useSelect)((e=>{const{getSettings:t}=e(zn);return t().mediaUpload}),[]),[A,D]=(0,s.useState)(""),[O,F]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var e;D(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const z=e=>{D(e.target.value)},V=()=>{F(!0)},H=()=>{F(!1)},U=e=>{e.preventDefault(),A&&w&&(w(A),H())},G=e=>{if(!b)return C(e);let o;if(I(e),v)if(g){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));C(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=C;else o=e=>{let[t]=e;return C(t)};L({allowedTypes:n,filesList:e,onFileChange:o,onError:E})},W=e=>{G(e.target.files)},$=null!=M?M:e=>{let{instructions:t,title:u}=l;if(L||w||(t=(0,h.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,s=r&&"video"===o;void 0===t&&L&&(t=(0,h.__)("Upload a media file or pick one from your media library."),l?t=(0,h.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,h.__)("Upload an image file, pick one from your media library, or add one with a URL."):s&&(t=(0,h.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,h.__)("Media"),l?u=(0,h.__)("Audio"):i?u=(0,h.__)("Image"):s&&(u=(0,h.__)("Video")))}const m=c()("block-editor-media-placeholder",o,{"is-appender":d});return(0,s.createElement)(p.Placeholder,{icon:r,label:u,instructions:t,className:m,notices:a,onDoubleClick:B,preview:i,style:R},e,N)},j=()=>k?null:(0,s.createElement)(p.DropZone,{onFilesDrop:G,onHTMLDrop:x}),K=()=>S&&(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,h.__)("Cancel"),variant:"link",onClick:S},(0,h.__)("Cancel")),q=()=>w&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:V,isPressed:O,variant:"tertiary"},(0,h.__)("Insert from URL")),O&&(0,s.createElement)(t_,{src:A,onChange:z,onSubmit:U,onClose:H}));return _||y?(_&&Rt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,s.createElement)(Zb,null,j())):(0,s.createElement)(Zb,{fallback:$(q())},(()=>{const e=null!=P?P:e=>{let{open:t}=e;return(0,s.createElement)(p.Button,{variant:"tertiary",onClick:()=>{t()}},(0,h.__)("Media Library"))},o=(0,s.createElement)(Yb,{addToGallery:g,gallery:v&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:v,onSelect:C,onClose:T,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(L&&d)return(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(p.FormFileUpload,{onChange:W,accept:f,multiple:v,render:e=>{let{openFileDialog:t}=e;const n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,h.__)("Upload")),o,q(),K());return $(n)}}));if(L){const e=(0,s.createElement)(s.Fragment,null,j(),(0,s.createElement)(p.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:W,accept:f,multiple:v},(0,h.__)("Upload")),o,q(),K());return $(e)}return $(o)})())})),o_=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{let{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,s.createElement)(gf,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const r_={position:"bottom right",isAlternate:!0};var l_=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link"].map((e=>(0,s.createElement)(p.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(p.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,s.createElement)(p.ToolbarItem,null,(n=>(0,s.createElement)(p.DropdownMenu,{icon:Gd
78
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,h.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:r_})))}))),i_=e=>{let{inline:t,anchorRef:n}=e;return t?(0,s.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,s.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,s.createElement)(p.ToolbarGroup,null,(0,s.createElement)(l_,null)))):(0,s.createElement)(Yn,{group:"inline"},(0,s.createElement)(l_,null))};function s_(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(zn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==va.DELETE&&o!==va.BACKSPACE&&o!==va.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function a_(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>`<img src="${(0,Ep.createBlobURL)(e)}">`)).join("")}var c_=window.wp.shortcode;function u_(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function d_(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function p_(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?p_.EMPTY_ARRAY:t||n?t||(Rt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((e=>`core/${e}`))):void 0}function m_(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const s=[],[a,c]=(0,Pt.split)(t),u=n.length>0;let d=-1;const p=(0,Pt.isEmpty)(a)&&!(0,Pt.isEmpty)(c);u&&(0,Pt.isEmpty)(a)||(s.push(r((0,Pt.toHTMLString)({value:a,multilineTag:i}),!p)),d+=1),u?(s.push(...n),d+=n.length):l&&s.push(l()),(u||l)&&(0,Pt.isEmpty)(c)||s.push(r((0,Pt.toHTMLString)({value:c,multilineTag:i}),p)),o(s,u?d:1,u?-1:0)}function f_(e,t){return t?(0,Pt.replace)(e,/\n+/g,Pt.__UNSTABLE_LINE_SEPARATOR):(0,Pt.replace)(e,new RegExp(Pt.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function h_(e){const t=(0,s.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:s,tagName:a,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:h}=t.current;if(!n)return void e.preventDefault();const{clipboardData:g}=e;let v="",b="";try{v=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(b),b=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(t.length):e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,Pt.insert)(i,v));const _=s.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(_!==i)return void l(_);const k=[...(0,rr.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,Pt.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=f_(t,!!m),u_(t,i.activeFormats),void l((0,Pt.insert)(i,t))}if(h)return void l((0,Pt.insert)(i,(0,Pt.create)({text:v})));if(k&&k.length&&!b){const e=(0,r.pasteHandler)({HTML:a_(k),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",k),void(c&&(0,Pt.isEmpty)(i)?c(e):m_({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,Pt.isEmpty)(i)&&(E=v,(0,c_.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,Pt.isEmpty)(i)&&(0,ld.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:a,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,Pt.create)({html:C});e=f_(e,!!m),u_(e,i.activeFormats),l((0,Pt.insert)(i,e))}else C.length>0&&(c&&(0,Pt.isEmpty)(i)?c(C,C.length-1,-1):m_({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function g_(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(zn),o=(0,s.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:l,text:i}=e;if(" "!==i.slice(l-1,l))return;const s=i.slice(0,l).trim(),a=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),c=(0,r.findTransform)(a,(e=>{let{prefix:t}=e;return s===t}));if(!c)return;const u=(0,Pt.toHTMLString)({value:(0,Pt.slice)(e,l,i.length)});t([c.transform(u)]),n()}function i(e){const{inputType:r,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n<t.length||o.slice(n-t.length,n).toLowerCase()!==t?e:(0,Pt.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(s));d!==s&&(t(),a({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",i),e.addEventListener("compositionend",i),()=>{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function v_(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(zn),n=(0,s.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==va.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&s;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,Pt.insert)(m,"\n")):f&&(0,Pt.__unstableIsEmptyLine)(m)?m_({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c}):u((0,Pt.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,Pt.insert)(m,"\n")):!f&&r?p():f&&m_({value:m,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function b_(e){return e(Pt.store).getFormatTypes()}p_.EMPTY_ARRAY=[];const k_=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function y_(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function E_(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function C_(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const a=(0,Pt.getActiveFormat)(r,t);let c=void 0!==a;const d=(0,Pt.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,Pt.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,s.createElement)(i,{key:t,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const S_=(0,s.createContext)(),w_=(0,s.createContext)(),B_=(0,s.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:a="",onChange:f,isSelected:h,multiline:g,inlineToolbar:v,wrapperClassName:b,autocompleters:_,onReplace:k,placeholder:y,allowedFormats:E,formattingControls:C,withoutInteractiveFormatting:S,onRemove:w,onMerge:B,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:T,identifier:N,preserveWhiteSpace:P,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:D,__unstableAllowPrefixTransformations:O,...F}=t;const z=(0,d.useInstanceId)(e);N=N||z,F=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(F);const V=(0,s.useRef)(),{clientId:H}=Gn(),{selectionStart:U,selectionEnd:G,isSelected:W,disabled:$}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(zn),l=t(),i=n();let s;return void 0===h?s=l.clientId===H&&l.attributeKey===N:h&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:j}=(0,m.useDispatch)(zn),K=d_(g),q=p_({allowedFormats:E,formattingControls:C,disableFormats:L}),Y=!q||q.length>0;let Z=a,X=f;Array.isArray(a)&&(Z=r.children.toHTML(a),X=e=>f(r.children.fromDOM((0,Pt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,s.useCallback)(((e,t)=>{j(H,N,e,t)}),[H,N]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,m.useSelect)(b_,[]),i=(0,s.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&k_.has(n))}))),[l,r,k_]),a=(0,m.useSelect)((e=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),o)),{})),[i,t,n]),c=(0,m.useDispatch)(),u=[],d=[],p=[],f=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=a[e.name],r=e.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(r):u.push(r);for(const e in o)f.push(o[e])}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),p.push(e.__experimentalCreateOnChangeEditableValue({...a[e.name]||{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:f}}({clientId:H,identifier:N,withoutInteractiveFormatting:S,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Pt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:se}=(0,Pt.__unstableUseRichText)({value:Z,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;X(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:G,onSelectionChange:Q,placeholder:y,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:P,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ae=function(e){return(0,p.__unstableUseAutocompleteProps)({...e,completers:Ag(e)})}({onReplace:k,completers:_,record:le,onChange:ie});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:o}=(0,m.useSelect)(zn),{enterFormattedText:r,exitFormattedText:l}=(0,m.useDispatch)(zn);(0,s.useEffect)((()=>{n?o()||r():o()&&l()}),[n])}({value:le}),function(e){let{html:t,value:n}=e;const o=(0,s.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,m.useDispatch)(zn);(0,s.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Z,value:le});const ce=(0,s.useRef)(new Set),ue=(0,s.useRef)(new Set);function de(){V.current.focus()}const pe=l,me=(0,s.createElement)(s.Fragment,null,W&&(0,s.createElement)(S_.Provider,{value:ce},(0,s.createElement)(w_.Provider,{value:ue},(0,s.createElement)(p.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,s.createElement)(C_,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:V})))),W&&Y&&(0,s.createElement)(i_,{inline:v,anchorRef:V.current}),(0,s.createElement)(pe,i({role:"textbox","aria-multiline":!0,"aria-label":y},F,ae,{ref:(0,d.useMergeRefs)([ae.ref,F.ref,se,g_({value:le,onChange:ie,__unstableAllowPrefixTransformations:O,formatTypes:J,onReplace:k}),(0,d.useRefEffect)((e=>{function t(e){(va.isKeyboardEvent.primary(e,"z")||va.isKeyboardEvent.primary(e,"y")||va.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),y_(ce),E_(ue),s_(),h_({isSelected:W,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:k,onSplit:I,onSplitMiddle:T,__unstableEmbedURLOnPaste:R,multilineTag:K,preserveWhiteSpace:P,pastePlainText:M}),v_({removeEditorOnlyFormats:re,value:le,onReplace:k,onSplit:I,onSplitMiddle:T,multilineTag:K,onChange:ie,disableLineBreaks:A,onSplitAtEnd:x}),V,n]),contentEditable:!$||void 0,suppressContentEditableWarning:!$,className:c()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:D,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===va.DELETE||t===va.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===va.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,Pt.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;B&&B(!l),w&&(0,Pt.isEmpty)(le)&&l&&w(!l),e.preventDefault()}}})));if(!b)return me;Rt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const fe=c()("block-editor-rich-text",b);return(0,s.createElement)("div",{className:fe},me)}));B_.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(t=r.children.toHTML(t));const i=d_(o);!t&&i&&(t=`<${i}></${i}>`);const a=(0,s.createElement)(s.RawHTML,null,t);return n?(0,s.createElement)(n,(0,u.omit)(l,["format"]),a):a},B_.isEmpty=e=>!e||0===e.length;var I_=B_;const x_=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(I_,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));x_.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,s.createElement)(n,o,t)};var T_=x_,N_=(0,s.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,s.createElement)(T_,i({ref:t},o));const{className:r,onChange:l,...a}=o;return(0,s.createElement)(Er.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},a))}));function P_(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(P_),l=o||(0,h.sprintf)(
79
  /* translators: 1: property name. 2: viewport name. */
80
+ (0,h._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,s.createElement)(p.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var M_=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:u={id:"all",
81
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
82
  label:(0,h.__)("All")},viewports:d=[{id:"small",label:(0,h.__)("Small screens")},{id:"medium",label:(0,h.__)("Medium screens")},{id:"large",label:(0,h.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const m=o||(0,h.sprintf)(
83
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
84
+ (0,h.__)("Use the same %s on all screensizes."),n),f=(0,h.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=l((0,s.createElement)(P_,{property:n,viewport:u}),u);
85
+ /* translators: 'Help text for the responsive mode toggle control.' */return(0,s.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,s.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,s.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,s.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!a,onChange:r,help:f}),(0,s.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&g,a&&(i?i(d):d.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},l((0,s.createElement)(P_,{property:n,viewport:e}),e))))))))};function R_(e){let{character:t,type:n,onUse:o}=e;const r=(0,s.useContext)(S_),l=(0,s.useRef)();return l.current=o,(0,s.useEffect)((()=>{function e(e){va.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function L_(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,a="RichText.ToolbarControls";return n&&(a+=`.${n}`),o&&r&&(t=va.displayShortcut[o](r)),(0,s.createElement)(p.Fill,{name:a},(0,s.createElement)(p.ToolbarButton,i({},l,{shortcut:t})))}function A_(e){let{inputType:t,onInput:n}=e;const o=(0,s.useContext)(w_),r=(0,s.useRef)();return r.current=n,(0,s.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const D_=(0,s.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(p.Path,{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"}));var O_=(0,s.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(zn).isNavigationMode()),[]),{setNavigationMode:o}=(0,m.useDispatch)(zn),r=e=>{o("edit"!==e)};return(0,s.createElement)(p.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,s.createElement)(p.Button,i({},e,{ref:t,icon:n?D_:Vb,"aria-expanded":r,"aria-haspopup":"true",onClick:l
86
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,h.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.NavigableMenu,{role:"menu","aria-label":(0,h.__)("Tools")},(0,s.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(wo,{icon:Vb}),(0,h.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,D_,(0,h.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,h.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function F_(e){let{units:t,...n}=e;const o=(0,p.__experimentalUseCustomUnits)({availableUnits:mo("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,s.createElement)(p.__experimentalUnitControl,i({units:o},n))}var z_=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class V_ extends s.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,h.__)("Edit link"):(0,h.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(p.Button,{icon:Om,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,s.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,s.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,s.createElement)(p.Button,{className:"block-editor-url-input__back",icon:z_,label:(0,h.__)("Close"),onClick:this.toggle}),(0,s.createElement)(Bb,{value:e||"",onChange:t}),(0,s.createElement)(p.Button,{icon:Cb,label:(0,h.__)("Submit"),type:"submit"}))))}}var H_=V_,U_=(0,s.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(O.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const G_="none",W_="custom",$_="media",j_="attachment",K_=["noreferrer","noopener"],q_=(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,s.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Y_=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:a,linkClass:c,rel:d}=e;const[m,f]=(0,s.useState)(!1),g=(0,s.useCallback)((()=>{f(!0)})),[v,b]=(0,s.useState)(!1),[_,k]=(0,s.useState)(null),y=(0,s.useRef)(null),E=(0,s.useCallback)((()=>{t!==$_&&t!==j_||k(""),b(!0)})),C=(0,s.useCallback)((()=>{b(!1)})),S=(0,s.useCallback)((()=>{k(null),C(),f(!1)})),w=e=>{let t=e;return void 0===e||(0,u.isEmpty)(t)||(0,u.isEmpty)(t)||((0,u.each)(K_,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,u.isEmpty)(t)&&(t=void 0)),t},B=(0,s.useCallback)((()=>e=>{const t=y.current;t&&t.contains(e.target)||(f(!1),k(null),C())})),I=(0,s.useCallback)((()=>e=>{if(_){var t;const e=(null===(t=T().find((e=>e.url===_)))||void 0===t?void 0:t.linkDestination)||W_;n({href:_,linkDestination:e})}C(),k(null),e.preventDefault()})),x=(0,s.useCallback)((()=>{n({linkDestination:G_,href:""})})),T=()=>{const e=[{linkDestination:$_,title:(0,h.__)("Media File"),url:"image"===r?l:void 0,icon:q_}];return"image"===r&&i&&e.push({linkDestination:j_,title:(0,h.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,s.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},N=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToggleControl,{label:(0,h.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;return n=t||d?w(d):void 0,{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===a}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link Rel"),value:w(d)||"",onChange:e=>{n({rel:e})}}),(0,s.createElement)(p.TextControl,{label:(0,h.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),P=null!==_?_:o,M=((0,u.find)(T(),["linkDestination",t])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.ToolbarButton,{icon:Om,className:"components-toolbar__control",label:o?(0,h.__)("Edit link"):(0,h.__)("Insert link"),"aria-expanded":m,onClick:g}),m&&(0,s.createElement)(e_,{onFocusOutside:B(),onClose:S,renderSettings:()=>N,additionalControls:!P&&(0,s.createElement)(p.NavigableMenu,null,(0,u.map)(T(),(e=>(0,s.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{k(null),(e=>{const t=T();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:W_}).linkDestination:G_,n({linkDestination:o,href:e})})(e.url),C()}},e.title))))},(!o||v)&&(0,s.createElement)(e_.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:P,onChangeInputValue:k,onSubmit:I(),autocompleteRef:y}),o&&!v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e_.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:E,urlLabel:M}),(0,s.createElement)(p.Button,{icon:U_,label:(0,h.__)("Remove link"),onClick:x}))))};function Z_(e){let{children:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l}=e;if((0,d.useViewportMatch)("small","<"))return null;const i={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,
87
  /* translators: button label text should, if possible, be under 16 characters. */
88
+ children:(0,h.__)("Preview")};return(0,s.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:a,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(p.MenuGroup,null,(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&lp},(0,h.__)("Desktop")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&lp},(0,h.__)("Tablet")),(0,s.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&lp},(0,h.__)("Mobile"))),t)))}function X_(e){const[t,n]=(0,s.useState)(window.innerWidth);(0,s.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var Q_=(0,m.withSelect)((e=>({selectedBlockClientId:e(zn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Ba(t);return t?(0,s.createElement)(p.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,h.__)("Skip to the selected block")):null})),J_=window.wp.wordcount,ek=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(zn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,J_.count)((0,r.serialize)(t),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(Ua,{icon:np,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,h.sprintf)(
89
  /* translators: %d: number of blocks */
90
  (0,h._n)("%d block","%d blocks",t.length),t.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,h.sprintf)(
91
  /* translators: %d: number of words */
92
+ (0,h._n)("%d word","%d words",n),n))))}));function tk(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,m.useSelect)((e=>{var n,o;const l=e(zn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,s.useMemo)((()=>[{label:(0,h.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),a=(0,s.useMemo)((()=>{var e;return null===(e=cp(l))||void 0===e?void 0:e.name}),[l]),c=(0,s.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==a?o&&(0,s.createElement)("div",{className:"default-style-picker__default-switcher"},(0,s.createElement)(p.SelectControl,{options:i,value:n||"",label:(0,h.__)("Default Style"),onChange:c})):null}const nk=e=>{let{clientId:t,blockName:n,hasBlockStyles:o}=e;const l=Ld(t);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Ga,l),(0,s.createElement)(Pv,{blockClientId:t}),o&&(0,s.createElement)("div",null,(0,s.createElement)(p.PanelBody,{title:(0,h.__)("Styles")},(0,s.createElement)(vv,{scope:"core/block-inspector",clientId:t}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,s.createElement)(tk,{blockName:n}))),(0,s.createElement)(er.Slot,null),(0,s.createElement)(er.Slot,{__experimentalGroup:"typography",label:(0,h.__)("Typography")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"dimensions",label:(0,h.__)("Dimensions")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"border",label:(0,h.__)("Border")}),(0,s.createElement)("div",null,(0,s.createElement)(ok,null)),(0,s.createElement)(Q_,{key:"back"}))},ok=()=>{const e=(0,p.__experimentalUseSlot)(Jo.slotName);return Boolean(e.fills&&e.fills.length)?(0,s.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,h.__)("Advanced"),initialOpen:!1},(0,s.createElement)(er.Slot,{__experimentalGroup:"advanced"})):null};var rk=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:o,selectedBlockName:l,selectedBlockClientId:i,blockType:a}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(zn),{getBlockStyles:l}=e(r.store),i=t(),s=i&&o(i),a=s&&(0,r.getBlockType)(s),c=s&&l(s);return{count:n(),selectedBlockClientId:i,selectedBlockName:s,blockType:a,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(ek,null),(0,s.createElement)(er.Slot,null),(0,s.createElement)(er.Slot,{__experimentalGroup:"typography",label:(0,h.__)("Typography")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"dimensions",label:(0,h.__)("Dimensions")}),(0,s.createElement)(er.Slot,{__experimentalGroup:"border",label:(0,h.__)("Border")}));const c=l===(0,r.getUnregisteredTypeHandlerName)();return a&&i&&!c?(0,s.createElement)(nk,{clientId:i,blockName:a.name,hasBlockStyles:o}):t?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,h.__)("No block selected.")):null};function lk(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),l=(0,m.useSelect)((e=>e(zn).getSettings().hasFixedToolbar),[]),a=(0,tc.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:f}=(0,m.useSelect)(zn),{duplicateBlocks:h,removeBlocks:g,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:_,moveBlocksUp:k,moveBlocksDown:y}=(0,m.useDispatch)(zn);return(0,s.createElement)("div",i({},o,{onKeyDown:function(e){if(a("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));k(t,n)}}else if(a("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));y(t,n)}}else if(a("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),h(t))}else if(a("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(a("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),v((0,u.last)(t)))}else if(a("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(a("core/block-editor/delete-multi-selection",e)){if(["INPUT","TEXTAREA"].includes(e.target.nodeName)||e.defaultPrevented)return;const t=c();t.length>1&&(e.preventDefault(),g(t))}else a("core/block-editor/unselect",e)&&c().length>1&&(e.preventDefault(),_(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Nd,{__unstableContentRef:n},(l||!r)&&(0,s.createElement)(Up,{isFixed:!0}),(0,s.createElement)(jp,{__unstableContentRef:n}),(0,s.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:Id(n)}),t,(0,s.createElement)(p.Popover.Slot,{name:"__unstable-block-tools-after",ref:Id(n)})))}var ik=function(e){let{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onSelect:c=u.noop,shouldFocusBlock:d=!1}=e;const p=(0,m.useSelect)((e=>{const{getBlockRootClientId:o}=e(zn);return t||o(n)||void 0}),[n,t]);return(0,s.createElement)(vd,{onSelect:c,rootClientId:p,clientId:n,isAppender:o,showInserterHelpPanel:r,showMostUsedBlocks:l,__experimentalInsertionIndex:i,__experimentalFilterValue:a,shouldFocusBlock:d})};function sk(){return null}sk.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(tc.store);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,h.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,h.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,h.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,h.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,h.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,h.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,h.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,h.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,h.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,h.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var ak=sk;function ck(){return Rt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const uk=new Set([va.UP,va.RIGHT,va.DOWN,va.LEFT,va.ENTER,va.BACKSPACE]);function dk(){const e=(0,m.useSelect)((e=>e(zn).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(zn);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function pk(){const e=(0,m.useSelect)((e=>e(zn).isTyping())),{startTyping:t,stopTyping:n}=(0,m.useDispatch)(zn),o=dk(),r=(0,d.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let e;function t(t){const{target:o}=t;e=l.setTimeout((()=>{(0,rr.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==va.ESCAPE&&t!==va.TAB||n()}function s(){const e=l.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",t),o.addEventListener("keydown",i),r.addEventListener("selectionchange",s),()=>{l.clearTimeout(e),o.removeEventListener("focus",t),o.removeEventListener("keydown",i),r.removeEventListener("selectionchange",s)}}function i(e){const{type:n,target:r}=e;(0,rr.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&uk.has(t)}(e))&&t()}return o.addEventListener("keypress",i),o.addEventListener("keydown",i),()=>{o.removeEventListener("keypress",i),o.removeEventListener("keydown",i)}}),[e,t,n]);return(0,d.useMergeRefs)([o,r])}var mk=function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:pk()},t)};function fk(){return Rt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const hk=-1!==window.navigator.userAgent.indexOf("Trident"),gk=new Set([va.UP,va.DOWN,va.LEFT,va.RIGHT]);function vk(){const e=(0,m.useSelect)((e=>e(zn).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,rr.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(gk.has(r))return void(i=l);const s=l.top-i.top;if(0===s)return;const a=(0,rr.getScrollContainer)(t);if(!a)return;const c=a===n.body,u=c?o.scrollY:a.scrollTop,d=c?0:a.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:a.clientHeight;i.top+i.height>d+f||i.top<d?i=l:c?o.scrollBy(0,s):a.scrollTop+=s}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){m()&&(i=(0,rr.computeCaretRect)(o))}function m(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",s,!0),o.addEventListener("resize",s,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",s,!0),o.removeEventListener("resize",s,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var bk=hk?e=>e.children:function(e){let{children:t}=e;return(0,s.createElement)("div",{ref:vk(),className:"block-editor__typewriter"},t)};const _k=(0,s.createContext)({});function kk(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}function yk(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,s.useContext)(_k),{name:r}=Gn();n=n||r;const l=Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e)),i=(0,s.useMemo)((()=>kk(o,n,e)),[o,n,e]),a=(0,s.useCallback)((e=>{let{children:t}=e;return(0,s.createElement)(_k.Provider,{value:i},t)}),[i]);return[l,a]}function Ek(e){if(void 0===e)e=v.colors;else{const t=e.filter((e=>e.color));0===t.length?e=v.colors:t.length<e.length&&(e=t)}return e}function Ck(e){if(void 0===e)e=v.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=v.gradients:t.length<e.length&&(e=t)}return e}function Sk(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function wk(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>Sk(Nk(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]<o[0]?o[0]+"px":o[1]>o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function Bk(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=wk(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return Sk(e)}function Ik(e){for(let t=0;t<e.length;t++)if(["+","-","/","*"].includes(e[t]))return!0;return!1}function xk(e){let t=!1;const n=e.split(/[+-/*/]/g).filter(Boolean);for(const o of n){const n=Sk(Nk(o));if(!parseFloat(n.value)){t=!0;break}e=e.replace(o,n.value)}return t?null:(o=e,Function(`'use strict'; return (${o})`)()).toFixed(0)+"px";var o}function Tk(e,t){const n=.01,o=Object.assign({},{fontSize:16,lineHeight:16,width:375,height:812,type:"font"},t),r={em:o.fontSize,rem:o.fontSize,vh:o.height*n,vw:o.width*n,vmin:(o.width<o.height?o.width:o.height)*n,vmax:(o.width>o.height?o.width:o.height)*n,"%":("font"===o.type?o.fontSize:o.width)*n,ch:8,ex:7.15625,lh:o.lineHeight},l={in:96,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return r[e.unit]?(r[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function Nk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=Sk(e);return n.unit||(n=Bk(e)),Ik(e)&&!n.unit?xk(e):Tk(n,t)}const Pk={};function Mk(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var Rk=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+Mk(t);return Pk[n]||(Pk[n]=Nk(e,t)),Pk[n]}}(),(window.wp=window.wp||{}).blockEditor=o}();
build/block-editor/style-rtl.css CHANGED
@@ -1 +1 @@
1
- :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,161;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.block-editor-autocompleters__block{white-space:nowrap}.block-editor-autocompleters__block .block-editor-block-icon{margin-left:8px}.block-editor-block-alignment-control__menu-group .components-menu-item__info{margin-top:0}.block-editor-block-alignment-matrix-control__popover .components-popover__content{min-width:0;width:auto}.block-editor-block-alignment-matrix-control__popover .components-popover__content>div{padding:8px}.block-editor-block-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.block-editor-block-icon.has-colors svg{fill:currentColor}@media (forced-colors:active){.block-editor-block-icon.has-colors svg{fill:CanvasText}}.block-editor-block-icon svg{max-height:24px;max-width:24px;min-height:20px;min-width:20px}.block-editor-block-inspector p{margin-top:0}.block-editor-block-inspector h2,.block-editor-block-inspector h3{color:#1e1e1e;font-size:13px;margin-bottom:1.5em}.block-editor-block-inspector .components-base-control{margin-bottom:24px}.block-editor-block-inspector .components-base-control:last-child{margin-bottom:8px}.block-editor-block-inspector .components-panel__body{border:none;border-top:1px solid #e0e0e0}.block-editor-block-inspector .block-editor-block-card{padding:16px}.block-editor-block-inspector__no-blocks{background:#fff;display:block;font-size:13px;padding:32px 16px;text-align:center}.block-editor-block-styles .block-editor-block-list__block{margin:0}.block-editor-block-list__layout{position:relative}.block-editor-block-list__layout.is-navigate-mode{cursor:default}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 1px #fff}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted .components-placeholder ::selection,.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered .components-placeholder ::selection,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected .components-placeholder ::selection{background:transparent}.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-hovered:not(.is-selected):after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:after,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:before{border-radius:2px;border-top:4px solid #ccc;content:"";left:0;pointer-events:none;position:absolute;right:0;top:-14px;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear;z-index:0}.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:after{content:none}.block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected:before{border-color:var(--wp-admin-theme-color)}.is-block-moving-mode.block-editor-block-list__block-selection-button{font-size:1px;height:1px;opacity:0;padding:0}.block-editor-block-list__layout .block-editor-block-list__block{overflow-wrap:break-word;position:relative}.block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel *{z-index:1}.block-editor-block-list__layout .block-editor-block-list__block .components-placeholder .components-with-notices-ui{margin:-10px 0 12px}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui{margin:0 0 12px;width:100%}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice{margin-left:0;margin-right:0}.block-editor-block-list__layout .block-editor-block-list__block .components-with-notices-ui .components-notice .components-notice__content{font-size:13px}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus{outline:none}.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";left:1px;outline:2px solid transparent;pointer-events:none;position:absolute;right:1px;top:1px;z-index:1}.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}.block-editor-block-list__layout .block-editor-block-list__block:after{border-radius:2px;bottom:0;box-shadow:0 0 0 var(--wp-admin-border-width-focus) transparent;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning{min-height:48px}.block-editor-block-list__layout .block-editor-block-list__block.has-warning>*{pointer-events:none;-webkit-user-select:none;user-select:none}.block-editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-warning{pointer-events:all}.block-editor-block-list__layout .block-editor-block-list__block.has-warning:after{background-color:hsla(0,0%,100%,.4);border-radius:2px;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-multi-selected:after{background-color:transparent}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay:after{display:none}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable>.block-editor-inner-blocks>.block-editor-block-list__layout.has-overlay .block-editor-block-list__layout.has-overlay:after{display:block}.block-editor-block-list__layout .block-editor-block-list__block.is-reusable.has-child-selected:after{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-list__layout .block-editor-block-list__block[data-clear=true]{float:none}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered{cursor:default}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-hovered:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 1px var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected{cursor:unset}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:after{border-radius:1px;bottom:1px;box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);left:1px;right:1px;top:1px}.is-outline-mode .block-editor-block-list__block:not(.remove-outline).is-selected:focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-focus-mode .block-editor-block-list__block:not(.has-child-selected){transition-delay:0s;transition-duration:0s}}.is-focus-mode .block-editor-block-list__block:not(.has-child-selected) .block-editor-block-list__block,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-multi-selected,.is-focus-mode .block-editor-block-list__block:not(.has-child-selected).is-selected{opacity:1}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{opacity:.5;transition:opacity .1s linear}@media (prefers-reduced-motion:reduce){.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity{transition-delay:0s;transition-duration:0s}}.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.has-child-selected,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity.is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity .is-active-entity .block-editor-block-list__block,.is-root-container:not(.is-focus-mode) .block-editor-block-list__block.has-active-entity:not(.has-child-selected) .block-editor-block-list__block{opacity:1}.wp-block[data-align=left]>*,.wp-block[data-align=right]>*{z-index:21}.wp-site-blocks>[data-align=left]{float:right;margin-left:2em}.wp-site-blocks>[data-align=right]{float:left;margin-right:2em}.wp-site-blocks>[data-align=center]{justify-content:center;margin-left:auto;margin-right:auto}.block-editor-block-list .block-editor-inserter{cursor:move;cursor:grab;margin:8px}@keyframes block-editor-inserter__toggle__fade-in-animation{0%{opacity:0}to{opacity:1}}.wp-block .block-list-appender .block-editor-inserter__toggle{animation:block-editor-inserter__toggle__fade-in-animation .1s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.wp-block .block-list-appender .block-editor-inserter__toggle{animation-delay:0s;animation-duration:1ms}}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender{display:none}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected) .block-editor-default-block-appender .block-editor-inserter__toggle{opacity:0;transform:scale(0)}.block-editor-block-list__block .block-editor-block-list__block-html-textarea{border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:block;font-family:Menlo,Consolas,monaco,monospace;font-size:15px;line-height:1.5;margin:0;outline:none;overflow:hidden;padding:12px;resize:none;transition:padding .2s linear;width:100%}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-editor-block-list__block-html-textarea{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-editor-block-list__block-html-textarea:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-editor-block-list__block .block-editor-warning{position:relative;z-index:5}.block-editor-block-list__block .block-editor-warning.block-editor-block-list__block-crash-warning{margin-bottom:auto}.block-editor-block-list__insertion-point{position:absolute}.block-editor-block-list__insertion-point-indicator{background:var(--wp-admin-theme-color);position:absolute}.block-editor-block-list__insertion-point.is-vertical>.block-editor-block-list__insertion-point-indicator{height:1px;top:50%}.block-editor-block-list__insertion-point.is-horizontal>.block-editor-block-list__insertion-point-indicator{left:0;right:50%;top:0;width:1px}.block-editor-block-list__insertion-point-inserter{display:none;justify-content:center;position:absolute;right:calc(50% - 12px);top:calc(50% - 12px)}@media (min-width:480px){.block-editor-block-list__insertion-point-inserter{display:flex}}.block-editor-block-list__block-popover-inserter{margin-bottom:14px;position:absolute;top:-9999em}.block-editor-block-list__block-popover-inserter.is-visible{position:static}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon{background:#1e1e1e;border-radius:2px;color:#fff;height:24px;min-width:24px;padding:0}.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover{background:var(--wp-admin-theme-color);color:#fff}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon{background:var(--wp-admin-theme-color)}.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button.has-icon:hover{background:#1e1e1e}.block-editor-block-contextual-toolbar{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;display:inline-flex}.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar .block-editor-block-toolbar .components-toolbar-group{border-left-color:#1e1e1e}.block-editor-block-contextual-toolbar.is-fixed{border:none;border-bottom:1px solid #e0e0e0;border-radius:0;display:block;min-height:48px;position:sticky;top:0;width:100%;z-index:31}.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group{border-left-color:#e0e0e0}.block-editor-block-contextual-toolbar .block-editor-block-mover-button{overflow:hidden}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button{min-width:24px;width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button svg{min-width:24px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button:focus:before{min-width:0;right:0!important;width:100%}@media (min-width:600px){.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-up-button svg{top:5px}.block-editor-block-contextual-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover-button.is-down-button svg{bottom:5px}}.block-editor-block-list__block-selection-button{background-color:#1e1e1e;border-radius:2px;display:inline-flex;font-size:13px;height:48px;padding:0 12px;z-index:22}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content{align-items:center;display:inline-flex;margin:auto}.block-editor-block-list__block-selection-button .block-editor-block-list__block-selection-button__content>.components-flex__item{margin-left:6px}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle{cursor:grab;height:24px;margin-right:-2px;min-width:24px;padding:0}.block-editor-block-list__block-selection-button .components-button.has-icon.block-selection-button_drag-handle svg{min-height:18px;min-width:18px}.block-editor-block-list__block-selection-button .block-editor-block-icon{color:#fff;font-size:13px;height:48px}.block-editor-block-list__block-selection-button .components-button{color:#fff;display:flex;height:48px;min-width:36px}.block-editor-block-list__block-selection-button .components-button:focus{border:none;box-shadow:none}.block-editor-block-list__block-selection-button .components-button:active{color:#fff}.block-editor-block-list__block-selection-button .block-selection-button_select-button.components-button{padding:0}.block-editor-block-list__insertion-point-popover.is-without-arrow{pointer-events:none;position:absolute;z-index:28}.block-editor-block-list__insertion-point-popover.is-without-arrow *{pointer-events:none}.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter,.block-editor-block-list__insertion-point-popover.is-without-arrow .is-with-inserter *{pointer-events:all}.block-editor-block-list__insertion-point-popover.is-without-arrow .components-popover__content.components-popover__content{background:none;border:none;box-shadow:none;margin-right:0;overflow-y:visible}@keyframes hide-during-dragging{to{position:fixed;transform:translate(-9999px,9999px)}}.components-popover.block-editor-block-list__block-popover{position:absolute;z-index:31}.components-popover.block-editor-block-list__block-popover .components-popover__content{background:none;border:none;box-shadow:none;margin:0!important;min-width:auto;overflow-y:visible;pointer-events:none;width:max-content}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__empty-block-inserter{pointer-events:all}.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-contextual-toolbar,.components-popover.block-editor-block-list__block-popover .components-popover__content .block-editor-block-list__block-selection-button{margin-bottom:12px;margin-top:12px}.components-popover.block-editor-block-list__block-popover.is-insertion-point-visible{visibility:hidden}.is-dragging-components-draggable .components-popover.block-editor-block-list__block-popover{animation:hide-during-dragging 1ms linear forwards;opacity:0}.is-dragging-components-draggable .components-tooltip{display:none}.is-vertical .block-list-appender{margin-left:auto;margin-right:12px;margin-top:12px;width:24px}.block-list-appender>.block-editor-inserter{display:block}.block-editor-block-list__block:not(.is-selected):not(.has-child-selected):not(.block-editor-block-list__layout) .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle{opacity:0;transform:scale(0)}.block-editor-block-breadcrumb{list-style:none;margin:0;padding:0}.block-editor-block-breadcrumb li{display:inline-flex;margin:0}.block-editor-block-breadcrumb li .block-editor-block-breadcrumb__separator{fill:currentColor;margin-left:-4px;margin-right:-4px;transform:scaleX(-1)}.block-editor-block-breadcrumb li:last-child .block-editor-block-breadcrumb__separator{display:none}.block-editor-block-breadcrumb__button.components-button{height:24px;line-height:24px;padding:0;position:relative}.block-editor-block-breadcrumb__button.components-button:hover:not(:disabled){box-shadow:none;text-decoration:underline}.block-editor-block-breadcrumb__button.components-button:focus{box-shadow:none}.block-editor-block-breadcrumb__button.components-button:focus:before{border-radius:2px;bottom:1px;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:1px;position:absolute;right:1px;top:1px}.block-editor-block-breadcrumb__current{cursor:default}.block-editor-block-breadcrumb__button.components-button,.block-editor-block-breadcrumb__current{color:#1e1e1e;font-size:inherit;padding:0 8px}.block-editor-block-card{align-items:flex-start;display:flex}.block-editor-block-card__content{flex-grow:1;margin-bottom:4px}.block-editor-block-card__title{font-weight:500}.block-editor-block-card__title.block-editor-block-card__title{line-height:24px;margin:0 0 4px}.block-editor-block-card__description{font-size:13px}.block-editor-block-card .block-editor-block-icon{flex:0 0 24px;height:24px;margin-left:12px;margin-right:0;width:24px}.block-editor-block-compare{height:auto}.block-editor-block-compare__wrapper{display:flex;padding-bottom:16px}.block-editor-block-compare__wrapper>div{display:flex;flex-direction:column;justify-content:space-between;max-width:600px;min-width:200px;padding:0 0 0 16px;width:50%}.block-editor-block-compare__wrapper>div button{float:left}.block-editor-block-compare__wrapper .block-editor-block-compare__converted{border-right:1px solid #ddd;padding-left:0;padding-right:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html{border-bottom:1px solid #ddd;color:#1e1e1e;font-family:Menlo,Consolas,monaco,monospace;font-size:12px;line-height:1.7;padding-bottom:15px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span{background-color:#e6ffed;padding-bottom:3px;padding-top:3px}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__added{background-color:#acf2bd}.block-editor-block-compare__wrapper .block-editor-block-compare__html span.block-editor-block-compare__removed{background-color:#cc1818}.block-editor-block-compare__wrapper .block-editor-block-compare__preview{padding:16px 0 0}.block-editor-block-compare__wrapper .block-editor-block-compare__preview p{font-size:12px;margin-top:0}.block-editor-block-compare__wrapper .block-editor-block-compare__action{margin-top:16px}.block-editor-block-compare__wrapper .block-editor-block-compare__heading{font-size:1em;font-weight:400;margin:.67em 0}.block-editor-block-content-overlay.overlay-active:before{background:transparent;border:none;border-radius:2px;content:"";height:100%;pointer-events:none;position:absolute;right:0;top:0;width:100%;z-index:10}.block-editor-block-content-overlay.parent-highlighted.overlay-active:before,.block-editor-block-content-overlay:hover:not(.is-dragging-blocks).overlay-active:before{background:rgba(var(--wp-admin-theme-color--rgb),.1);box-shadow:0 0 0 1px var(--wp-admin-theme-color) inset}.block-editor-block-content-overlay.overlay-active:not(.is-dragging-blocks) *{pointer-events:none}.block-editor-block-content-overlay.is-dragging-blocks{box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.block-editor-block-draggable-chip-wrapper{position:absolute;right:0;top:-24px}.block-editor-block-draggable-chip{background-color:#1e1e1e;border-radius:2px;box-shadow:0 6px 8px rgba(0,0,0,.3);color:#fff;cursor:grabbing;display:inline-flex;height:48px;padding:0 13px;-webkit-user-select:none;user-select:none}.block-editor-block-draggable-chip svg{fill:currentColor}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content{justify-content:flex-start;margin:auto}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item{margin-left:6px}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content>.components-flex__item:last-child{margin-left:0}.block-editor-block-draggable-chip .block-editor-block-draggable-chip__content .block-editor-block-icon svg{min-height:18px;min-width:18px}.block-editor-block-draggable-chip .components-flex__item{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.block-editor-block-list__layout .is-dragging{background-color:currentColor!important;border-radius:2px!important;opacity:.05!important;pointer-events:none!important}.block-editor-block-list__layout .is-dragging::selection{background:transparent!important}.block-editor-block-list__layout .is-dragging:after{content:none!important}.block-editor-block-mobile-toolbar{border-left:1px solid #ddd;display:flex;flex-direction:row}.block-editor-block-mobile-toolbar .block-editor-block-mover-button{align-items:center;border-radius:2px;height:36px;justify-content:center;margin:0;padding:3px;width:36px}.block-editor-block-mobile-toolbar .block-editor-block-mover-button .dashicon{margin:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover{display:flex;margin-left:auto}.block-editor-block-mobile-toolbar .block-editor-block-mover .block-editor-block-mover-button{float:right}.block-editor-block-mover-button__description{display:none}.block-editor-block-mover-button.has-icon{padding:0}.block-editor-block-mover{display:inline-flex;flex-direction:row}.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{border-left:none!important;flex:1;flex-direction:row}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover__move-button-container,.block-editor-block-mover .components-toolbar{flex-direction:column}}.block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container,.block-editor-block-mover.is-horizontal .components-toolbar{flex-direction:row}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:36px;padding-left:0;padding-right:0}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button{height:24px;padding-left:11px!important;padding-right:6px!important;width:42px}.block-editor-block-mover .block-editor-block-mover-button.block-editor-block-mover-button{min-width:42px}}@media (min-width:600px){.block-editor-block-mover .block-editor-block-mover-button:before{left:8px!important;right:8px!important}}.block-editor-block-mover .block-editor-block-mover__drag-handle{cursor:grab;min-width:24px!important;padding:0!important;width:24px}.block-editor-block-mover .block-editor-block-mover__drag-handle:focus:before{left:0!important;right:0!important}@media (min-width:600px){.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button{margin:0 0 0 auto}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-up-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-up-button:before{bottom:0;height:calc(100% - 1px)}.block-editor-block-mover .components-toolbar-group .block-editor-block-mover-button.is-down-button:before,.block-editor-block-mover .components-toolbar .block-editor-block-mover-button.is-down-button:before{height:calc(100% - 1px);top:0}}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon{height:48px;padding-left:0;padding-right:0;width:24px}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.has-icon:before{bottom:1px;height:auto;min-width:0;top:1px;width:auto}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon svg{margin-bottom:0;margin-left:-8px;margin-right:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-up-button.has-icon:before{left:0!important;right:0!important}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon svg{margin-left:0;margin-right:-8px;margin-top:0}.block-editor-block-mover.is-horizontal .block-editor-block-mover-button.is-down-button.has-icon:before{left:0!important;right:0!important;width:calc(100% + 1px)}.block-editor-block-navigation__container{min-width:280px}.block-editor-block-navigation__label{color:#757575;font-size:11px;font-weight:500;margin:0 0 12px;text-transform:uppercase}.block-editor-block-parent-selector{background:#fff;border-radius:2px}.block-editor-block-parent-selector .block-editor-block-parent-selector__button{border:1px solid #1e1e1e;border-radius:2px;height:48px;width:48px}.block-editor-block-patterns-list__list-item{cursor:pointer;margin-bottom:24px}.block-editor-block-patterns-list__list-item.is-placeholder{min-height:100px}.block-editor-block-patterns-list__list-item[draggable=true] .block-editor-block-preview__container{cursor:grab}.block-editor-block-patterns-list__item{height:100%}.block-editor-block-patterns-list__item .block-editor-block-preview__container{align-items:center;border:1px solid #f0f0f0;border-radius:2px;display:flex;overflow:hidden}.block-editor-block-patterns-list__item .block-editor-block-patterns-list__item-title{font-size:12px;padding-top:8px;text-align:center}.block-editor-block-patterns-list__item:hover .block-editor-block-preview__container{border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus .block-editor-block-preview__container{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-patterns-list__item:focus .block-editor-block-patterns-list__item-title,.block-editor-block-patterns-list__item:hover .block-editor-block-patterns-list__item-title{color:var(--wp-admin-theme-color)}.block-editor-block-preview__container{overflow:hidden;position:relative;width:100%}.block-editor-block-preview__container .block-editor-block-preview__content{margin:0;min-height:auto;overflow:visible;right:0;text-align:initial;top:0;transform-origin:top right}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-drop-zone,.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__insertion-point,.block-editor-block-preview__container .block-editor-block-preview__content .block-list-appender,.block-editor-block-preview__container .block-editor-block-preview__content .reusable-block-indicator,.block-editor-block-preview__content-iframe .block-list-appender{display:none}.block-editor-block-preview__live-content *{pointer-events:none}.block-editor-block-preview__live-content .block-list-appender{display:none}.block-editor-block-preview__live-content .components-button:disabled{opacity:1}.block-editor-block-preview__live-content .block-editor-block-list__block[data-empty=true],.block-editor-block-preview__live-content .components-placeholder{display:none}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles+.default-style-picker__default-switcher{margin-top:16px}.block-editor-block-styles__preview-panel{display:none;left:16px;position:absolute;right:auto;z-index:90}@media (min-width:782px){.block-editor-block-styles__preview-panel{display:block}}.block-editor-block-styles__preview-panel .block-editor-inserter__preview-container{left:auto;position:static;right:auto;top:auto}.block-editor-block-styles__preview-panel .block-editor-block-card__title.block-editor-block-card__title{margin:0}.block-editor-block-styles__preview-panel .block-editor-block-icon{display:none}.block-editor-block-styles__variants{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}.block-editor-block-styles__variants .block-editor-block-styles__item{box-shadow:inset 0 0 0 1px #ccc;color:#2f2f2f;display:inline-block;width:calc(50% - 4px)}.block-editor-block-styles__variants .block-editor-block-styles__item:focus,.block-editor-block-styles__variants .block-editor-block-styles__item:hover{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover{background-color:#2f2f2f;box-shadow:none}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active .block-editor-block-styles__item-text,.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover .block-editor-block-styles__item-text{color:#fff}.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 2px var(--wp-admin-theme-color)}.block-editor-block-styles__block-preview-container,.block-editor-block-styles__block-preview-container *{box-sizing:border-box!important}.block-editor-block-switcher,.block-editor-block-switcher__no-switcher-icon,.block-editor-block-switcher__toggle{position:relative}.components-button.block-editor-block-switcher__no-switcher-icon,.components-button.block-editor-block-switcher__toggle{display:block;height:48px;margin:0}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.components-button.block-editor-block-switcher__toggle .block-editor-block-icon{margin:auto}.block-editor-block-switcher__toggle-text{margin-right:8px}.show-icon-labels .block-editor-block-switcher__toggle-text{display:none}.show-icon-labels .block-editor-block-toolbar .block-editor-block-switcher .components-button.has-icon:after{font-size:14px}.block-editor-block-switcher__popover{margin-right:6px}.components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.components-button.block-editor-block-switcher__no-switcher-icon .block-editor-blocks-icon{margin-left:auto;margin-right:auto}.components-button.block-editor-block-switcher__no-switcher-icon:disabled{opacity:1}.components-button.block-editor-block-switcher__no-switcher-icon:disabled,.components-button.block-editor-block-switcher__no-switcher-icon:disabled .block-editor-block-icon.has-colors{color:#1e1e1e}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon .block-editor-block-icon,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon .block-editor-block-icon{align-items:center;display:flex;height:100%;margin:0 auto;min-width:100%;position:relative}.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar-group .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__no-switcher-icon.has-icon.has-icon:before,.block-editor-block-toolbar .components-toolbar .components-button.block-editor-block-switcher__toggle.has-icon.has-icon:before{bottom:8px;left:8px;right:8px;top:8px}.components-popover.block-editor-block-switcher__popover .components-popover__content{min-width:300px}.components-popover.block-editor-block-switcher__popover .components-popover__content>div{background:#fff;display:flex;min-width:auto;padding:0}.components-popover.block-editor-block-switcher__popover .components-popover__content>div .components-menu-group{margin:0}.block-editor-block-switcher__popover .components-popover__content .block-editor-block-styles{margin:0 -3px}.block-editor-block-switcher__popover .components-popover__content .components-panel__body{border:0;position:relative;z-index:1}.block-editor-block-switcher__popover .components-popover__content .components-panel__body+.components-panel__body{border-top:1px solid #e0e0e0}.block-editor-block-switcher__popover__preview__parent .block-editor-block-switcher__popover__preview__container{position:absolute;right:calc(100% + 32px);top:-12px}.block-editor-block-switcher__preview__popover{display:none}.block-editor-block-switcher__preview__popover.components-popover{margin-right:4px;margin-top:11px}@media (min-width:782px){.block-editor-block-switcher__preview__popover{display:block}}.block-editor-block-switcher__preview__popover .components-popover__content{background:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:none}.block-editor-block-switcher__preview__popover .block-editor-block-switcher__preview{height:auto;max-height:500px;padding:16px;width:300px}.block-editor-block-switcher__preview-title{color:#757575;font-size:11px;font-weight:500;margin-bottom:12px;text-transform:uppercase}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon{width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle{height:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-icon,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{height:48px;width:48px}.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__no-switcher-icon .block-editor-block-switcher__transform,.block-editor-block-contextual-toolbar .components-button.block-editor-block-switcher__toggle .block-editor-block-switcher__transform{padding:12px}.block-editor-block-switcher__preview-patterns-container{padding-bottom:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item{margin-top:16px}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-preview__container{cursor:pointer}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item{border:1px solid transparent;border-radius:2px;height:100%;position:relative;transition:all .05s ease-in-out}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:focus,.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item:hover{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) #1e1e1e}.block-editor-block-switcher__preview-patterns-container .block-editor-block-switcher__preview-patterns-container-list__list-item .block-editor-block-switcher__preview-patterns-container-list__item .block-editor-block-switcher__preview-patterns-container-list__item-title{cursor:pointer;font-size:12px;padding:4px;text-align:center}.block-editor-block-types-list>[role=presentation]{display:flex;flex-wrap:wrap;overflow:hidden}.block-editor-block-variation-picker .components-placeholder__instructions{margin-bottom:0}.block-editor-block-variation-picker .components-placeholder__fieldset{flex-direction:column}.block-editor-block-variation-picker.has-many-variations .components-placeholder__fieldset{max-width:90%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0;padding:0;width:100%}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li{flex-shrink:1;list-style:none;margin:8px 0 0 20px;text-align:center;width:75px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations>li button{display:inline-flex;margin-left:0}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation{padding:8px}.block-editor-block-variation-picker__variations.block-editor-block-variation-picker__variations .block-editor-block-variation-picker__variation-label{display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;line-height:1.4}.block-editor-block-variation-picker__variation{width:100%}.block-editor-block-variation-picker__variation.components-button.has-icon{justify-content:center;width:auto}.block-editor-block-variation-picker__variation.components-button.has-icon.is-secondary{background-color:#fff}.block-editor-block-variation-picker__variation.components-button{height:auto;padding:0}.block-editor-block-variation-picker__variation:before{content:"";padding-bottom:100%}.block-editor-block-variation-picker__variation:first-child{margin-right:0}.block-editor-block-variation-picker__variation:last-child{margin-left:0}.block-editor-block-pattern-setup{align-items:flex-start;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;display:flex;flex-direction:column;justify-content:center;outline:1px solid transparent;width:100%}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__toolbar{justify-content:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container{grid-gap:16px;background:#fff;display:grid;grid-template-columns:1fr 1fr;margin:0 1px 1px;max-height:550px;overflow:auto;padding:16px;width:calc(100% - 2px)}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container,.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container div[role=button]{cursor:pointer}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-pattern-setup-list__item-title{font-size:12px;padding:4px;text-align:center}.block-editor-block-pattern-setup.view-mode-grid .block-editor-block-pattern-setup__container .block-editor-block-preview__container{border:1px solid #ddd;border-radius:2px}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar{align-items:center;background-color:#fff;border-radius:2px 2px 0 0;box-shadow:inset 0 0 0 1px #1e1e1e;box-sizing:border-box;color:#1e1e1e;display:flex;flex-direction:row;justify-content:space-between;margin:0;outline:1px solid transparent;padding:16px;position:relative;text-align:right;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__display-controls{display:flex}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions,.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__navigation{display:flex;width:calc(50% - 36px)}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__toolbar .block-editor-block-pattern-setup__actions{justify-content:flex-end}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container{box-sizing:border-box;display:flex;flex-direction:column;width:100%}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container{list-style:none;margin:0;overflow:hidden;padding:0;position:relative;transform-style:preserve-3d}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container *{box-sizing:border-box}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide{margin:auto;opacity:0;padding:16px;position:absolute;top:0;transition:transform .5s,opacity .5s,z-index .5s;width:100%;z-index:100}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.active-slide{opacity:1;position:relative;z-index:102}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.previous-slide{transform:translateX(100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .carousel-container .pattern-slide.next-slide{transform:translateX(-100%);z-index:101}.block-editor-block-pattern-setup .block-editor-block-pattern-setup__container .block-list-appender{display:none}.block-editor-block-variation-transforms{padding:0 56px 16px 16px;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle{border:1px solid #757575;border-radius:2px;justify-content:left;min-height:30px;padding:6px 12px;position:relative;text-align:right;width:100%}.block-editor-block-variation-transforms .components-dropdown-menu__toggle.components-dropdown-menu__toggle{padding-left:24px}.block-editor-block-variation-transforms .components-dropdown-menu__toggle:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 calc(var(--wp-admin-border-width-focus) - 1px) var(--wp-admin-theme-color)}.block-editor-block-variation-transforms .components-dropdown-menu__toggle svg{height:100%;left:0;padding:0;position:absolute;top:0}.block-editor-block-variation-transforms__popover .components-popover__content{min-width:230px}.components-border-radius-control{margin-bottom:12px}.components-border-radius-control legend{padding-bottom:4px}.components-border-radius-control .components-border-radius-control__wrapper{align-items:flex-start;display:flex;justify-content:space-between}.components-border-radius-control .components-border-radius-control__wrapper>.components-unit-control-wrapper{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control{margin-bottom:0;width:calc(50% - 26px)}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-base-control__field{height:30px;margin-bottom:0}.components-border-radius-control .components-border-radius-control__wrapper .components-range-control .components-range-control__wrapper{margin-left:10px}.components-border-radius-control .components-border-radius-control__wrapper>span{flex:0 0 auto}.components-border-radius-control .components-border-radius-control__input-controls-wrapper{display:flex;flex-wrap:wrap;width:70%}.components-border-radius-control .components-border-radius-control__input-controls-wrapper .components-unit-control-wrapper{margin-bottom:8px;margin-left:8px;width:calc(50% - 8px)}.components-border-radius-control .component-border-radius-control__linked-button.has-icon{display:flex;justify-content:center}.components-border-radius-control .component-border-radius-control__linked-button.has-icon svg{margin-left:0}.components-border-style-control legend{line-height:1.4;margin-bottom:8px;padding:0}.components-border-style-control .components-border-style-control__buttons{display:inline-flex}.components-border-style-control .components-border-style-control__buttons .components-button.has-icon{height:30px;margin-left:4px;min-width:30px;padding:3px}.block-editor-button-block-appender{align-items:center;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;display:flex;flex-direction:column;height:auto;justify-content:center;padding:8px;width:100%}.is-dark-theme .block-editor-button-block-appender{box-shadow:inset 0 0 0 1px hsla(0,0%,100%,.65);color:hsla(0,0%,100%,.65)}.block-editor-button-block-appender:hover{box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)}.block-editor-button-block-appender:focus{box-shadow:inset 0 0 0 2px var(--wp-admin-theme-color)}.block-editor-button-block-appender:active{color:#000}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title{display:flex;gap:12px}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{align-self:center;height:12px;width:12px}.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}@media screen and (min-width:782px){.block-editor-panel-color-gradient-settings .components-circular-option-picker__swatches{display:grid;grid-template-columns:repeat(6,28px);justify-content:space-between}}.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control{margin-bottom:inherit}.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__dropdown{display:block}.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content>div{width:280px}@media (min-width:782px){.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content{margin-left:156px!important;margin-top:-60px!important}}.block-editor-panel-color-gradient-settings__dropdown:last-child>div{border-bottom-width:0}.block-editor-panel-color-gradient-settings__item{padding-bottom:12px!important;padding-top:12px!important}.block-editor-panel-color-gradient-settings__item .block-editor-panel-color-gradient-settings__color-indicator{background:linear-gradient(45deg,transparent 48%,#ddd 0,#ddd 52%,transparent 0)}.block-editor-panel-color-gradient-settings__item.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.block-editor-contrast-checker>.components-notice{margin:0}.block-editor-default-block-appender{clear:both;margin-left:auto;margin-right:auto;position:relative}.block-editor-default-block-appender[data-root-client-id=""] .block-editor-default-block-appender__content:hover{outline:1px solid transparent}.block-editor-default-block-appender .block-editor-default-block-appender__content{opacity:.62}.block-editor-default-block-appender .components-drop-zone__content-icon{display:none}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{left:0;line-height:0;position:absolute;top:0}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter:disabled,.block-editor-default-block-appender .block-editor-inserter:disabled{display:none}.block-editor-block-list__block .block-list-appender{bottom:0;left:0;list-style:none;padding:0;position:absolute;z-index:2}.block-editor-block-list__block .block-list-appender.block-list-appender{line-height:0;margin:0}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender{height:24px}.block-editor-block-list__block .block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{background:#1e1e1e;box-shadow:none;color:#fff;display:none;flex-direction:row;height:24px;padding:0!important;width:24px}.block-editor-block-list__block .block-list-appender .block-editor-inserter__toggle.components-button.has-icon:hover,.block-editor-block-list__block .block-list-appender .block-list-appender__toggle:hover{background:var(--wp-admin-theme-color);color:#fff}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender__content{display:none}.block-editor-block-list__block .block-list-appender:only-child{align-self:center;left:auto;line-height:inherit;list-style:none;position:relative}.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content{display:block}.block-editor-block-list__block.is-selected .block-editor-block-list__layout>.block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block.is-selected .block-editor-block-list__layout>.block-list-appender .block-list-appender__toggle,.block-editor-block-list__block.is-selected>.block-list-appender .block-editor-inserter__toggle.components-button.has-icon,.block-editor-block-list__block.is-selected>.block-list-appender .block-list-appender__toggle{display:flex}.block-editor-default-block-appender__content{cursor:text}.block-editor-duotone-control__popover>.components-popover__content>div{padding:16px;width:280px}.block-editor-duotone-control__popover .components-menu-group__label{padding:0}.block-editor-duotone-control__popover .components-custom-gradient-picker__gradient-bar{margin:16px 0 12px}.block-editor-duotone-control__popover .components-circular-option-picker__swatches{display:grid;gap:12px;grid-template-columns:repeat(6,28px);justify-content:space-between}.block-editor-duotone-control__description{font-size:12px;margin:16px 0}.block-editor-duotone-control__popover:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{margin-right:-14px}.components-font-appearance-control{margin-bottom:24px}.components-font-appearance-control ul li{color:#1e1e1e;text-transform:capitalize}.block-editor-image-size-control{margin-bottom:1em}.block-editor-image-size-control .block-editor-image-size-control__row{display:flex;justify-content:space-between}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-bottom:.5em}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input,.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input{line-height:1.25}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width{margin-left:5px}.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height{margin-right:5px}.block-editor-block-list__layout.has-overlay:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:60}.block-editor-block-types-list__list-item{display:block;margin:0;padding:0;width:33.33%}.components-button.block-editor-block-types-list__item{align-items:stretch;background:transparent;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;flex-direction:column;font-size:13px;height:auto;justify-content:center;padding:8px;position:relative;transition:all .05s ease-in-out;width:100%;word-break:break-word}@media (prefers-reduced-motion:reduce){.components-button.block-editor-block-types-list__item{transition-delay:0s;transition-duration:0s}}.components-button.block-editor-block-types-list__item:disabled{cursor:default;opacity:.6}.components-button.block-editor-block-types-list__item:not(:disabled):hover{color:var(--wp-admin-theme-color)!important}.components-button.block-editor-block-types-list__item:not(:disabled):focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-button.block-editor-block-types-list__item:not(:disabled).is-active{background:#1e1e1e;color:#fff;outline:2px solid transparent;outline-offset:-2px}.block-editor-block-types-list__item-icon{border-radius:2px;color:#1e1e1e;padding:12px 20px;transition:all .05s ease-in-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon{transition-delay:0s;transition-duration:0s}}.block-editor-block-types-list__item-icon .block-editor-block-icon{margin-left:auto;margin-right:auto}.block-editor-block-types-list__item-icon svg{transition:all .15s ease-out}@media (prefers-reduced-motion:reduce){.block-editor-block-types-list__item-icon svg{transition-delay:0s;transition-duration:0s}}.block-editor-block-types-list__list-item[draggable=true] .block-editor-block-types-list__item-icon{cursor:grab}.block-editor-block-types-list__item-title{font-size:12px;padding:4px 2px 8px}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.block-editor-line-height-control{margin-bottom:24px}.block-editor-line-height-control input{display:block;max-width:60px}@keyframes loadingpulse{0%{opacity:1}50%{opacity:0}to{opacity:1}}.block-editor-link-control{min-width:360px;position:relative}.components-popover__content .block-editor-link-control{max-width:360px;min-width:auto;width:90vw}.block-editor-link-control__search-input-container,.block-editor-link-control__search-input-wrapper{position:relative}.block-editor-link-control__search-input.has-no-label .block-editor-url-input__input{flex:1}.block-editor-link-control__field{margin:16px}.block-editor-link-control__field>.components-base-control__field{align-items:center;display:flex;margin:0}.block-editor-link-control__field .components-base-control__label{margin-bottom:0;margin-left:16px}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{border:1px solid #ddd;border-radius:2px;box-shadow:0 0 0 transparent;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin:0;padding:11px 16px 11px 36px;position:relative;transition:box-shadow .1s linear;width:calc(100% - 32px)}@media (prefers-reduced-motion:reduce){.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input,.block-editor-link-control__field input[type=text]{font-size:13px;line-height:normal}}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input:focus,.block-editor-link-control__field input[type=text]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input::-webkit-input-placeholder,.block-editor-link-control__field input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input::-moz-placeholder,.block-editor-link-control__field input[type=text]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.block-editor-link-control__field.block-editor-url-input input[type=text].block-editor-url-input__input:-ms-input-placeholder,.block-editor-link-control__field input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control__search-error{margin:-8px 16px 16px}.block-editor-link-control__search-actions{left:19px;position:absolute;top:3px}.components-button .block-editor-link-control__search-submit .has-icon{margin:-1px}.block-editor-link-control__search-results-wrapper{margin-top:-15px;position:relative}.block-editor-link-control__search-results-wrapper:after,.block-editor-link-control__search-results-wrapper:before{content:"";display:block;left:16px;pointer-events:none;position:absolute;right:-1px;z-index:100}.block-editor-link-control__search-results-wrapper:before{bottom:auto;height:8px;top:0}.block-editor-link-control__search-results-wrapper:after{bottom:0;height:16px;top:auto}.block-editor-link-control__search-results-label{display:block;font-weight:600;padding:16px 32px 0}.block-editor-link-control__search-results{margin:0;max-height:200px;overflow-y:auto;padding:8px 16px}.block-editor-link-control__search-results.is-loading{opacity:.2}.block-editor-link-control__search-item{align-items:flex-start;background:#fff;border:none;border-radius:2px;cursor:pointer;display:flex;font-size:13px;height:auto;padding:12px 16px;position:relative;text-align:right;width:100%}.block-editor-link-control__search-item:focus,.block-editor-link-control__search-item:hover{background-color:#f0f0f0}.block-editor-link-control__search-item:focus .block-editor-link-control__search-item-type,.block-editor-link-control__search-item:hover .block-editor-link-control__search-item-type{background:#fff}.block-editor-link-control__search-item:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color) inset}.block-editor-link-control__search-item.is-selected{background:#f0f0f0}.block-editor-link-control__search-item.is-selected .block-editor-link-control__search-item-type{background:#fff}.block-editor-link-control__search-item.is-current{background:transparent;border:0;cursor:default;flex-direction:column;padding:16px;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-header{align-items:flex-start;display:block;flex-direction:row;margin-left:8px;overflow-wrap:break-word;white-space:pre-wrap}.block-editor-link-control__search-item .block-editor-link-control__search-item-header .block-editor-link-control__search-item-info{word-break:break-all}.block-editor-link-control__search-item.is-preview .block-editor-link-control__search-item-header{display:flex;flex:1}.block-editor-link-control__search-item.is-error .block-editor-link-control__search-item-header{align-items:center}.block-editor-link-control__search-item .block-editor-link-control__search-item-icon{display:flex;flex-shrink:0;justify-content:center;margin-left:8px;max-height:24px;position:relative;top:.2em;width:24px}.block-editor-link-control__search-item .block-editor-link-control__search-item-icon img{width:16px}.block-editor-link-control__search-item.is-error .block-editor-link-control__search-item-icon{max-height:32px;top:0;width:32px}.block-editor-link-control__search-item .block-editor-link-control__search-item-info,.block-editor-link-control__search-item .block-editor-link-control__search-item-title{overflow:hidden;text-overflow:ellipsis}.block-editor-link-control__search-item .block-editor-link-control__search-item-info .components-external-link__icon,.block-editor-link-control__search-item .block-editor-link-control__search-item-title .components-external-link__icon{left:0;margin-top:0;position:absolute}.block-editor-link-control__search-item .block-editor-link-control__search-item-title{display:block;font-weight:500;margin-bottom:.2em;position:relative}.block-editor-link-control__search-item .block-editor-link-control__search-item-title mark{background-color:transparent;color:inherit;font-weight:700}.block-editor-link-control__search-item .block-editor-link-control__search-item-title span{font-weight:400}.block-editor-link-control__search-item .block-editor-link-control__search-item-title svg{display:none}.block-editor-link-control__search-item .block-editor-link-control__search-item-info{color:#757575;display:block;font-size:.9em;line-height:1.3}.block-editor-link-control__search-item .block-editor-link-control__search-item-error-notice{font-size:1.1em;font-style:italic}.block-editor-link-control__search-item .block-editor-link-control__search-item-type{background-color:#f0f0f0;border-radius:2px;display:block;font-size:.9em;margin-right:auto;padding:3px 6px}.block-editor-link-control__search-item .block-editor-link-control__search-item-description{margin:0;padding-top:12px}.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder{display:flex;flex-direction:column;height:28px;justify-content:space-around;margin-top:12px;padding-top:0}.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder:after,.block-editor-link-control__search-item .block-editor-link-control__search-item-description.is-placeholder:before{background-color:#f0f0f0;border-radius:3px;content:"";display:block;height:.7em;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-description .components-text{font-size:.9em}.block-editor-link-control__search-item .block-editor-link-control__search-item-image{background-color:#f0f0f0;border-radius:2px;display:flex;height:140px;justify-content:center;margin-top:12px;max-height:140px;overflow:hidden;width:100%}.block-editor-link-control__search-item .block-editor-link-control__search-item-image.is-placeholder{background-color:#f0f0f0;border-radius:3px}.block-editor-link-control__search-item .block-editor-link-control__search-item-image img{display:block;height:140px;max-height:140px;max-width:100%}.block-editor-link-control__search-item-top{display:flex;flex-direction:row;width:100%}.block-editor-link-control__search-item-bottom{transition:opacity 1.5s;width:100%}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-description:after,.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-description:before{animation:loadingpulse 1s linear infinite;animation-delay:.5s}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-image{animation:loadingpulse 1s linear infinite;animation-delay:.5s}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon img,.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon svg{opacity:0}.block-editor-link-control__search-item.is-fetching .block-editor-link-control__search-item-icon:before{animation:loadingpulse 1s linear infinite;animation-delay:.5s;background-color:#f0f0f0;border-radius:100%;bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.block-editor-link-control__loading{align-items:center;display:flex;margin:16px}.block-editor-link-control__loading .components-spinner{margin-top:0}.components-button+.block-editor-link-control__search-create{overflow:visible;padding:12px 16px}.components-button+.block-editor-link-control__search-create:before{content:"";display:block;position:absolute;right:0;top:-10px;width:100%}.block-editor-link-control__search-create{align-items:center}.block-editor-link-control__search-create .block-editor-link-control__search-item-title{margin-bottom:0}.block-editor-link-control__search-create .block-editor-link-control__search-item-icon{top:0}.block-editor-link-control__search-results div[role=menu]>.block-editor-link-control__search-item.block-editor-link-control__search-item{padding:10px}.block-editor-link-control__tools{align-items:center;border-top:1px solid #ddd;display:flex;margin:0;padding:16px}.block-editor-link-control__unlink{padding-left:16px;padding-right:16px}.block-editor-link-control__settings{flex:1;margin:0}.block-editor-link-control__settings :last-child{margin-bottom:0}.is-alternate .block-editor-link-control__settings{border-top:1px solid #1e1e1e}.block-editor-link-control__setting{margin-bottom:16px}.block-editor-link-control__setting :last-child{margin-bottom:0}.block-editor-link-control .block-editor-link-control__search-input .components-spinner{display:block}.block-editor-link-control .block-editor-link-control__search-input .components-spinner.components-spinner{bottom:auto;left:62px;position:absolute;right:auto;top:28px}.block-editor-link-control__search-item-action{flex-shrink:0;margin-right:auto}.block-editor-list-view-tree{border-collapse:collapse;margin:0;padding:0;width:100%}.components-modal__content .block-editor-list-view-tree{margin:-12px -6px 0;width:calc(100% + 12px)}.block-editor-list-view-leaf{position:relative}.block-editor-list-view-leaf.is-selected{background:var(--wp-admin-theme-color)}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents,.block-editor-list-view-leaf.is-selected .components-button.has-icon{color:#fff}.is-dragging-components-draggable .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents{background:none;color:#1e1e1e}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents:focus:after{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block__menu:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #fff}.block-editor-list-view-leaf.is-branch-selected:not(.is-selected){background:linear-gradient(hsla(0,0%,100%,.9),hsla(0,0%,100%,.9)),linear-gradient(var(--wp-admin-theme-color),var(--wp-admin-theme-color))}.block-editor-list-view-leaf.is-branch-selected.is-selected .block-editor-list-view-block-contents{border-radius:2px 2px 0 0}.block-editor-list-view-leaf[aria-expanded=false].is-branch-selected.is-selected .block-editor-list-view-block-contents{border-radius:2px}.block-editor-list-view-leaf.is-branch-selected:not(.is-selected) .block-editor-list-view-block-contents{border-radius:0}.block-editor-list-view-leaf.is-dragging{display:none}.block-editor-list-view-leaf .block-editor-list-view-block-contents{align-items:center;border-radius:2px;color:#1e1e1e;display:flex;height:auto;padding:6px 0 6px 12px;position:relative;text-align:right;white-space:nowrap;width:100%}.block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before:before{border-top:4px solid var(--wp-admin-theme-color);content:"";left:0;pointer-events:none;position:absolute;right:0;top:-2px;transition:border-color .1s linear,border-style .1s linear,box-shadow .1s linear}.components-modal__content .block-editor-list-view-leaf .block-editor-list-view-block-contents{padding-left:0;padding-right:0}.block-editor-list-view-leaf .block-editor-list-view-block-contents:focus{box-shadow:none}.block-editor-list-view-leaf .block-editor-list-view-block-contents:focus:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";left:-29px;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block-contents:focus:after{box-shadow:none}.block-editor-list-view-leaf.has-single-cell .block-editor-list-view-block-contents:focus:after{left:0}.block-editor-list-view-leaf .block-editor-list-view-block__menu:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);z-index:1}.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block__menu:focus{box-shadow:none}.block-editor-list-view-leaf.is-visible .block-editor-list-view-block-contents{animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards;opacity:1}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf.is-visible .block-editor-list-view-block-contents{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-block-icon{align-self:flex-start;margin-left:8px;width:24px}.block-editor-list-view-leaf .block-editor-list-view-block__contents-cell,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{padding-bottom:0;padding-top:0}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{line-height:0;opacity:0;vertical-align:middle;width:36px}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover{animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards;opacity:1;position:relative;z-index:1}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell:hover,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell.is-visible,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell:hover{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell,.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell,.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell .components-button.has-icon{min-width:24px;padding:0;width:24px}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell{padding-left:5px}.block-editor-list-view-leaf .block-editor-list-view-block__menu-cell .components-button.has-icon{height:24px}.block-editor-list-view-leaf .block-editor-list-view-block__mover-cell-alignment-wrapper{align-items:center;display:flex;flex-direction:column;height:100%}.block-editor-list-view-leaf .block-editor-block-mover-button{height:24px;position:relative;width:36px}.block-editor-list-view-leaf .block-editor-block-mover-button svg{height:24px;position:relative}.block-editor-list-view-leaf .block-editor-block-mover-button.is-up-button{align-items:flex-end;margin-top:-6px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-up-button svg{bottom:-4px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button{align-items:flex-start;margin-bottom:-6px}.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg{top:-4px}.block-editor-list-view-leaf .block-editor-block-mover-button:focus:enabled{box-shadow:none;outline:none}.block-editor-list-view-leaf .block-editor-block-mover-button:focus{box-shadow:none;outline:none}.block-editor-list-view-leaf .block-editor-block-mover-button:focus:before{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-list-view-leaf .block-editor-block-mover-button:before{animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards;border-radius:2px;content:"";display:block;height:16px;left:0;min-width:100%;position:absolute;right:0}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf .block-editor-block-mover-button:before{animation-delay:0s;animation-duration:1ms}}.block-editor-list-view-leaf .block-editor-inserter__toggle{background:#1e1e1e;color:#fff;height:24px;margin:6px 1px 6px 6px;min-width:24px}.block-editor-list-view-leaf .block-editor-inserter__toggle:active{color:#fff}.block-editor-list-view-leaf .block-editor-list-view-block-select-button__anchor{background:rgba(0,0,0,.1);border-radius:2px;display:inline-block;margin:0 8px;max-width:120px;overflow:hidden;padding:2px 6px;text-overflow:ellipsis}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-select-button__anchor{background:rgba(0,0,0,.3)}.block-editor-list-view-appender__description,.block-editor-list-view-block-select-button__description{display:none}.block-editor-list-view-appender__cell .block-editor-list-view-appender__container,.block-editor-list-view-appender__cell .block-editor-list-view-block__contents-container,.block-editor-list-view-block__contents-cell .block-editor-list-view-appender__container,.block-editor-list-view-block__contents-cell .block-editor-list-view-block__contents-container{display:flex}.block-editor-list-view__expander{height:24px;margin-right:4px;width:24px}.block-editor-list-view-leaf[aria-level] .block-editor-list-view__expander{margin-right:220px}.block-editor-list-view-leaf:not([aria-level="1"]) .block-editor-list-view__expander{margin-left:4px}.block-editor-list-view-leaf[aria-level="1"] .block-editor-list-view__expander{margin-right:0}.block-editor-list-view-leaf[aria-level="2"] .block-editor-list-view__expander{margin-right:24px}.block-editor-list-view-leaf[aria-level="3"] .block-editor-list-view__expander{margin-right:52px}.block-editor-list-view-leaf[aria-level="4"] .block-editor-list-view__expander{margin-right:80px}.block-editor-list-view-leaf[aria-level="5"] .block-editor-list-view__expander{margin-right:108px}.block-editor-list-view-leaf[aria-level="6"] .block-editor-list-view__expander{margin-right:136px}.block-editor-list-view-leaf[aria-level="7"] .block-editor-list-view__expander{margin-right:164px}.block-editor-list-view-leaf[aria-level="8"] .block-editor-list-view__expander{margin-right:192px}.block-editor-list-view-leaf .block-editor-list-view__expander{visibility:hidden}.block-editor-list-view-leaf[aria-expanded=true] .block-editor-list-view__expander svg{transform:rotate(-90deg);transition:transform .2s ease;visibility:visible}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf[aria-expanded=true] .block-editor-list-view__expander svg{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-leaf[aria-expanded=false] .block-editor-list-view__expander svg{transform:rotate(0deg);transition:transform .2s ease;visibility:visible}@media (prefers-reduced-motion:reduce){.block-editor-list-view-leaf[aria-expanded=false] .block-editor-list-view__expander svg{transition-delay:0s;transition-duration:0s}}.block-editor-list-view-drop-indicator{pointer-events:none}.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line{background:var(--wp-admin-theme-color);height:1px}.block-editor-list-view-drop-indicator:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{border:none;box-shadow:none;margin-right:0}.block-editor-list-view-placeholder{height:36px;margin:0;padding:0}.modal-open .block-editor-media-replace-flow__options{display:none}.block-editor-media-replace-flow__indicator{margin-right:4px}.block-editor-media-flow__url-input{border-top:1px solid #1e1e1e;margin-left:-8px;margin-right:-8px;margin-top:8px;padding:16px}.block-editor-media-flow__url-input .block-editor-media-replace-flow__image-url-label{display:block;margin-bottom:8px;top:16px}.block-editor-media-flow__url-input .block-editor-link-control{width:220px}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-url-input{padding:0}.block-editor-media-flow__url-input .block-editor-link-control .components-base-control .components-base-control__field{margin-bottom:0}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item-title{max-width:180px;white-space:nowrap}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item-info{white-space:nowrap}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-item.is-current{padding:0;width:auto}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{margin:0;width:100%}.block-editor-media-flow__url-input .block-editor-link-control .block-editor-link-control__search-actions{left:4px;top:0}.block-editor-media-flow__error{max-width:255px;padding:0 20px 20px}.block-editor-media-flow__error .components-with-notices-ui{max-width:255px}.block-editor-media-flow__error .components-with-notices-ui .components-notice__content{word-wrap:break-word;overflow:hidden}.block-editor-media-flow__error .components-with-notices-ui .components-notice__dismiss{left:10px;position:absolute}.block-editor-media-placeholder__url-input-container .block-editor-media-placeholder__button{margin-bottom:0}.block-editor-media-placeholder__url-input-form{display:flex}.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{border:none;border-radius:0;flex-grow:1;margin:2px;min-width:200px;width:100%}@media (min-width:600px){.block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field{width:300px}}.block-editor-media-placeholder__url-input-submit-button{flex-shrink:1}.block-editor-media-placeholder__button{margin-bottom:.5rem}.block-editor-media-placeholder__cancel-button.is-link{display:block;margin:1em}.block-editor-media-placeholder.is-appender{min-height:0}.block-editor-media-placeholder.is-appender:hover{box-shadow:0 0 0 1px var(--wp-admin-theme-color);cursor:pointer}.block-editor-multi-selection-inspector__card{align-items:flex-start;display:flex;padding:16px}.block-editor-multi-selection-inspector__card-content{flex-grow:1}.block-editor-multi-selection-inspector__card-title{font-weight:500;margin-bottom:5px}.block-editor-multi-selection-inspector__card-description{font-size:13px}.block-editor-multi-selection-inspector__card .block-editor-block-icon{height:24px;margin-left:10px;margin-right:-2px;padding:0 3px;width:36px}.block-editor-plain-text{border:none;box-shadow:none;color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0;width:100%}.block-editor-responsive-block-control{border-bottom:1px solid #ccc;margin-bottom:28px;padding-bottom:14px}.block-editor-responsive-block-control:last-child{border-bottom:0;padding-bottom:0}.block-editor-responsive-block-control__title{margin:0 -3px .6em 0}.block-editor-responsive-block-control__label{font-weight:600;margin-bottom:.6em;margin-right:-3px}.block-editor-responsive-block-control__inner{margin-right:-1px}.block-editor-responsive-block-control__toggle{margin-right:1px}.block-editor-responsive-block-control .components-base-control__help{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.rich-text [data-rich-text-placeholder]{pointer-events:none}.rich-text [data-rich-text-placeholder]:after{content:attr(data-rich-text-placeholder);opacity:.62}.rich-text:focus{outline:none}.rich-text:focus [data-rich-text-format-boundary]{border-radius:2px}.block-editor-rich-text__editable>p:first-child{margin-top:0}figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]:before{opacity:.8}.components-popover.block-editor-rich-text__inline-format-toolbar{z-index:99998}.components-popover.block-editor-rich-text__inline-format-toolbar .components-popover__content{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:none;margin-bottom:8px;min-width:auto;width:auto}.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar-group{border:none}.components-popover.block-editor-rich-text__inline-format-toolbar .components-dropdown-menu__toggle,.components-popover.block-editor-rich-text__inline-format-toolbar .components-toolbar__control{min-height:48px;min-width:48px;padding-left:12px;padding-right:12px}.block-editor-rich-text__inline-format-toolbar-group .components-dropdown-menu__toggle{justify-content:center}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon{width:auto}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon svg{display:none}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button.has-icon:after{content:attr(aria-label)}[data-rich-text-script]{display:inline}[data-rich-text-script]:before{background:#ff0;content:"</>"}.block-editor-skip-to-selected-block{position:absolute;top:-9999em}.block-editor-skip-to-selected-block:focus{background:#f1f1f1;box-shadow:0 0 2px 2px rgba(0,0,0,.6);color:var(--wp-admin-theme-color);display:block;font-size:14px;font-weight:600;height:auto;line-height:normal;outline:none;padding:15px 23px 14px;text-decoration:none;width:auto;z-index:100000}.block-editor-text-transform-control{flex:0 0 50%}.block-editor-text-transform-control legend{margin-bottom:8px}.block-editor-text-transform-control .block-editor-text-transform-control__buttons{display:inline-flex;margin-bottom:24px}.block-editor-text-transform-control .block-editor-text-transform-control__buttons .components-button.has-icon{margin-left:4px;min-width:24px;padding:0}.block-editor-text-decoration-control{flex:0 0 50%}.block-editor-text-decoration-control legend{margin-bottom:8px}.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons{display:inline-flex;margin-bottom:24px}.block-editor-text-decoration-control .block-editor-text-decoration-control__buttons .components-button.has-icon{margin-left:4px;min-width:24px;padding:0}.block-editor-tool-selector__help{border-top:1px solid #ddd;color:#757575;margin:8px -8px -8px;min-width:280px;padding:16px}.block-editor-block-list__block .block-editor-url-input,.block-editor-url-input,.components-popover .block-editor-url-input{flex-grow:1;padding:1px;position:relative}.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{border:none;border-radius:0;font-size:16px;margin-left:0;margin-right:0;padding:8px 12px 8px 8px;width:100%}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{width:300px}}@media (min-width:600px){.block-editor-block-list__block .block-editor-url-input input[type=text],.block-editor-url-input input[type=text],.components-popover .block-editor-url-input input[type=text]{font-size:13px}}.block-editor-block-list__block .block-editor-url-input input[type=text]::-ms-clear,.block-editor-url-input input[type=text]::-ms-clear,.components-popover .block-editor-url-input input[type=text]::-ms-clear{display:none}.block-editor-block-list__block .block-editor-url-input.is-full-width,.block-editor-url-input.is-full-width,.components-popover .block-editor-url-input.is-full-width{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.components-popover .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text]{width:100%}.block-editor-block-list__block .block-editor-url-input.is-full-width__suggestions,.block-editor-url-input.is-full-width__suggestions,.components-popover .block-editor-url-input.is-full-width__suggestions{width:100%}.block-editor-block-list__block .block-editor-url-input .components-spinner,.block-editor-url-input .components-spinner,.components-popover .block-editor-url-input .components-spinner{bottom:8px 8px 8px 12px8px1;left:8px 8px 8px 12px;margin:0;position:absolute}.block-editor-url-input__input[type=text]{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.block-editor-url-input__input[type=text]{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-url-input__input[type=text]{font-size:13px;line-height:normal}}.block-editor-url-input__input[type=text]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-url-input__input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-url-input__input[type=text]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.block-editor-url-input__input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-url-input__suggestions{max-height:200px;overflow-y:auto;padding:4px 0;transition:all .15s ease-in-out;width:302px}@media (prefers-reduced-motion:reduce){.block-editor-url-input__suggestions{transition-delay:0s;transition-duration:0s}}.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:none}@media (min-width:600px){.block-editor-url-input .components-spinner,.block-editor-url-input__suggestions{display:inherit}}.block-editor-url-input__suggestion{background:#fff;border:none;box-shadow:none;color:#757575;cursor:pointer;display:block;font-size:13px;padding:4px 8px 8px;text-align:right;width:100%}.block-editor-url-input__suggestion:hover{background:#ddd}.block-editor-url-input__suggestion.is-selected,.block-editor-url-input__suggestion:focus{background:var(--wp-admin-theme-color-darker-20);color:#fff;outline:none}.components-toolbar-group>.block-editor-url-input__button,.components-toolbar>.block-editor-url-input__button{position:inherit}.block-editor-url-input__button .block-editor-url-input__back{margin-left:4px;overflow:visible}.block-editor-url-input__button .block-editor-url-input__back:after{background:#ddd;content:"";display:block;height:24px;left:-1px;position:absolute;width:1px}.block-editor-url-input__button-modal{background:#fff;border:1px solid #ddd;box-shadow:0 2px 6px rgba(0,0,0,.05)}.block-editor-url-input__button-modal-line{align-items:flex-start;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-width:0}.block-editor-url-input__button-modal-line .components-button{flex-shrink:0;height:36px;width:36px}.block-editor-url-popover__additional-controls{border-top:1px solid #ddd}.block-editor-url-popover__additional-controls>div[role=menu] .components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary)>svg{box-shadow:none}.block-editor-url-popover__additional-controls div[role=menu]>.components-button{padding-right:12px}.block-editor-url-popover__row{display:flex}.block-editor-url-popover__row>:not(.block-editor-url-popover__settings-toggle){flex-grow:1}.block-editor-url-popover .components-button.has-icon{padding:3px}.block-editor-url-popover .components-button.has-icon>svg{border-radius:2px;height:30px;padding:5px;width:30px}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus{box-shadow:none}.block-editor-url-popover .components-button.has-icon:not(:disabled):focus>svg{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.block-editor-url-popover__settings-toggle{border-radius:0;border-right:1px solid #ddd;flex-shrink:0;margin-right:1px}.block-editor-url-popover__settings-toggle[aria-expanded=true] .dashicon{transform:rotate(-180deg)}.block-editor-url-popover__input-container .components-base-control:last-child,.block-editor-url-popover__input-container .components-base-control:last-child .components-base-control__field{margin-bottom:0}.block-editor-url-popover__settings{border-top:1px solid #ddd;display:block;padding:16px}.block-editor-url-popover__link-editor,.block-editor-url-popover__link-viewer{display:flex}.block-editor-url-popover__link-editor .block-editor-url-input .components-base-control__field,.block-editor-url-popover__link-viewer .block-editor-url-input .components-base-control__field{margin-bottom:0}.block-editor-url-popover__link-editor .block-editor-url-input .components-spinner,.block-editor-url-popover__link-viewer .block-editor-url-input .components-spinner{bottom:8px 8px 8px 12px1}.block-editor-url-popover__link-viewer-url{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-url-popover__link-viewer-url.has-invalid-link{color:#cc1818}.block-editor-warning{align-items:center;background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;display:flex;flex-wrap:wrap;padding:1em}.block-editor-warning,.block-editor-warning .block-editor-warning__message{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.block-editor-warning .block-editor-warning__message{color:#1e1e1e;font-size:13px;line-height:1.4;margin:0}.block-editor-warning p.block-editor-warning__message.block-editor-warning__message{min-height:auto}.block-editor-warning .block-editor-warning__contents{align-items:baseline;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;width:100%}.block-editor-warning .block-editor-warning__actions{display:flex;margin-top:1em}.block-editor-warning .block-editor-warning__action{margin:0 0 0 8px}.block-editor-warning__secondary{margin:auto 8px auto 0}.components-popover.block-editor-warning__dropdown{z-index:99998}.html-anchor-control .components-external-link{display:block;margin-top:8px}.block-editor-hooks__layout-controls{display:flex;margin-bottom:16px}.block-editor-hooks__layout-controls .block-editor-hooks__layout-controls-unit{display:flex;margin-left:24px}.block-editor-hooks__layout-controls .block-editor-hooks__layout-controls-unit svg{margin:auto 8px 4px 0}.block-editor-hooks__layout-controls-reset{display:flex;justify-content:flex-end;margin-bottom:24px}.block-editor-hooks__layout-controls-helptext{font-size:12px}.block-editor-hooks__flex-layout-justification-controls,.block-editor-hooks__flex-layout-orientation-controls{margin-bottom:12px}.block-editor-hooks__flex-layout-justification-controls legend,.block-editor-hooks__flex-layout-orientation-controls legend{margin-bottom:8px}.border-block-support-panel .single-column,.dimensions-block-support-panel .single-column{grid-column:span 1}.typography-block-support-panel .block-editor-text-decoration-control__buttons,.typography-block-support-panel .block-editor-text-transform-control__buttons,.typography-block-support-panel .components-font-appearance-control,.typography-block-support-panel .components-font-size-picker__controls{margin-bottom:0}.typography-block-support-panel .block-editor-line-height-control input{max-width:100%}.typography-block-support-panel .single-column{grid-column:span 1}.block-editor-block-toolbar{display:flex;flex-grow:1;overflow-x:auto;overflow-y:hidden;position:relative;transition:border-color .1s linear,box-shadow .1s linear;width:100%}@media (prefers-reduced-motion:reduce){.block-editor-block-toolbar{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-block-toolbar{overflow:inherit}}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group{background:none;border:0;border-left:1px solid #ddd;line-height:0;margin-bottom:-1px;margin-top:-1px}.block-editor-block-toolbar>:last-child,.block-editor-block-toolbar>:last-child .components-toolbar,.block-editor-block-toolbar>:last-child .components-toolbar-group{border-left:none}.block-editor-block-contextual-toolbar.has-parent:not(.is-fixed){margin-right:56px}.show-icon-labels .block-editor-block-contextual-toolbar.has-parent:not(.is-fixed){margin-right:0}.block-editor-block-parent-selector{position:absolute;right:-57px;top:-1px}.show-icon-labels .block-editor-block-parent-selector{margin-bottom:-1px;margin-right:-1px;margin-top:-1px;position:relative;right:auto;top:auto}.block-editor-block-toolbar__block-controls{height:auto!important;margin-right:-1px;padding:0!important}.block-editor-block-toolbar__block-controls .block-editor-block-switcher .components-dropdown-menu__toggle .block-editor-block-icon,.block-editor-block-toolbar__block-controls .block-editor-block-switcher__no-switcher-icon .block-editor-block-icon{margin:0!important;width:24px!important}.block-editor-block-toolbar__block-controls .block-editor-block-mover{margin-right:-6px}.block-editor-block-toolbar .components-toolbar,.block-editor-block-toolbar .components-toolbar-group,.block-editor-rich-text__inline-format-toolbar-group .components-toolbar,.block-editor-rich-text__inline-format-toolbar-group .components-toolbar-group{display:flex;flex-wrap:nowrap}.block-editor-block-toolbar__slot{display:inline-block;line-height:0}@supports (position:sticky){.block-editor-block-toolbar__slot{display:inline-flex}}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon{width:auto}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon svg{display:none}.show-icon-labels .block-editor-block-toolbar .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.show-icon-labels .components-accessible-toolbar .components-toolbar-group>div:first-child:last-child>.components-button.has-icon{padding-left:6px;padding-right:6px}.show-icon-labels .block-editor-block-switcher{border-left:1px solid #1e1e1e}.show-icon-labels .block-editor-block-switcher .components-dropdown-menu__toggle{margin-right:0}.show-icon-labels .block-editor-block-switcher .components-dropdown-menu__toggle .block-editor-block-icon,.show-icon-labels .block-editor-block-switcher__no-switcher-icon .block-editor-block-icon{height:0!important;width:0!important}.show-icon-labels .block-editor-block-parent-selector__button .block-editor-block-icon{width:0}.show-icon-labels .block-editor-block-toolbar__block-controls .block-editor-block-mover{margin-right:0;white-space:nowrap}.show-icon-labels .block-editor-block-mover-button{padding-left:8px!important;padding-right:8px!important}.show-icon-labels .block-editor-block-mover__drag-handle.has-icon{border-left:1px solid #1e1e1e;padding-left:6px!important;padding-right:6px!important}@media (min-width:600px){.show-icon-labels .is-up-button.is-up-button.is-up-button{border-bottom:1px solid #1e1e1e;border-radius:0;margin-left:0}}.show-icon-labels .block-editor-block-contextual-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button.block-editor-block-mover-button{width:auto}.show-icon-labels .components-toolbar,.show-icon-labels .components-toolbar-group{flex-shrink:1}.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button+.components-button{margin-right:6px}.block-editor-inserter{background:none;border:none;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:0;padding:0}@media (min-width:782px){.block-editor-inserter{position:relative}}.block-editor-inserter__content{position:relative}.block-editor-inserter__popover.is-quick .components-popover__content{border:none}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>*{border-left:1px solid #ccc;border-right:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>:first-child{border-top:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>:last-child{border-bottom:1px solid #ccc}.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter>.components-button{border:1px solid #1e1e1e}.block-editor-inserter__popover .block-editor-inserter__menu{margin:-12px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__tabs .components-tab-panel__tabs{top:60px}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__main-area{height:auto;overflow:visible}.block-editor-inserter__popover .block-editor-inserter__menu .block-editor-inserter__preview-container{display:none}.block-editor-inserter__toggle.components-button{align-items:center;border:none;cursor:pointer;display:inline-flex;outline:none;padding:0;transition:color .2s ease}@media (prefers-reduced-motion:reduce){.block-editor-inserter__toggle.components-button{transition-delay:0s;transition-duration:0s}}.block-editor-inserter__menu{height:100%;overflow:visible;position:relative}.block-editor-inserter__main-area{height:100%;overflow-y:auto;width:auto}@media (min-width:782px){.block-editor-inserter__main-area{width:350px}}.block-editor-inserter__inline-elements{margin-top:-1px}.block-editor-inserter__menu.is-bottom:after{border-bottom-color:#fff}.components-popover.block-editor-inserter__popover{z-index:99999}.block-editor-inserter__search{background:#fff;padding:16px 16px 0;position:sticky;top:0;z-index:1}.block-editor-inserter__search .components-search-control__icon{left:20px}.block-editor-inserter__search .components-base-control__field{margin-bottom:0}.block-editor-inserter__tabs{display:flex;flex-direction:column}.block-editor-inserter__tabs .components-tab-panel__tabs{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:64px;z-index:1}.block-editor-inserter__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item{flex-grow:1;margin-bottom:-1px}.block-editor-inserter__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;flex-grow:1;position:relative;z-index:0}.block-editor-inserter__panel-header{align-items:center;display:inline-flex;padding:16px 16px 0}.block-editor-inserter__panel-header-patterns{padding:16px 16px 0}.block-editor-inserter__panel-content{padding:16px}.block-editor-inserter__panel-title,.block-editor-inserter__panel-title button{color:#757575;font-size:11px;font-weight:500;margin:0 0 0 12px;text-transform:uppercase}.block-editor-inserter__panel-dropdown select.components-select-control__input.components-select-control__input.components-select-control__input{height:36px;line-height:36px}.block-editor-inserter__panel-dropdown select{border:none}.block-editor-inserter__block-list{flex-grow:1;position:relative}.block-editor-inserter__reusable-blocks-panel{position:relative;text-align:left}.block-editor-inserter__manage-reusable-blocks{display:inline-block;margin:16px}.block-editor-inserter__no-results{padding:32px;text-align:center}.block-editor-inserter__no-results-icon{fill:#949494}.block-editor-inserter__child-blocks{padding:0 16px}.block-editor-inserter__parent-block-header{align-items:center;display:flex}.block-editor-inserter__parent-block-header h2{font-size:13px}.block-editor-inserter__parent-block-header .block-editor-block-icon{margin-left:8px}.block-editor-inserter__preview-container{background:#fff;border:1px solid #ddd;border-radius:2px;display:none;max-height:calc(100% - 32px);overflow-y:hidden;position:absolute;right:calc(100% + 16px);top:16px;width:300px}@media (min-width:782px){.block-editor-inserter__preview-container{display:block}}.block-editor-inserter__preview-container .block-editor-block-card{padding:16px}.block-editor-inserter__preview-container .block-editor-block-card__title{font-size:13px}.block-editor-inserter__preview-content{align-items:center;background:#f0f0f0;display:grid;flex-grow:1;min-height:144px}.block-editor-inserter__preview-content-missing{align-items:center;background:#f0f0f0;color:#757575;display:flex;flex:1;justify-content:center;min-height:144px}.block-editor-inserter__tips{border-top:1px solid #ddd;flex-shrink:0;padding:16px;position:relative}.block-editor-inserter__manage-reusable-blocks-container{padding:16px}.block-editor-inserter__quick-inserter{max-width:100%;width:100%}@media (min-width:782px){.block-editor-inserter__quick-inserter{width:350px}}.block-editor-inserter__quick-inserter-results .block-editor-inserter__panel-header{floa