Gutenberg - Version 11.5.0

Version Description

Download this release

Release Info

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

Code changes from version 11.4.1 to 11.5.0

build/admin-manifest/index.js CHANGED
@@ -105,8 +105,7 @@ function getAdminBarColors() {
105
  color: color || 'white',
106
  backgroundColor: backgroundColor || 'black'
107
  };
108
- } // eslint-disable-next-line @wordpress/no-global-event-listener
109
-
110
 
111
  window.addEventListener('load', () => {
112
  if (!('serviceWorker' in window.navigator)) {
105
  color: color || 'white',
106
  backgroundColor: backgroundColor || 'black'
107
  };
108
+ }
 
109
 
110
  window.addEventListener('load', () => {
111
  if (!('serviceWorker' in window.navigator)) {
build/admin-manifest/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '376ae2ac95e29beb45141d0be0579b1d');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '69671bac802e0af5ab7e7729ac5f5d33');
build/block-editor/default-editor-styles-rtl.css ADDED
@@ -0,0 +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}}body{--wp--style--block-gap:2em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:18px;line-height:1.5}p{line-height:1.8}.editor-post-title__block{font-size:2.5em;font-weight:800;margin-bottom:1em;margin-top:2em}
build/block-editor/default-editor-styles.css ADDED
@@ -0,0 +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}}body{--wp--style--block-gap:2em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:18px;line-height:1.5}p{line-height:1.8}.editor-post-title__block{font-size:2.5em;font-weight:800;margin-bottom:1em;margin-top:2em}
build/block-editor/index.js CHANGED
@@ -5851,7 +5851,7 @@ __webpack_require__.d(__webpack_exports__, {
5851
  "__experimentalLinkControlSearchInput": function() { return /* reexport */ search_input; },
5852
  "__experimentalLinkControlSearchItem": function() { return /* reexport */ search_item; },
5853
  "__experimentalLinkControlSearchResults": function() { return /* reexport */ LinkControlSearchResults; },
5854
- "__experimentalListView": function() { return /* reexport */ ListView; },
5855
  "__experimentalListViewBlockFill": function() { return /* reexport */ ListViewBlockFill; },
5856
  "__experimentalListViewEditor": function() { return /* reexport */ ListViewEditor; },
5857
  "__experimentalPanelColorGradientSettings": function() { return /* reexport */ panel_color_gradient_settings; },
@@ -5913,8 +5913,6 @@ __webpack_require__.d(selectors_namespaceObject, {
5913
  "__experimentalGetPatternTransformItems": function() { return __experimentalGetPatternTransformItems; },
5914
  "__experimentalGetPatternsByBlockTypes": function() { return __experimentalGetPatternsByBlockTypes; },
5915
  "__experimentalGetReusableBlockTitle": function() { return __experimentalGetReusableBlockTitle; },
5916
- "__unstableGetBlockTree": function() { return __unstableGetBlockTree; },
5917
- "__unstableGetBlockWithBlockTree": function() { return __unstableGetBlockWithBlockTree; },
5918
  "__unstableGetBlockWithoutInnerBlocks": function() { return __unstableGetBlockWithoutInnerBlocks; },
5919
  "__unstableGetClientIdWithClientIdsTree": function() { return __unstableGetClientIdWithClientIdsTree; },
5920
  "__unstableGetClientIdsTree": function() { return __unstableGetClientIdsTree; },
@@ -6052,6 +6050,31 @@ __webpack_require__.d(actions_namespaceObject, {
6052
  "validateBlocksToTemplate": function() { return validateBlocksToTemplate; }
6053
  });
6054
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6055
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
6056
  function _extends() {
6057
  _extends = Object.assign || function (target) {
@@ -6079,10 +6102,6 @@ var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
6079
  var external_lodash_namespaceObject = window["lodash"];
6080
  ;// CONCATENATED MODULE: external ["wp","compose"]
6081
  var external_wp_compose_namespaceObject = window["wp"]["compose"];
6082
- ;// CONCATENATED MODULE: external ["wp","hooks"]
6083
- var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
6084
- ;// CONCATENATED MODULE: external ["wp","blocks"]
6085
- var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
6086
  ;// CONCATENATED MODULE: external ["wp","components"]
6087
  var external_wp_components_namespaceObject = window["wp"]["components"];
6088
  ;// CONCATENATED MODULE: external ["wp","data"]
@@ -6530,23 +6549,79 @@ function hasSameKeys(a, b) {
6530
  function isUpdatingSameBlockAttribute(action, lastAction) {
6531
  return action.type === 'UPDATE_BLOCK_ATTRIBUTES' && lastAction !== undefined && lastAction.type === 'UPDATE_BLOCK_ATTRIBUTES' && (0,external_lodash_namespaceObject.isEqual)(action.clientIds, lastAction.clientIds) && hasSameKeys(action.attributes, lastAction.attributes);
6532
  }
6533
- /**
6534
- * Utility returning an object with an empty object value for each key.
6535
- *
6536
- * @param {Array} objectKeys Keys to fill.
6537
- * @return {Object} Object filled with empty object as values for each clientId.
6538
- */
6539
 
6540
- const fillKeysWithEmptyObject = objectKeys => {
6541
- return objectKeys.reduce((result, key) => {
6542
- result[key] = {};
6543
- return result;
6544
- }, {});
6545
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6546
  /**
6547
- * Higher-order reducer intended to compute a cache key for each block in the post.
6548
- * A new instance of the cache key (empty object) is created each time the block object
6549
- * needs to be refreshed (for any change in the block or its children).
6550
  *
6551
  * @param {Function} reducer Original reducer function.
6552
  *
@@ -6554,88 +6629,72 @@ const fillKeysWithEmptyObject = objectKeys => {
6554
  */
6555
 
6556
 
6557
- const withBlockCache = reducer => (state = {}, action) => {
6558
  const newState = reducer(state, action);
6559
 
6560
  if (newState === state) {
6561
  return state;
6562
  }
6563
 
6564
- newState.cache = state.cache ? state.cache : {};
6565
- /**
6566
- * For each clientId provided, traverses up parents, adding the provided clientIds
6567
- * and each parent's clientId to the returned array.
6568
- *
6569
- * When calling this function consider that it uses the old state, so any state
6570
- * modifications made by the `reducer` will not be present.
6571
- *
6572
- * @param {Array} clientIds an Array of block clientIds.
6573
- *
6574
- * @return {Array} The provided clientIds and all of their parent clientIds.
6575
- */
6576
-
6577
- const getBlocksWithParentsClientIds = clientIds => {
6578
- return clientIds.reduce((result, clientId) => {
6579
- let current = clientId;
6580
-
6581
- do {
6582
- result.push(current);
6583
- current = state.parents[current];
6584
- } while (current && !state.controlledInnerBlocks[current]);
6585
-
6586
- return result;
6587
- }, []);
6588
- };
6589
 
6590
  switch (action.type) {
6591
- case 'RESET_BLOCKS':
6592
- newState.cache = (0,external_lodash_namespaceObject.mapValues)(flattenBlocks(action.blocks), () => ({}));
6593
- break;
6594
-
6595
  case 'RECEIVE_BLOCKS':
6596
  case 'INSERT_BLOCKS':
6597
  {
6598
- const updatedBlockUids = (0,external_lodash_namespaceObject.keys)(flattenBlocks(action.blocks));
6599
-
6600
- if (action.rootClientId && !state.controlledInnerBlocks[action.rootClientId]) {
6601
- updatedBlockUids.push(action.rootClientId);
6602
- }
6603
-
6604
- newState.cache = { ...newState.cache,
6605
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
6606
- };
6607
  break;
6608
  }
6609
 
6610
  case 'UPDATE_BLOCK':
6611
- newState.cache = { ...newState.cache,
6612
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds([action.clientId]))
6613
- };
 
 
6614
  break;
6615
 
6616
  case 'UPDATE_BLOCK_ATTRIBUTES':
6617
- newState.cache = { ...newState.cache,
6618
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.clientIds))
6619
- };
6620
- break;
 
 
 
 
 
 
 
 
6621
 
6622
  case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
6623
- const parentClientIds = fillKeysWithEmptyObject(getBlocksWithParentsClientIds(action.replacedClientIds));
6624
- newState.cache = { ...(0,external_lodash_namespaceObject.omit)(newState.cache, action.replacedClientIds),
6625
- ...(0,external_lodash_namespaceObject.omit)(parentClientIds, action.replacedClientIds),
6626
- ...fillKeysWithEmptyObject((0,external_lodash_namespaceObject.keys)(flattenBlocks(action.blocks)))
6627
- };
6628
- break;
 
6629
 
6630
  case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
6631
- newState.cache = { ...(0,external_lodash_namespaceObject.omit)(newState.cache, action.removedClientIds),
6632
- ...fillKeysWithEmptyObject((0,external_lodash_namespaceObject.difference)(getBlocksWithParentsClientIds(action.clientIds), action.clientIds))
6633
- };
 
 
 
 
 
 
6634
  break;
6635
 
6636
  case 'MOVE_BLOCKS_TO_POSITION':
6637
  {
6638
- const updatedBlockUids = [...action.clientIds];
6639
 
6640
  if (action.fromRootClientId) {
6641
  updatedBlockUids.push(action.fromRootClientId);
@@ -6645,24 +6704,19 @@ const withBlockCache = reducer => (state = {}, action) => {
6645
  updatedBlockUids.push(action.toRootClientId);
6646
  }
6647
 
6648
- newState.cache = { ...newState.cache,
6649
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
6650
- };
 
 
6651
  break;
6652
  }
6653
 
6654
  case 'MOVE_BLOCKS_UP':
6655
  case 'MOVE_BLOCKS_DOWN':
6656
  {
6657
- const updatedBlockUids = [];
6658
-
6659
- if (action.rootClientId) {
6660
- updatedBlockUids.push(action.rootClientId);
6661
- }
6662
-
6663
- newState.cache = { ...newState.cache,
6664
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
6665
- };
6666
  break;
6667
  }
6668
 
@@ -6671,9 +6725,15 @@ const withBlockCache = reducer => (state = {}, action) => {
6671
  const updatedBlockUids = (0,external_lodash_namespaceObject.keys)((0,external_lodash_namespaceObject.omitBy)(newState.attributes, (attributes, clientId) => {
6672
  return newState.byClientId[clientId].name !== 'core/block' || attributes.ref !== action.updatedId;
6673
  }));
6674
- newState.cache = { ...newState.cache,
6675
- ...fillKeysWithEmptyObject(getBlocksWithParentsClientIds(updatedBlockUids))
6676
- };
 
 
 
 
 
 
6677
  }
6678
  }
6679
 
@@ -6817,15 +6877,17 @@ const withInnerBlocksRemoveCascade = reducer => (state, action) => {
6817
 
6818
 
6819
  const withBlockReset = reducer => (state, action) => {
6820
- if (state && action.type === 'RESET_BLOCKS') {
 
 
6821
  /**
6822
  * A list of client IDs associated with the top level entity (like a
6823
  * post or template). It excludes the client IDs of blocks associated
6824
  * with other entities, like inner block controllers or reusable blocks.
6825
  */
6826
- const visibleClientIds = getNestedBlockClientIds(state.order, '', state.controlledInnerBlocks); // pickBy returns only the truthy values from controlledInnerBlocks
6827
 
6828
- const controlledInnerBlocks = Object.keys((0,external_lodash_namespaceObject.pickBy)(state.controlledInnerBlocks));
6829
  /**
6830
  * Each update operation consists of a few parts:
6831
  * 1. First, the client IDs associated with the top level entity are
@@ -6848,23 +6910,30 @@ const withBlockReset = reducer => (state, action) => {
6848
  * whenever you try to undo a change in the top level entity.
6849
  */
6850
 
6851
- return { ...state,
6852
- byClientId: { ...(0,external_lodash_namespaceObject.omit)(state.byClientId, visibleClientIds),
6853
  ...getFlattenedBlocksWithoutAttributes(action.blocks)
6854
  },
6855
- attributes: { ...(0,external_lodash_namespaceObject.omit)(state.attributes, visibleClientIds),
6856
  ...getFlattenedBlockAttributes(action.blocks)
6857
  },
6858
- order: { ...(0,external_lodash_namespaceObject.omit)(state.order, visibleClientIds),
6859
  ...(0,external_lodash_namespaceObject.omit)(mapBlockOrder(action.blocks), controlledInnerBlocks)
6860
  },
6861
- parents: { ...(0,external_lodash_namespaceObject.omit)(state.parents, visibleClientIds),
6862
  ...mapBlockParents(action.blocks)
6863
  },
6864
- cache: { ...(0,external_lodash_namespaceObject.omit)(state.cache, visibleClientIds),
6865
- ...(0,external_lodash_namespaceObject.omit)((0,external_lodash_namespaceObject.mapValues)(flattenBlocks(action.blocks), () => ({})), controlledInnerBlocks)
 
 
 
 
 
 
6866
  }
6867
  };
 
6868
  }
6869
 
6870
  return reducer(state, action);
@@ -7000,14 +7069,11 @@ const withSaveReusableBlock = reducer => (state, action) => {
7000
 
7001
 
7002
  const blocks = (0,external_lodash_namespaceObject.flow)(external_wp_data_namespaceObject.combineReducers, withSaveReusableBlock, // needs to be before withBlockCache
7003
- withBlockCache, // needs to be before withInnerBlocksRemoveCascade
7004
  withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
7005
  withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
7006
  byClientId(state = {}, action) {
7007
  switch (action.type) {
7008
- case 'RESET_BLOCKS':
7009
- return getFlattenedBlocksWithoutAttributes(action.blocks);
7010
-
7011
  case 'RECEIVE_BLOCKS':
7012
  case 'INSERT_BLOCKS':
7013
  return { ...state,
@@ -7051,9 +7117,6 @@ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
7051
 
7052
  attributes(state = {}, action) {
7053
  switch (action.type) {
7054
- case 'RESET_BLOCKS':
7055
- return getFlattenedBlockAttributes(action.blocks);
7056
-
7057
  case 'RECEIVE_BLOCKS':
7058
  case 'INSERT_BLOCKS':
7059
  return { ...state,
@@ -7118,13 +7181,14 @@ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
7118
 
7119
  order(state = {}, action) {
7120
  switch (action.type) {
7121
- case 'RESET_BLOCKS':
7122
- return mapBlockOrder(action.blocks);
7123
-
7124
  case 'RECEIVE_BLOCKS':
7125
- return { ...state,
7126
- ...(0,external_lodash_namespaceObject.omit)(mapBlockOrder(action.blocks), '')
7127
- };
 
 
 
 
7128
 
7129
  case 'INSERT_BLOCKS':
7130
  {
@@ -7246,9 +7310,6 @@ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
7246
  // an optimization for the selectors which derive the ancestry of a block.
7247
  parents(state = {}, action) {
7248
  switch (action.type) {
7249
- case 'RESET_BLOCKS':
7250
- return mapBlockParents(action.blocks);
7251
-
7252
  case 'RECEIVE_BLOCKS':
7253
  return { ...state,
7254
  ...mapBlockParents(action.blocks)
@@ -7411,8 +7472,7 @@ function selectionHelper(state = {}, action) {
7411
  return state;
7412
  }
7413
 
7414
- const indexToSelect = action.indexToSelect || action.blocks.length - 1;
7415
- const blockToSelect = action.blocks[indexToSelect];
7416
 
7417
  if (!blockToSelect) {
7418
  return {};
@@ -8354,23 +8414,15 @@ function getBlockAttributes(state, clientId) {
8354
  * @return {Object} Parsed block object.
8355
  */
8356
 
8357
- const getBlock = rememo((state, clientId) => {
8358
  const block = state.blocks.byClientId[clientId];
8359
 
8360
  if (!block) {
8361
  return null;
8362
  }
8363
 
8364
- return { ...block,
8365
- attributes: getBlockAttributes(state, clientId),
8366
- innerBlocks: areInnerBlocksControlled(state, clientId) ? EMPTY_ARRAY : getBlocks(state, clientId)
8367
- };
8368
- }, (state, clientId) => [// Normally, we'd have both `getBlockAttributes` dependencies and
8369
- // `getBlocks` (children) dependencies here but for performance reasons
8370
- // we use a denormalized cache key computed in the reducer that takes both
8371
- // the attributes and inner blocks into account. The value of the cache key
8372
- // is being changed whenever one of these dependencies is out of date.
8373
- state.blocks.cache[clientId]]);
8374
  const __unstableGetBlockWithoutInnerBlocks = rememo((state, clientId) => {
8375
  const block = state.blocks.byClientId[clientId];
8376
 
@@ -8387,56 +8439,18 @@ const __unstableGetBlockWithoutInnerBlocks = rememo((state, clientId) => {
8387
  * the order they appear in the post. Note that this will exclude child blocks
8388
  * of nested inner block controllers.
8389
  *
8390
- * Note: It's important to memoize this selector to avoid return a new instance
8391
- * on each call. We use the block cache state for each top-level block of the
8392
- * given clientID. This way, the selector only refreshes on changes to blocks
8393
- * associated with the given entity, and does not refresh when changes are made
8394
- * to blocks which are part of different inner block controllers.
8395
- *
8396
  * @param {Object} state Editor state.
8397
  * @param {?string} rootClientId Optional root client ID of block list.
8398
  *
8399
  * @return {Object[]} Post blocks.
8400
  */
8401
 
8402
- const getBlocks = rememo((state, rootClientId) => {
8403
- return (0,external_lodash_namespaceObject.map)(getBlockOrder(state, rootClientId), clientId => getBlock(state, clientId));
8404
- }, (state, rootClientId) => (0,external_lodash_namespaceObject.map)(state.blocks.order[rootClientId || ''], id => state.blocks.cache[id]));
8405
- /**
8406
- * Similar to getBlock, except it will include the entire nested block tree as
8407
- * inner blocks. The normal getBlock selector will exclude sections of the block
8408
- * tree which belong to different entities.
8409
- *
8410
- * @param {Object} state Editor state.
8411
- * @param {string} clientId Client ID of the block to get.
8412
- *
8413
- * @return {Object} The block with all
8414
- */
8415
-
8416
- const __unstableGetBlockWithBlockTree = rememo((state, clientId) => {
8417
- const block = state.blocks.byClientId[clientId];
8418
-
8419
- if (!block) {
8420
- return null;
8421
- }
8422
-
8423
- return { ...block,
8424
- attributes: getBlockAttributes(state, clientId),
8425
- innerBlocks: __unstableGetBlockTree(state, clientId)
8426
- };
8427
- }, state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
8428
- /**
8429
- * Similar to getBlocks, except this selector returns the entire block tree
8430
- * represented in the block-editor store from the given root regardless of any
8431
- * inner block controllers.
8432
- *
8433
- * @param {Object} state Editor state.
8434
- * @param {?string} rootClientId Optional root client ID of block list.
8435
- *
8436
- * @return {Object[]} Post blocks.
8437
- */
8438
 
8439
- const __unstableGetBlockTree = rememo((state, rootClientId = '') => (0,external_lodash_namespaceObject.map)(getBlockOrder(state, rootClientId), clientId => __unstableGetBlockWithBlockTree(state, clientId)), state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
 
 
8440
  /**
8441
  * Returns a stripped down block object containing only its client ID,
8442
  * and its inner blocks' client IDs.
@@ -8522,7 +8536,7 @@ const getGlobalBlockCount = rememo((state, blockName) => {
8522
  * @return {WPBlock[]} Block objects.
8523
  */
8524
 
8525
- const getBlocksByClientId = rememo((state, clientIds) => (0,external_lodash_namespaceObject.map)((0,external_lodash_namespaceObject.castArray)(clientIds), clientId => getBlock(state, clientId)), state => [state.blocks.byClientId, state.blocks.order, state.blocks.attributes]);
8526
  /**
8527
  * Returns the number of blocks currently present in the post.
8528
  *
@@ -10404,12 +10418,18 @@ function resetSelection(selectionStart, selectionEnd, initialPosition) {
10404
  * Unlike resetBlocks, these should be appended to the existing known set, not
10405
  * replacing.
10406
  *
 
 
10407
  * @param {Object[]} blocks Array of block objects.
10408
  *
10409
  * @return {Object} Action object.
10410
  */
10411
 
10412
  function receiveBlocks(blocks) {
 
 
 
 
10413
  return {
10414
  type: 'RECEIVE_BLOCKS',
10415
  blocks
@@ -10983,7 +11003,8 @@ function* mergeBlocks(firstBlockClientId, secondBlockClientId) {
10983
  attributes: { ...blockA.attributes,
10984
  ...updatedAttributes
10985
  }
10986
- }, ...blocksWithTheSameType.slice(1)]);
 
10987
  }
10988
  /**
10989
  * Yields action objects used in signalling that the blocks corresponding to
@@ -11764,6 +11785,66 @@ const stretchFullWidth = (0,external_wp_element_namespaceObject.createElement)(e
11764
  }));
11765
  /* harmony default export */ var stretch_full_width = (stretchFullWidth);
11766
  //# sourceMappingURL=stretch-full-width.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11767
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/utils.js
11768
  /**
11769
  * Utility to generate the proper CSS selector for layout styles.
@@ -11782,127 +11863,44 @@ function appendSelectors(selectors, append = '') {
11782
  return selectors.split(',').map(subselector => `.editor-styles-wrapper ${subselector} ${append}`).join(',');
11783
  }
11784
  //# sourceMappingURL=utils.js.map
11785
- ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/flex.js
11786
-
 
 
11787
 
11788
  /**
11789
  * WordPress dependencies
11790
  */
11791
 
 
 
11792
  /**
11793
  * Internal dependencies
11794
  */
11795
 
11796
 
11797
- /* harmony default export */ var flex = ({
11798
- name: 'flex',
11799
- label: (0,external_wp_i18n_namespaceObject.__)('Flex'),
11800
-
11801
- edit() {
11802
- return null;
11803
- },
11804
 
11805
- save: function FlexLayoutStyle({
11806
- selector
11807
- }) {
11808
- return (0,external_wp_element_namespaceObject.createElement)("style", null, `
11809
- ${appendSelectors(selector)} {
11810
- display: flex;
11811
- gap: var( --wp--style--block-gap, 0.5em );
11812
- flex-wrap: wrap;
11813
- align-items: center;
11814
- }
 
 
11815
 
11816
- ${appendSelectors(selector, '> *')} {
11817
- margin: 0;
11818
- }
11819
- `);
11820
- },
11821
 
11822
- getOrientation() {
11823
- return 'horizontal';
11824
- },
11825
-
11826
- getAlignments() {
11827
- return [];
11828
- }
11829
-
11830
- });
11831
- //# sourceMappingURL=flex.js.map
11832
- ;// CONCATENATED MODULE: ./packages/icons/build-module/icon/index.js
11833
- /**
11834
- * WordPress dependencies
11835
- */
11836
-
11837
- /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
11838
-
11839
- /**
11840
- * Return an SVG icon.
11841
- *
11842
- * @param {IconProps} props icon is the SVG component to render
11843
- * size is a number specifiying the icon size in pixels
11844
- * Other props will be passed to wrapped SVG component
11845
- *
11846
- * @return {JSX.Element} Icon component
11847
- */
11848
-
11849
- function Icon({
11850
- icon,
11851
- size = 24,
11852
- ...props
11853
- }) {
11854
- return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
11855
- width: size,
11856
- height: size,
11857
- ...props
11858
- });
11859
- }
11860
-
11861
- /* harmony default export */ var icon = (Icon);
11862
- //# sourceMappingURL=index.js.map
11863
- ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/use-setting/index.js
11864
- /**
11865
- * External dependencies
11866
- */
11867
-
11868
- /**
11869
- * WordPress dependencies
11870
- */
11871
-
11872
-
11873
- /**
11874
- * Internal dependencies
11875
- */
11876
-
11877
-
11878
-
11879
- const deprecatedFlags = {
11880
- 'color.palette': settings => settings.colors === undefined ? undefined : settings.colors,
11881
- 'color.gradients': settings => settings.gradients === undefined ? undefined : settings.gradients,
11882
- 'color.custom': settings => settings.disableCustomColors === undefined ? undefined : !settings.disableCustomColors,
11883
- 'color.customGradient': settings => settings.disableCustomGradients === undefined ? undefined : !settings.disableCustomGradients,
11884
- 'typography.fontSizes': settings => settings.fontSizes === undefined ? undefined : settings.fontSizes,
11885
- 'typography.customFontSize': settings => settings.disableCustomFontSizes === undefined ? undefined : !settings.disableCustomFontSizes,
11886
- 'typography.customLineHeight': settings => settings.enableCustomLineHeight,
11887
- 'spacing.units': settings => {
11888
- if (settings.enableCustomUnits === undefined) {
11889
- return;
11890
- }
11891
-
11892
- if (settings.enableCustomUnits === true) {
11893
- return ['px', 'em', 'rem', 'vh', 'vw', '%'];
11894
- }
11895
-
11896
- return settings.enableCustomUnits;
11897
  },
11898
  'spacing.customPadding': settings => settings.enableCustomSpacing
11899
  };
11900
- const PATHS_WITH_MERGE = {
11901
- 'color.gradients': true,
11902
- 'color.palette': true,
11903
- 'typography.fontFamilies': true,
11904
- 'typography.fontSizes': true
11905
- };
11906
  /**
11907
  * Hook that retrieves the editor setting.
11908
  * It works with nested objects using by finding the value at path.
@@ -11932,7 +11930,7 @@ function useSetting(path) {
11932
  const experimentalFeaturesResult = (_get = (0,external_lodash_namespaceObject.get)(settings, blockPath)) !== null && _get !== void 0 ? _get : (0,external_lodash_namespaceObject.get)(settings, defaultsPath);
11933
 
11934
  if (experimentalFeaturesResult !== undefined) {
11935
- if (PATHS_WITH_MERGE[path]) {
11936
  var _ref, _experimentalFeatures;
11937
 
11938
  return (_ref = (_experimentalFeatures = experimentalFeaturesResult.user) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.core;
@@ -11957,6 +11955,278 @@ function useSetting(path) {
11957
  return setting;
11958
  }
11959
  //# sourceMappingURL=index.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11960
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/flow.js
11961
 
11962
 
@@ -11975,7 +12245,7 @@ function useSetting(path) {
11975
  /* harmony default export */ var flow = ({
11976
  name: 'default',
11977
  label: (0,external_wp_i18n_namespaceObject.__)('Flow'),
11978
- edit: function LayoutDefaultEdit({
11979
  layout,
11980
  onChange
11981
  }) {
@@ -12035,6 +12305,9 @@ function useSetting(path) {
12035
  className: "block-editor-hooks__layout-controls-helptext"
12036
  }, (0,external_wp_i18n_namespaceObject.__)('Customize the width for all elements that are assigned to the center or wide columns.')));
12037
  },
 
 
 
12038
  save: function DefaultLayoutStyle({
12039
  selector,
12040
  layout = {}
@@ -12043,17 +12316,19 @@ function useSetting(path) {
12043
  contentSize,
12044
  wideSize
12045
  } = layout;
 
 
12046
  let style = !!contentSize || !!wideSize ? `
12047
  ${appendSelectors(selector, '> *')} {
12048
  max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
12049
  margin-left: auto !important;
12050
  margin-right: auto !important;
12051
  }
12052
-
12053
  ${appendSelectors(selector, '> [data-align="wide"]')} {
12054
  max-width: ${wideSize !== null && wideSize !== void 0 ? wideSize : contentSize};
12055
  }
12056
-
12057
  ${appendSelectors(selector, '> [data-align="full"]')} {
12058
  max-width: none;
12059
  }
@@ -12063,17 +12338,23 @@ function useSetting(path) {
12063
  float: left;
12064
  margin-right: 2em;
12065
  }
12066
-
12067
  ${appendSelectors(selector, '> [data-align="right"]')} {
12068
  float: right;
12069
  margin-left: 2em;
12070
  }
12071
 
12072
- ${appendSelectors(selector, '> * + *')} {
12073
- margin-top: var( --wp--style--block-gap );
12074
- margin-bottom: 0;
12075
- }
12076
  `;
 
 
 
 
 
 
 
 
 
 
12077
  return (0,external_wp_element_namespaceObject.createElement)("style", null, style);
12078
  },
12079
 
@@ -12086,7 +12367,17 @@ function useSetting(path) {
12086
  return layout.alignments;
12087
  }
12088
 
12089
- return layout.contentSize || layout.wideSize ? ['wide', 'full', 'left', 'center', 'right'] : ['left', 'center', 'right'];
 
 
 
 
 
 
 
 
 
 
12090
  }
12091
 
12092
  });
@@ -12293,7 +12584,7 @@ function BlockAlignmentUI({
12293
  }, extraProps));
12294
  }
12295
 
12296
- /* harmony default export */ var ui = (BlockAlignmentUI);
12297
  //# sourceMappingURL=ui.js.map
12298
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-alignment-control/index.js
12299
 
@@ -12304,12 +12595,12 @@ function BlockAlignmentUI({
12304
  */
12305
 
12306
  function BlockAlignmentControl(props) {
12307
- return (0,external_wp_element_namespaceObject.createElement)(ui, _extends({}, props, {
12308
  isToolbar: false
12309
  }));
12310
  }
12311
  function BlockAlignmentToolbar(props) {
12312
- return (0,external_wp_element_namespaceObject.createElement)(ui, _extends({}, props, {
12313
  isToolbar: true
12314
  }));
12315
  }
@@ -12431,7 +12722,6 @@ const withToolbarControls = (0,external_wp_compose_namespaceObject.createHigherO
12431
  // BlockAlignmentToolbar takes both of these into account.
12432
 
12433
  const blockAllowedAlignments = getValidAlignments((0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, 'align'), (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, 'alignWide', true));
12434
- const validAlignments = useAvailableAlignments(blockAllowedAlignments);
12435
 
12436
  const updateAlignment = nextAlign => {
12437
  if (!nextAlign) {
@@ -12450,13 +12740,13 @@ const withToolbarControls = (0,external_wp_compose_namespaceObject.createHigherO
12450
  });
12451
  };
12452
 
12453
- return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, validAlignments.length > 0 && (0,external_wp_element_namespaceObject.createElement)(block_controls, {
12454
  group: "block",
12455
  __experimentalExposeToChildren: true
12456
  }, (0,external_wp_element_namespaceObject.createElement)(BlockAlignmentControl, {
12457
  value: props.attributes.align,
12458
  onChange: updateAlignment,
12459
- controls: validAlignments
12460
  })), (0,external_wp_element_namespaceObject.createElement)(BlockEdit, props));
12461
  }, 'withToolbarControls');
12462
  /**
@@ -13287,6 +13577,7 @@ const cleanEmptyObject = object => {
13287
 
13288
 
13289
 
 
13290
  /**
13291
  * Internal dependencies
13292
  */
@@ -13314,8 +13605,6 @@ const border_color_EMPTY_ARRAY = [];
13314
  */
13315
 
13316
  function BorderColorEdit(props) {
13317
- var _style$border;
13318
-
13319
  const {
13320
  attributes: {
13321
  borderColor,
@@ -13326,8 +13615,14 @@ function BorderColorEdit(props) {
13326
  const colors = useSetting('color.palette') || border_color_EMPTY_ARRAY;
13327
  const disableCustomColors = !useSetting('color.custom');
13328
  const disableCustomGradients = !useSetting('color.customGradient');
 
 
 
 
 
13329
 
13330
  const onChangeColor = value => {
 
13331
  const colorObject = getColorObjectByColorValue(colors, value);
13332
  const newStyle = { ...style,
13333
  border: { ...(style === null || style === void 0 ? void 0 : style.border),
@@ -13344,7 +13639,7 @@ function BorderColorEdit(props) {
13344
 
13345
  return (0,external_wp_element_namespaceObject.createElement)(control, {
13346
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
13347
- value: borderColor || (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color),
13348
  colors: colors,
13349
  gradients: undefined,
13350
  disableCustomColors: disableCustomColors,
@@ -13452,7 +13747,7 @@ function addEditProps(settings) {
13452
 
13453
 
13454
  const withBorderColorPaletteStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
13455
- var _getColorObjectByAttr, _props$wrapperProps;
13456
 
13457
  const {
13458
  name,
@@ -13468,7 +13763,7 @@ const withBorderColorPaletteStyles = (0,external_wp_compose_namespaceObject.crea
13468
  }
13469
 
13470
  const extraStyles = {
13471
- borderColor: borderColor ? (_getColorObjectByAttr = getColorObjectByAttributeValues(colors, borderColor)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color : undefined
13472
  };
13473
  let wrapperProps = props.wrapperProps;
13474
  wrapperProps = { ...props.wrapperProps,
@@ -14798,7 +15093,9 @@ function ColorEdit(props) {
14798
  const gradients = useSetting('color.gradients') || color_EMPTY_ARRAY;
14799
  const areCustomSolidsEnabled = useSetting('color.custom');
14800
  const areCustomGradientsEnabled = useSetting('color.customGradient');
14801
- const isLinkEnabled = useSetting('color.link'); // Shouldn't be needed but right now the ColorGradientsPanel
 
 
14802
  // can trigger both onChangeColor and onChangeBackground
14803
  // synchronously causing our two callbacks to override changes
14804
  // from each other.
@@ -14813,8 +15110,8 @@ function ColorEdit(props) {
14813
  }
14814
 
14815
  const hasLinkColor = hasLinkColorSupport(blockName) && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
14816
- const hasTextColor = hasTextColorSupport(blockName) && (solids.length > 0 || areCustomSolidsEnabled);
14817
- const hasBackgroundColor = hasBackgroundColorSupport(blockName) && (solids.length > 0 || areCustomSolidsEnabled);
14818
  const hasGradientColor = hasGradientSupport(blockName) && (gradients.length > 0 || areCustomGradientsEnabled);
14819
 
14820
  if (!hasLinkColor && !hasTextColor && !hasBackgroundColor && !hasGradientColor) {
@@ -15660,6 +15957,26 @@ function FontAppearanceControl(props) {
15660
  }
15661
 
15662
  return (0,external_wp_i18n_namespaceObject.__)('Appearance');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15663
  };
15664
 
15665
  return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
@@ -15667,6 +15984,7 @@ function FontAppearanceControl(props) {
15667
  }, hasStylesOrWeights && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CustomSelectControl, {
15668
  className: "components-font-appearance-control__select",
15669
  label: getLabel(),
 
15670
  options: selectOptions,
15671
  value: currentSelection,
15672
  onChange: ({
@@ -16308,7 +16626,7 @@ function LetterSpacingControl({
16308
  * e.g. settings found in `block.json`.
16309
  */
16310
 
16311
- const LETTER_SPACING_SUPPORT_KEY = '__experimentalLetterSpacing';
16312
  /**
16313
  * Inspector control panel containing the letter-spacing options.
16314
  *
@@ -16407,6 +16725,146 @@ function useIsTypographyDisabled(props = {}) {
16407
  return configs.filter(Boolean).length === configs.length;
16408
  }
16409
  //# sourceMappingURL=typography.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16410
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/margin.js
16411
 
16412
 
@@ -16715,6 +17173,7 @@ function PaddingEdit(props) {
16715
 
16716
 
16717
 
 
16718
  const SPACING_SUPPORT_KEY = 'spacing';
16719
  const ALL_SIDES = ['top', 'right', 'bottom', 'left'];
16720
  const AXIAL_SIDES = ['vertical', 'horizontal'];
@@ -16727,6 +17186,7 @@ const AXIAL_SIDES = ['vertical', 'horizontal'];
16727
  */
16728
 
16729
  function DimensionsPanel(props) {
 
16730
  const isPaddingDisabled = useIsPaddingDisabled(props);
16731
  const isMarginDisabled = useIsMarginDisabled(props);
16732
  const isDisabled = useIsDimensionsDisabled(props);
@@ -16745,6 +17205,7 @@ function DimensionsPanel(props) {
16745
  props.setAttributes({
16746
  style: cleanEmptyObject({ ...style,
16747
  spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
 
16748
  margin: undefined,
16749
  padding: undefined
16750
  }
@@ -16768,7 +17229,13 @@ function DimensionsPanel(props) {
16768
  label: (0,external_wp_i18n_namespaceObject.__)('Margin'),
16769
  onDeselect: () => resetMargin(props),
16770
  isShownByDefault: defaultSpacingControls === null || defaultSpacingControls === void 0 ? void 0 : defaultSpacingControls.margin
16771
- }, (0,external_wp_element_namespaceObject.createElement)(MarginEdit, props))));
 
 
 
 
 
 
16772
  }
16773
  /**
16774
  * Determine whether there is dimensions related block support.
@@ -16783,7 +17250,7 @@ function hasDimensionsSupport(blockName) {
16783
  return false;
16784
  }
16785
 
16786
- return hasPaddingSupport(blockName) || hasMarginSupport(blockName);
16787
  }
16788
  /**
16789
  * Determines whether dimensions support has been disabled.
@@ -16794,9 +17261,10 @@ function hasDimensionsSupport(blockName) {
16794
  */
16795
 
16796
  const useIsDimensionsDisabled = (props = {}) => {
 
16797
  const paddingDisabled = useIsPaddingDisabled(props);
16798
  const marginDisabled = useIsMarginDisabled(props);
16799
- return paddingDisabled && marginDisabled;
16800
  };
16801
  /**
16802
  * Custom hook to retrieve which padding/margin is supported
@@ -16958,24 +17426,49 @@ function style_addAttribute(settings) {
16958
 
16959
  return settings;
16960
  }
 
 
 
 
 
 
 
16961
 
16962
- const skipSerializationPaths = {
 
16963
  [`${BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['border'],
16964
  [`${COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]: [COLOR_SUPPORT_KEY],
16965
  [`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [TYPOGRAPHY_SUPPORT_KEY],
16966
  [`${SPACING_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['spacing']
16967
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16968
  /**
16969
  * Override props assigned to save component to inject the CSS variables definition.
16970
  *
16971
- * @param {Object} props Additional props applied to save element.
16972
- * @param {Object} blockType Block type.
16973
- * @param {Object} attributes Block attributes.
 
16974
  *
16975
  * @return {Object} Filtered props applied to save element.
16976
  */
16977
 
16978
- function style_addSaveProps(props, blockType, attributes) {
16979
  if (!hasStyleSupport(blockType)) {
16980
  return props;
16981
  }
@@ -16983,7 +17476,7 @@ function style_addSaveProps(props, blockType, attributes) {
16983
  let {
16984
  style
16985
  } = attributes;
16986
- (0,external_lodash_namespaceObject.forEach)(skipSerializationPaths, (path, indicator) => {
16987
  if ((0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, indicator)) {
16988
  style = (0,external_lodash_namespaceObject.omit)(style, path);
16989
  }
@@ -17016,7 +17509,7 @@ function style_addEditProps(settings) {
17016
  props = existingGetEditWrapperProps(attributes);
17017
  }
17018
 
17019
- return style_addSaveProps(props, settings, attributes);
17020
  };
17021
 
17022
  return settings;
@@ -17254,7 +17747,7 @@ const Edit = props => {
17254
 
17255
  const Component = blockType.edit || blockType.save;
17256
 
17257
- if (blockType.apiVersion > 1 || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'lightBlockWrapper', false)) {
17258
  return (0,external_wp_element_namespaceObject.createElement)(Component, _extends({}, props, {
17259
  context: context
17260
  }));
@@ -18171,7 +18664,7 @@ function useBlockDefaultClassName(clientId) {
18171
  return (0,external_wp_data_namespaceObject.useSelect)(select => {
18172
  const name = select(store).getBlockName(clientId);
18173
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
18174
- const hasLightBlockWrapper = (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) > 1 || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'lightBlockWrapper', false);
18175
 
18176
  if (!hasLightBlockWrapper) {
18177
  return;
@@ -18216,7 +18709,7 @@ function useBlockCustomClassName(clientId) {
18216
  }
18217
 
18218
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(getBlockName(clientId));
18219
- const hasLightBlockWrapper = blockType.apiVersion > 1 || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'lightBlockWrapper', false);
18220
 
18221
  if (!hasLightBlockWrapper) {
18222
  return;
@@ -18822,11 +19315,11 @@ function useBlockProps(props = {}, {
18822
  index,
18823
  mode,
18824
  name,
 
18825
  blockTitle,
18826
  isPartOfSelection,
18827
  adjustScrolling,
18828
- enableAnimation,
18829
- lightBlockWrapper
18830
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
18831
  const {
18832
  getBlockRootClientId,
@@ -18849,11 +19342,11 @@ function useBlockProps(props = {}, {
18849
  index: getBlockIndex(clientId, rootClientId),
18850
  mode: getBlockMode(clientId),
18851
  name: blockName,
 
18852
  blockTitle: blockType === null || blockType === void 0 ? void 0 : blockType.title,
18853
  isPartOfSelection: isSelected || isPartOfMultiSelection,
18854
  adjustScrolling: isSelected || isFirstMultiSelectedBlock(clientId),
18855
- enableAnimation: !isTyping() && getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD,
18856
- lightBlockWrapper: (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) > 1 || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'lightBlockWrapper', false)
18857
  };
18858
  }, [clientId]); // translators: %s: Type of block (i.e. Text, Image etc)
18859
 
@@ -18868,7 +19361,7 @@ function useBlockProps(props = {}, {
18868
  })]);
18869
  const blockEditContext = useBlockEditContext(); // Ensures it warns only inside the `edit` implementation for the block.
18870
 
18871
- if (!lightBlockWrapper && clientId === blockEditContext.clientId) {
18872
  typeof process !== "undefined" && process.env && "production" !== "production" ? external_wp_warning_default()(`Block type "${name}" must support API version 2 or higher to work correctly with "useBlockProps" method.`) : void 0;
18873
  }
18874
 
@@ -19004,10 +19497,9 @@ function BlockListBlock({
19004
  isSelectionEnabled: isSelectionEnabled,
19005
  toggleSelection: toggleSelection
19006
  });
19007
- const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
19008
- const lightBlockWrapper = blockType.apiVersion > 1 || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'lightBlockWrapper', false); // Determine whether the block has props to apply to the wrapper.
19009
 
19010
- if (blockType.getEditWrapperProps) {
19011
  wrapperProps = mergeWrapperProps(wrapperProps, blockType.getEditWrapperProps(attributes));
19012
  }
19013
 
@@ -19042,7 +19534,7 @@ function BlockListBlock({
19042
  }, (0,external_wp_element_namespaceObject.createElement)(block_html, {
19043
  clientId: clientId
19044
  })));
19045
- } else if (lightBlockWrapper) {
19046
  block = blockEdit;
19047
  } else {
19048
  block = (0,external_wp_element_namespaceObject.createElement)(Block, wrapperProps, blockEdit);
@@ -25636,18 +26128,16 @@ function BlockSelectionButton({
25636
  var _getBlockListSettings;
25637
 
25638
  const {
25639
- __unstableGetBlockWithoutInnerBlocks,
25640
  getBlockIndex,
25641
  hasBlockMovingClientId,
25642
  getBlockListSettings
25643
  } = select(store);
25644
  const index = getBlockIndex(clientId, rootClientId);
25645
-
25646
  const {
25647
  name,
25648
  attributes
25649
- } = __unstableGetBlockWithoutInnerBlocks(clientId);
25650
-
25651
  const blockMovingMode = hasBlockMovingClientId();
25652
  return {
25653
  index,
@@ -28809,7 +29299,10 @@ function BlockPopover({
28809
  __unstableBoundaryParent: true // Observe movement for block animations (especially horizontal).
28810
  ,
28811
  __unstableObserveElement: node,
28812
- shouldAnchorIncludePadding: true
 
 
 
28813
  }, (shouldShowContextualToolbar || isToolbarForced) && (0,external_wp_element_namespaceObject.createElement)("div", {
28814
  onFocus: onFocus,
28815
  onBlur: onBlur // While ideally it would be enough to capture the
@@ -28857,7 +29350,7 @@ function wrapperSelector(select) {
28857
  getSelectedBlockClientId,
28858
  getFirstMultiSelectedBlockClientId,
28859
  getBlockRootClientId,
28860
- __unstableGetBlockWithoutInnerBlocks,
28861
  getBlockParents,
28862
  __experimentalGetBlockListSettingsForBlocks
28863
  } = select(store);
@@ -28871,7 +29364,7 @@ function wrapperSelector(select) {
28871
  name,
28872
  attributes = {},
28873
  isValid
28874
- } = __unstableGetBlockWithoutInnerBlocks(clientId) || {};
28875
  const blockParentsClientIds = getBlockParents(clientId); // Get Block List Settings for all ancestors of the current Block clientId
28876
 
28877
  const parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks(blockParentsClientIds); // Get the clientId of the topmost parent with the capture toolbars setting.
@@ -30243,27 +30736,33 @@ function LayoutPanel({
30243
  } = select(store);
30244
  return getSettings().supportsLayout;
30245
  }, []);
30246
-
30247
- if (!themeSupportsLayout) {
30248
- return null;
30249
- }
30250
-
30251
  const {
30252
- allowSwitching: canBlockSwitchLayout,
30253
  allowEditing = true,
30254
  allowInheriting = true,
30255
  default: defaultBlockLayout
30256
- } = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, layoutBlockSupportKey) || {};
30257
 
30258
  if (!allowEditing) {
30259
  return null;
30260
  }
30261
 
30262
- const usedLayout = layout ? layout : defaultBlockLayout || {};
30263
  const {
30264
  inherit = false,
30265
  type = 'default'
30266
  } = usedLayout;
 
 
 
 
 
 
 
 
 
 
30267
  const layoutType = getLayoutType(type);
30268
 
30269
  const onChangeType = newType => setAttributes({
@@ -30276,7 +30775,7 @@ function LayoutPanel({
30276
  layout: newLayout
30277
  });
30278
 
30279
- return (0,external_wp_element_namespaceObject.createElement)(inspector_controls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
30280
  title: (0,external_wp_i18n_namespaceObject.__)('Layout')
30281
  }, allowInheriting && !!defaultThemeLayout && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
30282
  label: (0,external_wp_i18n_namespaceObject.__)('Inherit default layout'),
@@ -30286,13 +30785,18 @@ function LayoutPanel({
30286
  inherit: !inherit
30287
  }
30288
  })
30289
- }), !inherit && canBlockSwitchLayout && (0,external_wp_element_namespaceObject.createElement)(LayoutTypeSwitcher, {
30290
  type: type,
30291
  onChange: onChangeType
30292
- }), !inherit && layoutType && (0,external_wp_element_namespaceObject.createElement)(layoutType.edit, {
30293
  layout: usedLayout,
30294
- onChange: onChangeLayout
30295
- })));
 
 
 
 
 
30296
  }
30297
 
30298
  function LayoutTypeSwitcher({
@@ -30614,6 +31118,7 @@ function getSpacingClassesAndStyles(attributes) {
30614
 
30615
 
30616
 
 
30617
  //# sourceMappingURL=index.js.map
30618
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors/with-colors.js
30619
 
@@ -32934,6 +33439,7 @@ const expanded = (state, action) => {
32934
  * @param {boolean} props.showOnlyCurrentHierarchy Flag to limit the list to the current hierarchy of blocks.
32935
  * @param {boolean} props.__experimentalFeatures Flag to enable experimental features.
32936
  * @param {boolean} props.__experimentalPersistentListViewFeatures Flag to enable features for the Persistent List View experiment.
 
32937
  */
32938
 
32939
 
@@ -32944,7 +33450,7 @@ function ListView({
32944
  __experimentalFeatures,
32945
  __experimentalPersistentListViewFeatures,
32946
  ...props
32947
- }) {
32948
  const {
32949
  clientIdsTree,
32950
  selectedClientIds
@@ -32962,7 +33468,7 @@ function ListView({
32962
  target: blockDropTarget
32963
  } = useListViewDropZone();
32964
  const elementRef = (0,external_wp_element_namespaceObject.useRef)();
32965
- const treeGridRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([elementRef, dropZoneRef]);
32966
  const isMounted = (0,external_wp_element_namespaceObject.useRef)(false);
32967
  (0,external_wp_element_namespaceObject.useEffect)(() => {
32968
  isMounted.current = true;
@@ -33027,6 +33533,8 @@ function ListView({
33027
  selectedBlockClientIds: selectedClientIds
33028
  }, props)))));
33029
  }
 
 
33030
  //# sourceMappingURL=index.js.map
33031
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-navigation/dropdown.js
33032
 
@@ -33091,7 +33599,7 @@ function BlockNavigationDropdown({
33091
  className: "block-editor-block-navigation__container"
33092
  }, (0,external_wp_element_namespaceObject.createElement)("p", {
33093
  className: "block-editor-block-navigation__label"
33094
- }, (0,external_wp_i18n_namespaceObject.__)('List view')), (0,external_wp_element_namespaceObject.createElement)(ListView, {
33095
  showNestedBlocks: true,
33096
  showOnlyCurrentHierarchy: true,
33097
  __experimentalFeatures: __experimentalFeatures
@@ -33915,161 +34423,6 @@ function ImageSizeControl({
33915
  }, (0,external_wp_i18n_namespaceObject.__)('Reset')))));
33916
  }
33917
  //# sourceMappingURL=index.js.map
33918
- ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-left.js
33919
-
33920
-
33921
- /**
33922
- * WordPress dependencies
33923
- */
33924
-
33925
- const justifyLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
33926
- xmlns: "http://www.w3.org/2000/svg",
33927
- viewBox: "0 0 24 24"
33928
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
33929
- d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z"
33930
- }));
33931
- /* harmony default export */ var justify_left = (justifyLeft);
33932
- //# sourceMappingURL=justify-left.js.map
33933
- ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-center.js
33934
-
33935
-
33936
- /**
33937
- * WordPress dependencies
33938
- */
33939
-
33940
- const justifyCenter = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
33941
- xmlns: "http://www.w3.org/2000/svg",
33942
- viewBox: "0 0 24 24"
33943
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
33944
- d: "M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"
33945
- }));
33946
- /* harmony default export */ var justify_center = (justifyCenter);
33947
- //# sourceMappingURL=justify-center.js.map
33948
- ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-right.js
33949
-
33950
-
33951
- /**
33952
- * WordPress dependencies
33953
- */
33954
-
33955
- const justifyRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
33956
- xmlns: "http://www.w3.org/2000/svg",
33957
- viewBox: "0 0 24 24"
33958
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
33959
- d: "M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"
33960
- }));
33961
- /* harmony default export */ var justify_right = (justifyRight);
33962
- //# sourceMappingURL=justify-right.js.map
33963
- ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-space-between.js
33964
-
33965
-
33966
- /**
33967
- * WordPress dependencies
33968
- */
33969
-
33970
- const justifySpaceBetween = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
33971
- xmlns: "http://www.w3.org/2000/svg",
33972
- viewBox: "0 0 24 24"
33973
- }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
33974
- d: "M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"
33975
- }));
33976
- /* harmony default export */ var justify_space_between = (justifySpaceBetween);
33977
- //# sourceMappingURL=justify-space-between.js.map
33978
- ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/justify-content-control/ui.js
33979
-
33980
-
33981
-
33982
- /**
33983
- * WordPress dependencies
33984
- */
33985
-
33986
-
33987
-
33988
- const icons = {
33989
- left: justify_left,
33990
- center: justify_center,
33991
- right: justify_right,
33992
- 'space-between': justify_space_between
33993
- };
33994
-
33995
- function JustifyContentUI({
33996
- allowedControls = ['left', 'center', 'right', 'space-between'],
33997
- isCollapsed = true,
33998
- onChange,
33999
- value,
34000
- popoverProps,
34001
- isToolbar
34002
- }) {
34003
- // If the control is already selected we want a click
34004
- // again on the control to deselect the item, so we
34005
- // call onChange( undefined )
34006
- const handleClick = next => {
34007
- if (next === value) {
34008
- onChange(undefined);
34009
- } else {
34010
- onChange(next);
34011
- }
34012
- };
34013
-
34014
- const icon = value ? icons[value] : icons.left;
34015
- const allControls = [{
34016
- name: 'left',
34017
- icon: justify_left,
34018
- title: (0,external_wp_i18n_namespaceObject.__)('Justify items left'),
34019
- isActive: 'left' === value,
34020
- onClick: () => handleClick('left')
34021
- }, {
34022
- name: 'center',
34023
- icon: justify_center,
34024
- title: (0,external_wp_i18n_namespaceObject.__)('Justify items center'),
34025
- isActive: 'center' === value,
34026
- onClick: () => handleClick('center')
34027
- }, {
34028
- name: 'right',
34029
- icon: justify_right,
34030
- title: (0,external_wp_i18n_namespaceObject.__)('Justify items right'),
34031
- isActive: 'right' === value,
34032
- onClick: () => handleClick('right')
34033
- }, {
34034
- name: 'space-between',
34035
- icon: justify_space_between,
34036
- title: (0,external_wp_i18n_namespaceObject.__)('Space between items'),
34037
- isActive: 'space-between' === value,
34038
- onClick: () => handleClick('space-between')
34039
- }];
34040
- const UIComponent = isToolbar ? external_wp_components_namespaceObject.ToolbarGroup : external_wp_components_namespaceObject.ToolbarDropdownMenu;
34041
- const extraProps = isToolbar ? {
34042
- isCollapsed
34043
- } : {};
34044
- return (0,external_wp_element_namespaceObject.createElement)(UIComponent, _extends({
34045
- icon: icon,
34046
- popoverProps: popoverProps,
34047
- label: (0,external_wp_i18n_namespaceObject.__)('Change items justification'),
34048
- controls: allControls.filter(elem => allowedControls.includes(elem.name))
34049
- }, extraProps));
34050
- }
34051
-
34052
- /* harmony default export */ var justify_content_control_ui = (JustifyContentUI);
34053
- //# sourceMappingURL=ui.js.map
34054
- ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/justify-content-control/index.js
34055
-
34056
-
34057
-
34058
- /**
34059
- * Internal dependencies
34060
- */
34061
-
34062
- function JustifyContentControl(props) {
34063
- return (0,external_wp_element_namespaceObject.createElement)(justify_content_control_ui, _extends({}, props, {
34064
- isToolbar: false
34065
- }));
34066
- }
34067
- function JustifyToolbar(props) {
34068
- return (0,external_wp_element_namespaceObject.createElement)(justify_content_control_ui, _extends({}, props, {
34069
- isToolbar: true
34070
- }));
34071
- }
34072
- //# sourceMappingURL=index.js.map
34073
  ;// CONCATENATED MODULE: ./packages/icons/build-module/library/keyboard-return.js
34074
 
34075
 
@@ -36578,6 +36931,46 @@ function useRemoveBrowserShortcuts() {
36578
  }, []);
36579
  }
36580
  //# sourceMappingURL=use-remove-browser-shortcuts.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36581
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/rich-text/format-edit.js
36582
 
36583
 
@@ -36658,6 +37051,10 @@ function FormatEdit({
36658
 
36659
 
36660
 
 
 
 
 
36661
  /**
36662
  * Removes props used for the native version of RichText so that they are not
36663
  * passed to the DOM element and log warnings.
@@ -36799,7 +37196,6 @@ function RichTextWrapper({
36799
  const {
36800
  value,
36801
  onChange,
36802
- onFocus,
36803
  ref: richTextRef
36804
  } = (0,external_wp_richText_namespaceObject.__unstableUseRichText)({
36805
  value: adjustedValue,
@@ -36840,6 +37236,8 @@ function RichTextWrapper({
36840
  html: adjustedValue,
36841
  value
36842
  });
 
 
36843
 
36844
  function onKeyDown(event) {
36845
  const {
@@ -36879,18 +37277,26 @@ function RichTextWrapper({
36879
  }
36880
  }
36881
 
 
 
 
 
36882
  const TagName = tagName;
36883
- const content = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isSelected && children && children({
 
 
 
 
36884
  value,
36885
  onChange,
36886
  onFocus
36887
- }), isSelected && (0,external_wp_element_namespaceObject.createElement)(FormatEdit, {
36888
  value: value,
36889
  onChange: onChange,
36890
  onFocus: onFocus,
36891
  formatTypes: formatTypes,
36892
  forwardedRef: anchorRef
36893
- }), isSelected && hasFormats && (0,external_wp_element_namespaceObject.createElement)(format_toolbar_container, {
36894
  inline: inlineToolbar,
36895
  anchorRef: anchorRef.current
36896
  }), (0,external_wp_element_namespaceObject.createElement)(TagName // Overridable props.
@@ -36905,7 +37311,7 @@ function RichTextWrapper({
36905
  __unstableAllowPrefixTransformations,
36906
  formatTypes,
36907
  onReplace
36908
- }), useRemoveBrowserShortcuts(), useUndoAutomaticChange(), usePasteHandler({
36909
  isSelected,
36910
  disableFormats,
36911
  onChange,
@@ -37517,7 +37923,7 @@ const InsertFromURLPopover = ({
37517
  onSubmit: onSubmit
37518
  }, (0,external_wp_element_namespaceObject.createElement)("input", {
37519
  className: "block-editor-media-placeholder__url-input-field",
37520
- type: "url",
37521
  "aria-label": (0,external_wp_i18n_namespaceObject.__)('URL'),
37522
  placeholder: (0,external_wp_i18n_namespaceObject.__)('Paste or type URL'),
37523
  onChange: onChange,
@@ -38070,19 +38476,32 @@ function ResponsiveBlockControl(props) {
38070
  */
38071
 
38072
 
 
 
 
 
 
38073
  function RichTextShortcut({
38074
  character,
38075
  type,
38076
  onUse
38077
  }) {
38078
- const callback = () => {
38079
- onUse();
38080
- return false;
38081
- };
 
 
 
 
 
 
38082
 
38083
- (0,external_wp_compose_namespaceObject.useKeyboardShortcut)(external_wp_keycodes_namespaceObject.rawShortcut[type](character), callback, {
38084
- bindGlobal: true
38085
- });
 
 
38086
  return null;
38087
  }
38088
  //# sourceMappingURL=shortcut.js.map
@@ -38124,30 +38543,32 @@ function RichTextToolbarButton({
38124
  * WordPress dependencies
38125
  */
38126
 
38127
- class __unstableRichTextInputEvent extends external_wp_element_namespaceObject.Component {
38128
- constructor() {
38129
- super(...arguments);
38130
- this.onInput = this.onInput.bind(this);
38131
- }
38132
-
38133
- onInput(event) {
38134
- if (event.inputType === this.props.inputType) {
38135
- this.props.onInput();
38136
- }
38137
- }
38138
-
38139
- componentDidMount() {
38140
- document.addEventListener('input', this.onInput, true);
38141
- }
38142
 
38143
- componentWillUnmount() {
38144
- document.removeEventListener('input', this.onInput, true);
38145
- }
38146
 
38147
- render() {
38148
- return null;
38149
- }
 
 
 
 
 
 
 
 
 
 
 
38150
 
 
 
 
 
 
 
38151
  }
38152
  //# sourceMappingURL=input-event.js.map
38153
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/tool-selector/index.js
5851
  "__experimentalLinkControlSearchInput": function() { return /* reexport */ search_input; },
5852
  "__experimentalLinkControlSearchItem": function() { return /* reexport */ search_item; },
5853
  "__experimentalLinkControlSearchResults": function() { return /* reexport */ LinkControlSearchResults; },
5854
+ "__experimentalListView": function() { return /* reexport */ components_list_view; },
5855
  "__experimentalListViewBlockFill": function() { return /* reexport */ ListViewBlockFill; },
5856
  "__experimentalListViewEditor": function() { return /* reexport */ ListViewEditor; },
5857
  "__experimentalPanelColorGradientSettings": function() { return /* reexport */ panel_color_gradient_settings; },
5913
  "__experimentalGetPatternTransformItems": function() { return __experimentalGetPatternTransformItems; },
5914
  "__experimentalGetPatternsByBlockTypes": function() { return __experimentalGetPatternsByBlockTypes; },
5915
  "__experimentalGetReusableBlockTitle": function() { return __experimentalGetReusableBlockTitle; },
 
 
5916
  "__unstableGetBlockWithoutInnerBlocks": function() { return __unstableGetBlockWithoutInnerBlocks; },
5917
  "__unstableGetClientIdWithClientIdsTree": function() { return __unstableGetClientIdWithClientIdsTree; },
5918
  "__unstableGetClientIdsTree": function() { return __unstableGetClientIdsTree; },
6050
  "validateBlocksToTemplate": function() { return validateBlocksToTemplate; }
6051
  });
6052
 
6053
+ ;// CONCATENATED MODULE: external ["wp","blocks"]
6054
+ var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
6055
+ ;// CONCATENATED MODULE: external ["wp","hooks"]
6056
+ var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
6057
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/compat.js
6058
+ /**
6059
+ * WordPress dependencies
6060
+ */
6061
+
6062
+
6063
+
6064
+ function migrateLightBlockWrapper(settings) {
6065
+ const {
6066
+ apiVersion = 1
6067
+ } = settings;
6068
+
6069
+ if (apiVersion < 2 && (0,external_wp_blocks_namespaceObject.hasBlockSupport)(settings, 'lightBlockWrapper', false)) {
6070
+ settings.apiVersion = 2;
6071
+ }
6072
+
6073
+ return settings;
6074
+ }
6075
+
6076
+ (0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/compat/migrateLightBlockWrapper', migrateLightBlockWrapper);
6077
+ //# sourceMappingURL=compat.js.map
6078
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
6079
  function _extends() {
6080
  _extends = Object.assign || function (target) {
6102
  var external_lodash_namespaceObject = window["lodash"];
6103
  ;// CONCATENATED MODULE: external ["wp","compose"]
6104
  var external_wp_compose_namespaceObject = window["wp"]["compose"];
 
 
 
 
6105
  ;// CONCATENATED MODULE: external ["wp","components"]
6106
  var external_wp_components_namespaceObject = window["wp"]["components"];
6107
  ;// CONCATENATED MODULE: external ["wp","data"]
6549
  function isUpdatingSameBlockAttribute(action, lastAction) {
6550
  return action.type === 'UPDATE_BLOCK_ATTRIBUTES' && lastAction !== undefined && lastAction.type === 'UPDATE_BLOCK_ATTRIBUTES' && (0,external_lodash_namespaceObject.isEqual)(action.clientIds, lastAction.clientIds) && hasSameKeys(action.attributes, lastAction.attributes);
6551
  }
 
 
 
 
 
 
6552
 
6553
+ function buildBlockTree(state, blocks) {
6554
+ const result = {};
6555
+ const stack = [...blocks];
6556
+ const flattenedBlocks = [...blocks];
6557
+
6558
+ while (stack.length) {
6559
+ const block = stack.shift();
6560
+ stack.push(...block.innerBlocks);
6561
+ flattenedBlocks.push(...block.innerBlocks);
6562
+ } // Create objects before mutating them, that way it's always defined.
6563
+
6564
+
6565
+ for (const block of flattenedBlocks) {
6566
+ result[block.clientId] = {};
6567
+ }
6568
+
6569
+ for (const block of flattenedBlocks) {
6570
+ result[block.clientId] = Object.assign(result[block.clientId], { ...state.byClientId[block.clientId],
6571
+ attributes: state.attributes[block.clientId],
6572
+ innerBlocks: block.innerBlocks.map(subBlock => result[subBlock.clientId])
6573
+ });
6574
+ }
6575
+
6576
+ return result;
6577
+ }
6578
+
6579
+ function updateParentInnerBlocksInTree(state, tree, updatedClientIds) {
6580
+ const clientIds = new Set([]);
6581
+ const controlledParents = new Set();
6582
+
6583
+ for (const clientId of updatedClientIds) {
6584
+ let current = clientId;
6585
+
6586
+ do {
6587
+ if (state.controlledInnerBlocks[current]) {
6588
+ controlledParents.add(current); // If we reach a controlled parent, break out of the loop.
6589
+
6590
+ break;
6591
+ } else {
6592
+ clientIds.add(current);
6593
+ } // Should stop on controlled blocks.
6594
+
6595
+
6596
+ current = state.parents[current];
6597
+ } while (current !== undefined);
6598
+ } // To make sure the order of assignments doesn't matter,
6599
+ // we first create empty objects and mutates the inner blocks later.
6600
+
6601
+
6602
+ for (const clientId of clientIds) {
6603
+ tree[clientId] = { ...tree[clientId]
6604
+ };
6605
+ }
6606
+
6607
+ for (const clientId of clientIds) {
6608
+ tree[clientId].innerBlocks = (state.order[clientId] || []).map(subClientId => tree[subClientId]);
6609
+ } // Controlled parent blocks, need a dedicated key for their inner blocks
6610
+ // to be used when doing getBlocks( controlledBlockClientId ).
6611
+
6612
+
6613
+ for (const clientId of controlledParents) {
6614
+ tree['controlled||' + clientId] = {
6615
+ innerBlocks: (state.order[clientId] || []).map(subClientId => tree[subClientId])
6616
+ };
6617
+ }
6618
+
6619
+ return tree;
6620
+ }
6621
  /**
6622
+ * Higher-order reducer intended to compute full block objects key for each block in the post.
6623
+ * This is a denormalization to optimize the performance of the getBlock selectors and avoid
6624
+ * recomputing the block objects and avoid heavy memoization.
6625
  *
6626
  * @param {Function} reducer Original reducer function.
6627
  *
6629
  */
6630
 
6631
 
6632
+ const withBlockTree = reducer => (state = {}, action) => {
6633
  const newState = reducer(state, action);
6634
 
6635
  if (newState === state) {
6636
  return state;
6637
  }
6638
 
6639
+ newState.tree = state.tree ? state.tree : {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6640
 
6641
  switch (action.type) {
 
 
 
 
6642
  case 'RECEIVE_BLOCKS':
6643
  case 'INSERT_BLOCKS':
6644
  {
6645
+ const subTree = buildBlockTree(newState, action.blocks);
6646
+ newState.tree = updateParentInnerBlocksInTree(newState, { ...newState.tree,
6647
+ ...subTree
6648
+ }, action.rootClientId ? [action.rootClientId] : ['']);
 
 
 
 
 
6649
  break;
6650
  }
6651
 
6652
  case 'UPDATE_BLOCK':
6653
+ newState.tree = updateParentInnerBlocksInTree(newState, { ...newState.tree,
6654
+ [action.clientId]: { ...newState.byClientId[action.clientId],
6655
+ attributes: newState.attributes[action.clientId]
6656
+ }
6657
+ }, [action.clientId]);
6658
  break;
6659
 
6660
  case 'UPDATE_BLOCK_ATTRIBUTES':
6661
+ {
6662
+ const newSubTree = action.clientIds.reduce((result, clientId) => {
6663
+ result[clientId] = { ...newState.tree[clientId],
6664
+ attributes: newState.attributes[clientId]
6665
+ };
6666
+ return result;
6667
+ }, {});
6668
+ newState.tree = updateParentInnerBlocksInTree(newState, { ...newState.tree,
6669
+ ...newSubTree
6670
+ }, action.clientIds);
6671
+ break;
6672
+ }
6673
 
6674
  case 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':
6675
+ {
6676
+ const subTree = buildBlockTree(newState, action.blocks);
6677
+ newState.tree = updateParentInnerBlocksInTree(newState, { ...(0,external_lodash_namespaceObject.omit)(newState.tree, action.replacedClientIds.concat(action.replacedClientIds.map(clientId => 'controlled||' + clientId))),
6678
+ ...subTree
6679
+ }, action.blocks.map(b => b.clientId));
6680
+ break;
6681
+ }
6682
 
6683
  case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
6684
+ const parentsOfRemovedBlocks = [];
6685
+
6686
+ for (const clientId of action.clientIds) {
6687
+ if (state.parents[clientId] !== undefined && (state.parents[clientId] === '' || newState.byClientId[state.parents[clientId]])) {
6688
+ parentsOfRemovedBlocks.push(state.parents[clientId]);
6689
+ }
6690
+ }
6691
+
6692
+ newState.tree = updateParentInnerBlocksInTree(newState, (0,external_lodash_namespaceObject.omit)(newState.tree, action.removedClientIds.concat(action.removedClientIds.map(clientId => 'controlled||' + clientId))), parentsOfRemovedBlocks);
6693
  break;
6694
 
6695
  case 'MOVE_BLOCKS_TO_POSITION':
6696
  {
6697
+ const updatedBlockUids = [];
6698
 
6699
  if (action.fromRootClientId) {
6700
  updatedBlockUids.push(action.fromRootClientId);
6704
  updatedBlockUids.push(action.toRootClientId);
6705
  }
6706
 
6707
+ if (!action.fromRootClientId || !action.fromRootClientId) {
6708
+ updatedBlockUids.push('');
6709
+ }
6710
+
6711
+ newState.tree = updateParentInnerBlocksInTree(newState, newState.tree, updatedBlockUids);
6712
  break;
6713
  }
6714
 
6715
  case 'MOVE_BLOCKS_UP':
6716
  case 'MOVE_BLOCKS_DOWN':
6717
  {
6718
+ const updatedBlockUids = [action.rootClientId ? action.rootClientId : ''];
6719
+ newState.tree = updateParentInnerBlocksInTree(newState, newState.tree, updatedBlockUids);
 
 
 
 
 
 
 
6720
  break;
6721
  }
6722
 
6725
  const updatedBlockUids = (0,external_lodash_namespaceObject.keys)((0,external_lodash_namespaceObject.omitBy)(newState.attributes, (attributes, clientId) => {
6726
  return newState.byClientId[clientId].name !== 'core/block' || attributes.ref !== action.updatedId;
6727
  }));
6728
+ newState.tree = updateParentInnerBlocksInTree(newState, { ...newState.tree,
6729
+ ...updatedBlockUids.reduce((result, clientId) => {
6730
+ result[clientId] = { ...newState.byClientId[clientId],
6731
+ attributes: newState.attributes[clientId],
6732
+ innerBlocks: newState.tree[clientId].innerBlocks
6733
+ };
6734
+ return result;
6735
+ }, {})
6736
+ }, updatedBlockUids);
6737
  }
6738
  }
6739
 
6877
 
6878
 
6879
  const withBlockReset = reducer => (state, action) => {
6880
+ if (action.type === 'RESET_BLOCKS') {
6881
+ var _state$order, _state$controlledInne, _state$controlledInne2;
6882
+
6883
  /**
6884
  * A list of client IDs associated with the top level entity (like a
6885
  * post or template). It excludes the client IDs of blocks associated
6886
  * with other entities, like inner block controllers or reusable blocks.
6887
  */
6888
+ const visibleClientIds = getNestedBlockClientIds((_state$order = state === null || state === void 0 ? void 0 : state.order) !== null && _state$order !== void 0 ? _state$order : {}, '', (_state$controlledInne = state === null || state === void 0 ? void 0 : state.controlledInnerBlocks) !== null && _state$controlledInne !== void 0 ? _state$controlledInne : {}); // pickBy returns only the truthy values from controlledInnerBlocks
6889
 
6890
+ const controlledInnerBlocks = Object.keys((0,external_lodash_namespaceObject.pickBy)((_state$controlledInne2 = state === null || state === void 0 ? void 0 : state.controlledInnerBlocks) !== null && _state$controlledInne2 !== void 0 ? _state$controlledInne2 : {}));
6891
  /**
6892
  * Each update operation consists of a few parts:
6893
  * 1. First, the client IDs associated with the top level entity are
6910
  * whenever you try to undo a change in the top level entity.
6911
  */
6912
 
6913
+ const newState = { ...state,
6914
+ byClientId: { ...(0,external_lodash_namespaceObject.omit)(state === null || state === void 0 ? void 0 : state.byClientId, visibleClientIds),
6915
  ...getFlattenedBlocksWithoutAttributes(action.blocks)
6916
  },
6917
+ attributes: { ...(0,external_lodash_namespaceObject.omit)(state === null || state === void 0 ? void 0 : state.attributes, visibleClientIds),
6918
  ...getFlattenedBlockAttributes(action.blocks)
6919
  },
6920
+ order: { ...(0,external_lodash_namespaceObject.omit)(state === null || state === void 0 ? void 0 : state.order, visibleClientIds),
6921
  ...(0,external_lodash_namespaceObject.omit)(mapBlockOrder(action.blocks), controlledInnerBlocks)
6922
  },
6923
+ parents: { ...(0,external_lodash_namespaceObject.omit)(state === null || state === void 0 ? void 0 : state.parents, visibleClientIds),
6924
  ...mapBlockParents(action.blocks)
6925
  },
6926
+ controlledInnerBlocks: (state === null || state === void 0 ? void 0 : state.controlledInnerBlocks) || {}
6927
+ };
6928
+ const subTree = buildBlockTree(newState, action.blocks);
6929
+ newState.tree = { ...(0,external_lodash_namespaceObject.omit)(state === null || state === void 0 ? void 0 : state.tree, visibleClientIds),
6930
+ ...subTree,
6931
+ // Root
6932
+ '': {
6933
+ innerBlocks: action.blocks.map(subBlock => subTree[subBlock.clientId])
6934
  }
6935
  };
6936
+ return newState;
6937
  }
6938
 
6939
  return reducer(state, action);
7069
 
7070
 
7071
  const blocks = (0,external_lodash_namespaceObject.flow)(external_wp_data_namespaceObject.combineReducers, withSaveReusableBlock, // needs to be before withBlockCache
7072
+ withBlockTree, // needs to be before withInnerBlocksRemoveCascade
7073
  withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // needs to be after withInnerBlocksRemoveCascade
7074
  withBlockReset, withPersistentBlockChange, withIgnoredBlockChange)({
7075
  byClientId(state = {}, action) {
7076
  switch (action.type) {
 
 
 
7077
  case 'RECEIVE_BLOCKS':
7078
  case 'INSERT_BLOCKS':
7079
  return { ...state,
7117
 
7118
  attributes(state = {}, action) {
7119
  switch (action.type) {
 
 
 
7120
  case 'RECEIVE_BLOCKS':
7121
  case 'INSERT_BLOCKS':
7122
  return { ...state,
7181
 
7182
  order(state = {}, action) {
7183
  switch (action.type) {
 
 
 
7184
  case 'RECEIVE_BLOCKS':
7185
+ {
7186
+ const blockOrder = mapBlockOrder(action.blocks);
7187
+ return { ...state,
7188
+ ...(0,external_lodash_namespaceObject.omit)(blockOrder, ''),
7189
+ '': ((state === null || state === void 0 ? void 0 : state['']) || []).concat(blockOrder)
7190
+ };
7191
+ }
7192
 
7193
  case 'INSERT_BLOCKS':
7194
  {
7310
  // an optimization for the selectors which derive the ancestry of a block.
7311
  parents(state = {}, action) {
7312
  switch (action.type) {
 
 
 
7313
  case 'RECEIVE_BLOCKS':
7314
  return { ...state,
7315
  ...mapBlockParents(action.blocks)
7472
  return state;
7473
  }
7474
 
7475
+ const blockToSelect = action.blocks[action.indexToSelect] || action.blocks[action.blocks.length - 1];
 
7476
 
7477
  if (!blockToSelect) {
7478
  return {};
8414
  * @return {Object} Parsed block object.
8415
  */
8416
 
8417
+ function getBlock(state, clientId) {
8418
  const block = state.blocks.byClientId[clientId];
8419
 
8420
  if (!block) {
8421
  return null;
8422
  }
8423
 
8424
+ return state.blocks.tree[clientId];
8425
+ }
 
 
 
 
 
 
 
 
8426
  const __unstableGetBlockWithoutInnerBlocks = rememo((state, clientId) => {
8427
  const block = state.blocks.byClientId[clientId];
8428
 
8439
  * the order they appear in the post. Note that this will exclude child blocks
8440
  * of nested inner block controllers.
8441
  *
 
 
 
 
 
 
8442
  * @param {Object} state Editor state.
8443
  * @param {?string} rootClientId Optional root client ID of block list.
8444
  *
8445
  * @return {Object[]} Post blocks.
8446
  */
8447
 
8448
+ function getBlocks(state, rootClientId) {
8449
+ var _state$blocks$tree$tr;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8450
 
8451
+ const treeKey = !rootClientId || !areInnerBlocksControlled(state, rootClientId) ? rootClientId || '' : 'controlled||' + rootClientId;
8452
+ return ((_state$blocks$tree$tr = state.blocks.tree[treeKey]) === null || _state$blocks$tree$tr === void 0 ? void 0 : _state$blocks$tree$tr.innerBlocks) || EMPTY_ARRAY;
8453
+ }
8454
  /**
8455
  * Returns a stripped down block object containing only its client ID,
8456
  * and its inner blocks' client IDs.
8536
  * @return {WPBlock[]} Block objects.
8537
  */
8538
 
8539
+ const getBlocksByClientId = rememo((state, clientIds) => (0,external_lodash_namespaceObject.map)((0,external_lodash_namespaceObject.castArray)(clientIds), clientId => getBlock(state, clientId)), (state, clientIds) => (0,external_lodash_namespaceObject.map)((0,external_lodash_namespaceObject.castArray)(clientIds), clientId => state.blocks.tree[clientId]));
8540
  /**
8541
  * Returns the number of blocks currently present in the post.
8542
  *
10418
  * Unlike resetBlocks, these should be appended to the existing known set, not
10419
  * replacing.
10420
  *
10421
+ * @deprecated
10422
+ *
10423
  * @param {Object[]} blocks Array of block objects.
10424
  *
10425
  * @return {Object} Action object.
10426
  */
10427
 
10428
  function receiveBlocks(blocks) {
10429
+ external_wp_deprecated_default()('wp.data.dispatch( "core/block-editor" ).receiveBlocks', {
10430
+ since: '5.9',
10431
+ alternative: 'resetBlocks or insertBlocks'
10432
+ });
10433
  return {
10434
  type: 'RECEIVE_BLOCKS',
10435
  blocks
11003
  attributes: { ...blockA.attributes,
11004
  ...updatedAttributes
11005
  }
11006
+ }, ...blocksWithTheSameType.slice(1)], 0 // If we don't pass the `indexToSelect` it will default to the last block.
11007
+ );
11008
  }
11009
  /**
11010
  * Yields action objects used in signalling that the blocks corresponding to
11785
  }));
11786
  /* harmony default export */ var stretch_full_width = (stretchFullWidth);
11787
  //# sourceMappingURL=stretch-full-width.js.map
11788
+ ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-left.js
11789
+
11790
+
11791
+ /**
11792
+ * WordPress dependencies
11793
+ */
11794
+
11795
+ const justifyLeft = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
11796
+ xmlns: "http://www.w3.org/2000/svg",
11797
+ viewBox: "0 0 24 24"
11798
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
11799
+ d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z"
11800
+ }));
11801
+ /* harmony default export */ var justify_left = (justifyLeft);
11802
+ //# sourceMappingURL=justify-left.js.map
11803
+ ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-center.js
11804
+
11805
+
11806
+ /**
11807
+ * WordPress dependencies
11808
+ */
11809
+
11810
+ const justifyCenter = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
11811
+ xmlns: "http://www.w3.org/2000/svg",
11812
+ viewBox: "0 0 24 24"
11813
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
11814
+ d: "M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"
11815
+ }));
11816
+ /* harmony default export */ var justify_center = (justifyCenter);
11817
+ //# sourceMappingURL=justify-center.js.map
11818
+ ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-right.js
11819
+
11820
+
11821
+ /**
11822
+ * WordPress dependencies
11823
+ */
11824
+
11825
+ const justifyRight = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
11826
+ xmlns: "http://www.w3.org/2000/svg",
11827
+ viewBox: "0 0 24 24"
11828
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
11829
+ d: "M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"
11830
+ }));
11831
+ /* harmony default export */ var justify_right = (justifyRight);
11832
+ //# sourceMappingURL=justify-right.js.map
11833
+ ;// CONCATENATED MODULE: ./packages/icons/build-module/library/justify-space-between.js
11834
+
11835
+
11836
+ /**
11837
+ * WordPress dependencies
11838
+ */
11839
+
11840
+ const justifySpaceBetween = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
11841
+ xmlns: "http://www.w3.org/2000/svg",
11842
+ viewBox: "0 0 24 24"
11843
+ }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
11844
+ d: "M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"
11845
+ }));
11846
+ /* harmony default export */ var justify_space_between = (justifySpaceBetween);
11847
+ //# sourceMappingURL=justify-space-between.js.map
11848
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/utils.js
11849
  /**
11850
  * Utility to generate the proper CSS selector for layout styles.
11863
  return selectors.split(',').map(subselector => `.editor-styles-wrapper ${subselector} ${append}`).join(',');
11864
  }
11865
  //# sourceMappingURL=utils.js.map
11866
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/use-setting/index.js
11867
+ /**
11868
+ * External dependencies
11869
+ */
11870
 
11871
  /**
11872
  * WordPress dependencies
11873
  */
11874
 
11875
+
11876
+
11877
  /**
11878
  * Internal dependencies
11879
  */
11880
 
11881
 
 
 
 
 
 
 
 
11882
 
11883
+ const deprecatedFlags = {
11884
+ 'color.palette': settings => settings.colors === undefined ? undefined : settings.colors,
11885
+ 'color.gradients': settings => settings.gradients === undefined ? undefined : settings.gradients,
11886
+ 'color.custom': settings => settings.disableCustomColors === undefined ? undefined : !settings.disableCustomColors,
11887
+ 'color.customGradient': settings => settings.disableCustomGradients === undefined ? undefined : !settings.disableCustomGradients,
11888
+ 'typography.fontSizes': settings => settings.fontSizes === undefined ? undefined : settings.fontSizes,
11889
+ 'typography.customFontSize': settings => settings.disableCustomFontSizes === undefined ? undefined : !settings.disableCustomFontSizes,
11890
+ 'typography.customLineHeight': settings => settings.enableCustomLineHeight,
11891
+ 'spacing.units': settings => {
11892
+ if (settings.enableCustomUnits === undefined) {
11893
+ return;
11894
+ }
11895
 
11896
+ if (settings.enableCustomUnits === true) {
11897
+ return ['px', 'em', 'rem', 'vh', 'vw', '%'];
11898
+ }
 
 
11899
 
11900
+ return settings.enableCustomUnits;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11901
  },
11902
  'spacing.customPadding': settings => settings.enableCustomSpacing
11903
  };
 
 
 
 
 
 
11904
  /**
11905
  * Hook that retrieves the editor setting.
11906
  * It works with nested objects using by finding the value at path.
11930
  const experimentalFeaturesResult = (_get = (0,external_lodash_namespaceObject.get)(settings, blockPath)) !== null && _get !== void 0 ? _get : (0,external_lodash_namespaceObject.get)(settings, defaultsPath);
11931
 
11932
  if (experimentalFeaturesResult !== undefined) {
11933
+ if (external_wp_blocks_namespaceObject.__EXPERIMENTAL_PATHS_WITH_MERGE[path]) {
11934
  var _ref, _experimentalFeatures;
11935
 
11936
  return (_ref = (_experimentalFeatures = experimentalFeaturesResult.user) !== null && _experimentalFeatures !== void 0 ? _experimentalFeatures : experimentalFeaturesResult.theme) !== null && _ref !== void 0 ? _ref : experimentalFeaturesResult.core;
11955
  return setting;
11956
  }
11957
  //# sourceMappingURL=index.js.map
11958
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/justify-content-control/ui.js
11959
+
11960
+
11961
+
11962
+ /**
11963
+ * WordPress dependencies
11964
+ */
11965
+
11966
+
11967
+
11968
+ const icons = {
11969
+ left: justify_left,
11970
+ center: justify_center,
11971
+ right: justify_right,
11972
+ 'space-between': justify_space_between
11973
+ };
11974
+
11975
+ function JustifyContentUI({
11976
+ allowedControls = ['left', 'center', 'right', 'space-between'],
11977
+ isCollapsed = true,
11978
+ onChange,
11979
+ value,
11980
+ popoverProps,
11981
+ isToolbar
11982
+ }) {
11983
+ // If the control is already selected we want a click
11984
+ // again on the control to deselect the item, so we
11985
+ // call onChange( undefined )
11986
+ const handleClick = next => {
11987
+ if (next === value) {
11988
+ onChange(undefined);
11989
+ } else {
11990
+ onChange(next);
11991
+ }
11992
+ };
11993
+
11994
+ const icon = value ? icons[value] : icons.left;
11995
+ const allControls = [{
11996
+ name: 'left',
11997
+ icon: justify_left,
11998
+ title: (0,external_wp_i18n_namespaceObject.__)('Justify items left'),
11999
+ isActive: 'left' === value,
12000
+ onClick: () => handleClick('left')
12001
+ }, {
12002
+ name: 'center',
12003
+ icon: justify_center,
12004
+ title: (0,external_wp_i18n_namespaceObject.__)('Justify items center'),
12005
+ isActive: 'center' === value,
12006
+ onClick: () => handleClick('center')
12007
+ }, {
12008
+ name: 'right',
12009
+ icon: justify_right,
12010
+ title: (0,external_wp_i18n_namespaceObject.__)('Justify items right'),
12011
+ isActive: 'right' === value,
12012
+ onClick: () => handleClick('right')
12013
+ }, {
12014
+ name: 'space-between',
12015
+ icon: justify_space_between,
12016
+ title: (0,external_wp_i18n_namespaceObject.__)('Space between items'),
12017
+ isActive: 'space-between' === value,
12018
+ onClick: () => handleClick('space-between')
12019
+ }];
12020
+ const UIComponent = isToolbar ? external_wp_components_namespaceObject.ToolbarGroup : external_wp_components_namespaceObject.ToolbarDropdownMenu;
12021
+ const extraProps = isToolbar ? {
12022
+ isCollapsed
12023
+ } : {};
12024
+ return (0,external_wp_element_namespaceObject.createElement)(UIComponent, _extends({
12025
+ icon: icon,
12026
+ popoverProps: popoverProps,
12027
+ label: (0,external_wp_i18n_namespaceObject.__)('Change items justification'),
12028
+ controls: allControls.filter(elem => allowedControls.includes(elem.name))
12029
+ }, extraProps));
12030
+ }
12031
+
12032
+ /* harmony default export */ var ui = (JustifyContentUI);
12033
+ //# sourceMappingURL=ui.js.map
12034
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/justify-content-control/index.js
12035
+
12036
+
12037
+
12038
+ /**
12039
+ * Internal dependencies
12040
+ */
12041
+
12042
+ function JustifyContentControl(props) {
12043
+ return (0,external_wp_element_namespaceObject.createElement)(ui, _extends({}, props, {
12044
+ isToolbar: false
12045
+ }));
12046
+ }
12047
+ function JustifyToolbar(props) {
12048
+ return (0,external_wp_element_namespaceObject.createElement)(ui, _extends({}, props, {
12049
+ isToolbar: true
12050
+ }));
12051
+ }
12052
+ //# sourceMappingURL=index.js.map
12053
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/flex.js
12054
+
12055
+
12056
+ /**
12057
+ * WordPress dependencies
12058
+ */
12059
+
12060
+
12061
+
12062
+ /**
12063
+ * Internal dependencies
12064
+ */
12065
+
12066
+
12067
+
12068
+
12069
+ const justifyContentMap = {
12070
+ left: 'flex-start',
12071
+ right: 'flex-end',
12072
+ center: 'center',
12073
+ 'space-between': 'space-between'
12074
+ };
12075
+ /* harmony default export */ var flex = ({
12076
+ name: 'flex',
12077
+ label: (0,external_wp_i18n_namespaceObject.__)('Flex'),
12078
+ inspectorControls: function FlexLayoutInspectorControls({
12079
+ layout = {},
12080
+ onChange
12081
+ }) {
12082
+ return (0,external_wp_element_namespaceObject.createElement)(FlexLayoutJustifyContentControl, {
12083
+ layout: layout,
12084
+ onChange: onChange
12085
+ });
12086
+ },
12087
+ toolBarControls: function FlexLayoutToolbarControls({
12088
+ layout = {},
12089
+ onChange,
12090
+ layoutBlockSupport
12091
+ }) {
12092
+ if (layoutBlockSupport !== null && layoutBlockSupport !== void 0 && layoutBlockSupport.allowSwitching) {
12093
+ return null;
12094
+ }
12095
+
12096
+ return (0,external_wp_element_namespaceObject.createElement)(block_controls, {
12097
+ group: "block",
12098
+ __experimentalExposeToChildren: true
12099
+ }, (0,external_wp_element_namespaceObject.createElement)(FlexLayoutJustifyContentControl, {
12100
+ layout: layout,
12101
+ onChange: onChange,
12102
+ isToolbar: true
12103
+ }));
12104
+ },
12105
+ save: function FlexLayoutStyle({
12106
+ selector,
12107
+ layout
12108
+ }) {
12109
+ const blockGapSupport = useSetting('spacing.blockGap');
12110
+ const hasBlockGapStylesSupport = blockGapSupport !== null;
12111
+ const justifyContent = justifyContentMap[layout.justifyContent] || 'flex-start';
12112
+ return (0,external_wp_element_namespaceObject.createElement)("style", null, `
12113
+ ${appendSelectors(selector)} {
12114
+ display: flex;
12115
+ gap: ${hasBlockGapStylesSupport ? 'var( --wp--style--block-gap, 0.5em )' : '0.5em'};
12116
+ flex-wrap: wrap;
12117
+ align-items: center;
12118
+ flex-direction: row;
12119
+ justify-content: ${justifyContent};
12120
+ }
12121
+
12122
+ ${appendSelectors(selector, '> *')} {
12123
+ margin: 0;
12124
+ }
12125
+ `);
12126
+ },
12127
+
12128
+ getOrientation() {
12129
+ return 'horizontal';
12130
+ },
12131
+
12132
+ getAlignments() {
12133
+ return [];
12134
+ }
12135
+
12136
+ });
12137
+ const justificationOptions = [{
12138
+ value: 'left',
12139
+ icon: justify_left,
12140
+ label: (0,external_wp_i18n_namespaceObject.__)('Justify items left')
12141
+ }, {
12142
+ value: 'center',
12143
+ icon: justify_center,
12144
+ label: (0,external_wp_i18n_namespaceObject.__)('Justify items center')
12145
+ }, {
12146
+ value: 'right',
12147
+ icon: justify_right,
12148
+ label: (0,external_wp_i18n_namespaceObject.__)('Justify items right')
12149
+ }, {
12150
+ value: 'space-between',
12151
+ icon: justify_space_between,
12152
+ label: (0,external_wp_i18n_namespaceObject.__)('Space between items')
12153
+ }];
12154
+
12155
+ function FlexLayoutJustifyContentControl({
12156
+ layout,
12157
+ onChange,
12158
+ isToolbar = false
12159
+ }) {
12160
+ const {
12161
+ justifyContent = 'left'
12162
+ } = layout;
12163
+
12164
+ const onJustificationChange = value => {
12165
+ onChange({ ...layout,
12166
+ justifyContent: value
12167
+ });
12168
+ };
12169
+
12170
+ if (isToolbar) {
12171
+ return (0,external_wp_element_namespaceObject.createElement)(JustifyContentControl, {
12172
+ allowedControls: ['left', 'center', 'right', 'space-between'],
12173
+ value: justifyContent,
12174
+ onChange: onJustificationChange,
12175
+ popoverProps: {
12176
+ position: 'bottom right',
12177
+ isAlternate: true
12178
+ }
12179
+ });
12180
+ }
12181
+
12182
+ return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
12183
+ className: "block-editor-hooks__flex-layout-justification-controls"
12184
+ }, (0,external_wp_element_namespaceObject.createElement)("legend", null, (0,external_wp_i18n_namespaceObject.__)('Justification')), (0,external_wp_element_namespaceObject.createElement)("div", null, justificationOptions.map(({
12185
+ value,
12186
+ icon,
12187
+ label
12188
+ }) => {
12189
+ return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
12190
+ key: value,
12191
+ label: label,
12192
+ icon: icon,
12193
+ isPressed: justifyContent === value,
12194
+ onClick: () => onJustificationChange(value)
12195
+ });
12196
+ })));
12197
+ }
12198
+ //# sourceMappingURL=flex.js.map
12199
+ ;// CONCATENATED MODULE: ./packages/icons/build-module/icon/index.js
12200
+ /**
12201
+ * WordPress dependencies
12202
+ */
12203
+
12204
+ /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
12205
+
12206
+ /**
12207
+ * Return an SVG icon.
12208
+ *
12209
+ * @param {IconProps} props icon is the SVG component to render
12210
+ * size is a number specifiying the icon size in pixels
12211
+ * Other props will be passed to wrapped SVG component
12212
+ *
12213
+ * @return {JSX.Element} Icon component
12214
+ */
12215
+
12216
+ function Icon({
12217
+ icon,
12218
+ size = 24,
12219
+ ...props
12220
+ }) {
12221
+ return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
12222
+ width: size,
12223
+ height: size,
12224
+ ...props
12225
+ });
12226
+ }
12227
+
12228
+ /* harmony default export */ var icon = (Icon);
12229
+ //# sourceMappingURL=index.js.map
12230
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/layouts/flow.js
12231
 
12232
 
12245
  /* harmony default export */ var flow = ({
12246
  name: 'default',
12247
  label: (0,external_wp_i18n_namespaceObject.__)('Flow'),
12248
+ inspectorControls: function DefaultLayoutInspectorControls({
12249
  layout,
12250
  onChange
12251
  }) {
12305
  className: "block-editor-hooks__layout-controls-helptext"
12306
  }, (0,external_wp_i18n_namespaceObject.__)('Customize the width for all elements that are assigned to the center or wide columns.')));
12307
  },
12308
+ toolBarControls: function DefaultLayoutToolbarControls() {
12309
+ return null;
12310
+ },
12311
  save: function DefaultLayoutStyle({
12312
  selector,
12313
  layout = {}
12316
  contentSize,
12317
  wideSize
12318
  } = layout;
12319
+ const blockGapSupport = useSetting('spacing.blockGap');
12320
+ const hasBlockGapStylesSupport = blockGapSupport !== null;
12321
  let style = !!contentSize || !!wideSize ? `
12322
  ${appendSelectors(selector, '> *')} {
12323
  max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
12324
  margin-left: auto !important;
12325
  margin-right: auto !important;
12326
  }
12327
+
12328
  ${appendSelectors(selector, '> [data-align="wide"]')} {
12329
  max-width: ${wideSize !== null && wideSize !== void 0 ? wideSize : contentSize};
12330
  }
12331
+
12332
  ${appendSelectors(selector, '> [data-align="full"]')} {
12333
  max-width: none;
12334
  }
12338
  float: left;
12339
  margin-right: 2em;
12340
  }
12341
+
12342
  ${appendSelectors(selector, '> [data-align="right"]')} {
12343
  float: right;
12344
  margin-left: 2em;
12345
  }
12346
 
 
 
 
 
12347
  `;
12348
+
12349
+ if (hasBlockGapStylesSupport) {
12350
+ style += `
12351
+ ${appendSelectors(selector, '> * + *')} {
12352
+ margin-top: var( --wp--style--block-gap );
12353
+ margin-bottom: 0;
12354
+ }
12355
+ `;
12356
+ }
12357
+
12358
  return (0,external_wp_element_namespaceObject.createElement)("style", null, style);
12359
  },
12360
 
12367
  return layout.alignments;
12368
  }
12369
 
12370
+ const alignments = ['left', 'center', 'right'];
12371
+
12372
+ if (layout.contentSize) {
12373
+ alignments.unshift('full');
12374
+ }
12375
+
12376
+ if (layout.wideSize) {
12377
+ alignments.unshift('wide');
12378
+ }
12379
+
12380
+ return alignments;
12381
  }
12382
 
12383
  });
12584
  }, extraProps));
12585
  }
12586
 
12587
+ /* harmony default export */ var block_alignment_control_ui = (BlockAlignmentUI);
12588
  //# sourceMappingURL=ui.js.map
12589
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-alignment-control/index.js
12590
 
12595
  */
12596
 
12597
  function BlockAlignmentControl(props) {
12598
+ return (0,external_wp_element_namespaceObject.createElement)(block_alignment_control_ui, _extends({}, props, {
12599
  isToolbar: false
12600
  }));
12601
  }
12602
  function BlockAlignmentToolbar(props) {
12603
+ return (0,external_wp_element_namespaceObject.createElement)(block_alignment_control_ui, _extends({}, props, {
12604
  isToolbar: true
12605
  }));
12606
  }
12722
  // BlockAlignmentToolbar takes both of these into account.
12723
 
12724
  const blockAllowedAlignments = getValidAlignments((0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, 'align'), (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, 'alignWide', true));
 
12725
 
12726
  const updateAlignment = nextAlign => {
12727
  if (!nextAlign) {
12740
  });
12741
  };
12742
 
12743
+ return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, blockAllowedAlignments.length > 0 && (0,external_wp_element_namespaceObject.createElement)(block_controls, {
12744
  group: "block",
12745
  __experimentalExposeToChildren: true
12746
  }, (0,external_wp_element_namespaceObject.createElement)(BlockAlignmentControl, {
12747
  value: props.attributes.align,
12748
  onChange: updateAlignment,
12749
+ controls: blockAllowedAlignments
12750
  })), (0,external_wp_element_namespaceObject.createElement)(BlockEdit, props));
12751
  }, 'withToolbarControls');
12752
  /**
13577
 
13578
 
13579
 
13580
+
13581
  /**
13582
  * Internal dependencies
13583
  */
13605
  */
13606
 
13607
  function BorderColorEdit(props) {
 
 
13608
  const {
13609
  attributes: {
13610
  borderColor,
13615
  const colors = useSetting('color.palette') || border_color_EMPTY_ARRAY;
13616
  const disableCustomColors = !useSetting('color.custom');
13617
  const disableCustomGradients = !useSetting('color.customGradient');
13618
+ const [colorValue, setColorValue] = (0,external_wp_element_namespaceObject.useState)(() => {
13619
+ var _getColorObjectByAttr, _style$border;
13620
+
13621
+ return (_getColorObjectByAttr = getColorObjectByAttributeValues(colors, borderColor, style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.color)) === null || _getColorObjectByAttr === void 0 ? void 0 : _getColorObjectByAttr.color;
13622
+ });
13623
 
13624
  const onChangeColor = value => {
13625
+ setColorValue(value);
13626
  const colorObject = getColorObjectByColorValue(colors, value);
13627
  const newStyle = { ...style,
13628
  border: { ...(style === null || style === void 0 ? void 0 : style.border),
13639
 
13640
  return (0,external_wp_element_namespaceObject.createElement)(control, {
13641
  label: (0,external_wp_i18n_namespaceObject.__)('Color'),
13642
+ colorValue: colorValue,
13643
  colors: colors,
13644
  gradients: undefined,
13645
  disableCustomColors: disableCustomColors,
13747
 
13748
 
13749
  const withBorderColorPaletteStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
13750
+ var _getColorObjectByAttr2, _props$wrapperProps;
13751
 
13752
  const {
13753
  name,
13763
  }
13764
 
13765
  const extraStyles = {
13766
+ borderColor: borderColor ? (_getColorObjectByAttr2 = getColorObjectByAttributeValues(colors, borderColor)) === null || _getColorObjectByAttr2 === void 0 ? void 0 : _getColorObjectByAttr2.color : undefined
13767
  };
13768
  let wrapperProps = props.wrapperProps;
13769
  wrapperProps = { ...props.wrapperProps,
15093
  const gradients = useSetting('color.gradients') || color_EMPTY_ARRAY;
15094
  const areCustomSolidsEnabled = useSetting('color.custom');
15095
  const areCustomGradientsEnabled = useSetting('color.customGradient');
15096
+ const isLinkEnabled = useSetting('color.link');
15097
+ const isTextEnabled = useSetting('color.text');
15098
+ const isBackgroundEnabled = useSetting('color.background'); // Shouldn't be needed but right now the ColorGradientsPanel
15099
  // can trigger both onChangeColor and onChangeBackground
15100
  // synchronously causing our two callbacks to override changes
15101
  // from each other.
15110
  }
15111
 
15112
  const hasLinkColor = hasLinkColorSupport(blockName) && isLinkEnabled && (solids.length > 0 || areCustomSolidsEnabled);
15113
+ const hasTextColor = hasTextColorSupport(blockName) && isTextEnabled && (solids.length > 0 || areCustomSolidsEnabled);
15114
+ const hasBackgroundColor = hasBackgroundColorSupport(blockName) && isBackgroundEnabled && (solids.length > 0 || areCustomSolidsEnabled);
15115
  const hasGradientColor = hasGradientSupport(blockName) && (gradients.length > 0 || areCustomGradientsEnabled);
15116
 
15117
  if (!hasLinkColor && !hasTextColor && !hasBackgroundColor && !hasGradientColor) {
15957
  }
15958
 
15959
  return (0,external_wp_i18n_namespaceObject.__)('Appearance');
15960
+ }; // Adjusts screen reader description based on styles or weights.
15961
+
15962
+
15963
+ const getDescribedBy = () => {
15964
+ if (!currentSelection) {
15965
+ return (0,external_wp_i18n_namespaceObject.__)('No selected font appearance');
15966
+ }
15967
+
15968
+ if (!hasFontStyles) {
15969
+ return (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Currently selected font weight.
15970
+ (0,external_wp_i18n_namespaceObject.__)('Currently selected font weight: %s'), currentSelection.name);
15971
+ }
15972
+
15973
+ if (!hasFontWeights) {
15974
+ return (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Currently selected font style.
15975
+ (0,external_wp_i18n_namespaceObject.__)('Currently selected font style: %s'), currentSelection.name);
15976
+ }
15977
+
15978
+ return (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Currently selected font appearance.
15979
+ (0,external_wp_i18n_namespaceObject.__)('Currently selected font appearance: %s'), currentSelection.name);
15980
  };
15981
 
15982
  return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
15984
  }, hasStylesOrWeights && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CustomSelectControl, {
15985
  className: "components-font-appearance-control__select",
15986
  label: getLabel(),
15987
+ describedBy: getDescribedBy(),
15988
  options: selectOptions,
15989
  value: currentSelection,
15990
  onChange: ({
16626
  * e.g. settings found in `block.json`.
16627
  */
16628
 
16629
+ const LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
16630
  /**
16631
  * Inspector control panel containing the letter-spacing options.
16632
  *
16725
  return configs.filter(Boolean).length === configs.length;
16726
  }
16727
  //# sourceMappingURL=typography.js.map
16728
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/gap.js
16729
+
16730
+
16731
+ /**
16732
+ * WordPress dependencies
16733
+ */
16734
+
16735
+
16736
+
16737
+
16738
+ /**
16739
+ * Internal dependencies
16740
+ */
16741
+
16742
+
16743
+
16744
+
16745
+
16746
+ /**
16747
+ * Determines if there is gap support.
16748
+ *
16749
+ * @param {string|Object} blockType Block name or Block Type object.
16750
+ * @return {boolean} Whether there is support.
16751
+ */
16752
+
16753
+ function hasGapSupport(blockType) {
16754
+ const support = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, SPACING_SUPPORT_KEY);
16755
+ return !!(true === support || support !== null && support !== void 0 && support.blockGap);
16756
+ }
16757
+ /**
16758
+ * Checks if there is a current value in the gap block support attributes.
16759
+ *
16760
+ * @param {Object} props Block props.
16761
+ * @return {boolean} Whether or not the block has a gap value set.
16762
+ */
16763
+
16764
+ function hasGapValue(props) {
16765
+ var _props$attributes$sty, _props$attributes$sty2;
16766
+
16767
+ return ((_props$attributes$sty = props.attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : (_props$attributes$sty2 = _props$attributes$sty.spacing) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.blockGap) !== undefined;
16768
+ }
16769
+ /**
16770
+ * Resets the gap block support attribute. This can be used when disabling
16771
+ * the gap support controls for a block via a progressive discovery panel.
16772
+ *
16773
+ * @param {Object} props Block props.
16774
+ * @param {Object} props.attributes Block's attributes.
16775
+ * @param {Object} props.setAttributes Function to set block's attributes.
16776
+ */
16777
+
16778
+ function resetGap({
16779
+ attributes = {},
16780
+ setAttributes
16781
+ }) {
16782
+ const {
16783
+ style
16784
+ } = attributes;
16785
+ setAttributes({
16786
+ style: { ...style,
16787
+ spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
16788
+ blockGap: undefined
16789
+ }
16790
+ }
16791
+ });
16792
+ }
16793
+ /**
16794
+ * Custom hook that checks if gap settings have been disabled.
16795
+ *
16796
+ * @param {string} name The name of the block.
16797
+ * @return {boolean} Whether the gap setting is disabled.
16798
+ */
16799
+
16800
+ function useIsGapDisabled({
16801
+ name: blockName
16802
+ } = {}) {
16803
+ const isDisabled = !useSetting('spacing.blockGap');
16804
+ return !hasGapSupport(blockName) || isDisabled;
16805
+ }
16806
+ /**
16807
+ * Inspector control panel containing the gap related configuration
16808
+ *
16809
+ * @param {Object} props
16810
+ *
16811
+ * @return {WPElement} Gap edit element.
16812
+ */
16813
+
16814
+ function GapEdit(props) {
16815
+ var _style$spacing;
16816
+
16817
+ const {
16818
+ clientId,
16819
+ attributes: {
16820
+ style
16821
+ },
16822
+ setAttributes
16823
+ } = props;
16824
+ const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
16825
+ availableUnits: useSetting('spacing.units') || ['%', 'px', 'em', 'rem', 'vw']
16826
+ });
16827
+ const ref = useBlockRef(clientId);
16828
+
16829
+ if (useIsGapDisabled(props)) {
16830
+ return null;
16831
+ }
16832
+
16833
+ const onChange = next => {
16834
+ var _window;
16835
+
16836
+ const newStyle = { ...style,
16837
+ spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
16838
+ blockGap: next
16839
+ }
16840
+ };
16841
+ setAttributes({
16842
+ style: cleanEmptyObject(newStyle)
16843
+ }); // In Safari, changing the `gap` CSS value on its own will not trigger the layout
16844
+ // to be recalculated / re-rendered. To force the updated gap to re-render, here
16845
+ // we replace the block's node with itself.
16846
+
16847
+ const isSafari = ((_window = window) === null || _window === void 0 ? void 0 : _window.navigator.userAgent) && window.navigator.userAgent.includes('Safari') && !window.navigator.userAgent.includes('Chrome ') && !window.navigator.userAgent.includes('Chromium ');
16848
+
16849
+ if (ref.current && isSafari) {
16850
+ var _ref$current$parentNo;
16851
+
16852
+ (_ref$current$parentNo = ref.current.parentNode) === null || _ref$current$parentNo === void 0 ? void 0 : _ref$current$parentNo.replaceChild(ref.current, ref.current);
16853
+ }
16854
+ };
16855
+
16856
+ return external_wp_element_namespaceObject.Platform.select({
16857
+ web: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalUnitControl, {
16858
+ label: (0,external_wp_i18n_namespaceObject.__)('Block gap'),
16859
+ min: 0,
16860
+ onChange: onChange,
16861
+ units: units,
16862
+ value: style === null || style === void 0 ? void 0 : (_style$spacing = style.spacing) === null || _style$spacing === void 0 ? void 0 : _style$spacing.blockGap
16863
+ })),
16864
+ native: null
16865
+ });
16866
+ }
16867
+ //# sourceMappingURL=gap.js.map
16868
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/hooks/margin.js
16869
 
16870
 
17173
 
17174
 
17175
 
17176
+
17177
  const SPACING_SUPPORT_KEY = 'spacing';
17178
  const ALL_SIDES = ['top', 'right', 'bottom', 'left'];
17179
  const AXIAL_SIDES = ['vertical', 'horizontal'];
17186
  */
17187
 
17188
  function DimensionsPanel(props) {
17189
+ const isGapDisabled = useIsGapDisabled(props);
17190
  const isPaddingDisabled = useIsPaddingDisabled(props);
17191
  const isMarginDisabled = useIsMarginDisabled(props);
17192
  const isDisabled = useIsDimensionsDisabled(props);
17205
  props.setAttributes({
17206
  style: cleanEmptyObject({ ...style,
17207
  spacing: { ...(style === null || style === void 0 ? void 0 : style.spacing),
17208
+ blockGap: undefined,
17209
  margin: undefined,
17210
  padding: undefined
17211
  }
17229
  label: (0,external_wp_i18n_namespaceObject.__)('Margin'),
17230
  onDeselect: () => resetMargin(props),
17231
  isShownByDefault: defaultSpacingControls === null || defaultSpacingControls === void 0 ? void 0 : defaultSpacingControls.margin
17232
+ }, (0,external_wp_element_namespaceObject.createElement)(MarginEdit, props)), !isGapDisabled && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
17233
+ className: "single-column",
17234
+ hasValue: () => hasGapValue(props),
17235
+ label: (0,external_wp_i18n_namespaceObject.__)('Block gap'),
17236
+ onDeselect: () => resetGap(props),
17237
+ isShownByDefault: defaultSpacingControls === null || defaultSpacingControls === void 0 ? void 0 : defaultSpacingControls.blockGap
17238
+ }, (0,external_wp_element_namespaceObject.createElement)(GapEdit, props))));
17239
  }
17240
  /**
17241
  * Determine whether there is dimensions related block support.
17250
  return false;
17251
  }
17252
 
17253
+ return hasGapSupport(blockName) || hasPaddingSupport(blockName) || hasMarginSupport(blockName);
17254
  }
17255
  /**
17256
  * Determines whether dimensions support has been disabled.
17261
  */
17262
 
17263
  const useIsDimensionsDisabled = (props = {}) => {
17264
+ const gapDisabled = useIsGapDisabled(props);
17265
  const paddingDisabled = useIsPaddingDisabled(props);
17266
  const marginDisabled = useIsMarginDisabled(props);
17267
+ return gapDisabled && paddingDisabled && marginDisabled;
17268
  };
17269
  /**
17270
  * Custom hook to retrieve which padding/margin is supported
17426
 
17427
  return settings;
17428
  }
17429
+ /**
17430
+ * A dictionary of paths to flag skipping block support serialization as the key,
17431
+ * with values providing the style paths to be omitted from serialization.
17432
+ *
17433
+ * @constant
17434
+ * @type {Record<string, string[]>}
17435
+ */
17436
 
17437
+
17438
+ const skipSerializationPathsEdit = {
17439
  [`${BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['border'],
17440
  [`${COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]: [COLOR_SUPPORT_KEY],
17441
  [`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [TYPOGRAPHY_SUPPORT_KEY],
17442
  [`${SPACING_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['spacing']
17443
  };
17444
+ /**
17445
+ * A dictionary of paths to flag skipping block support serialization as the key,
17446
+ * with values providing the style paths to be omitted from serialization.
17447
+ *
17448
+ * Extends the Edit skip paths to enable skipping additional paths in just
17449
+ * the Save component. This allows a block support to be serialized within the
17450
+ * editor, while using an alternate approach, such as server-side rendering, when
17451
+ * the support is saved.
17452
+ *
17453
+ * @constant
17454
+ * @type {Record<string, string[]>}
17455
+ */
17456
+
17457
+ const skipSerializationPathsSave = { ...skipSerializationPathsEdit,
17458
+ [`${SPACING_SUPPORT_KEY}`]: ['spacing.blockGap']
17459
+ };
17460
  /**
17461
  * Override props assigned to save component to inject the CSS variables definition.
17462
  *
17463
+ * @param {Object} props Additional props applied to save element.
17464
+ * @param {Object} blockType Block type.
17465
+ * @param {Object} attributes Block attributes.
17466
+ * @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.
17467
  *
17468
  * @return {Object} Filtered props applied to save element.
17469
  */
17470
 
17471
+ function style_addSaveProps(props, blockType, attributes, skipPaths = skipSerializationPathsSave) {
17472
  if (!hasStyleSupport(blockType)) {
17473
  return props;
17474
  }
17476
  let {
17477
  style
17478
  } = attributes;
17479
+ (0,external_lodash_namespaceObject.forEach)(skipPaths, (path, indicator) => {
17480
  if ((0,external_wp_blocks_namespaceObject.getBlockSupport)(blockType, indicator)) {
17481
  style = (0,external_lodash_namespaceObject.omit)(style, path);
17482
  }
17509
  props = existingGetEditWrapperProps(attributes);
17510
  }
17511
 
17512
+ return style_addSaveProps(props, settings, attributes, skipSerializationPathsEdit);
17513
  };
17514
 
17515
  return settings;
17747
 
17748
  const Component = blockType.edit || blockType.save;
17749
 
17750
+ if (blockType.apiVersion > 1) {
17751
  return (0,external_wp_element_namespaceObject.createElement)(Component, _extends({}, props, {
17752
  context: context
17753
  }));
18664
  return (0,external_wp_data_namespaceObject.useSelect)(select => {
18665
  const name = select(store).getBlockName(clientId);
18666
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
18667
+ const hasLightBlockWrapper = (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) > 1;
18668
 
18669
  if (!hasLightBlockWrapper) {
18670
  return;
18709
  }
18710
 
18711
  const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(getBlockName(clientId));
18712
+ const hasLightBlockWrapper = (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) > 1;
18713
 
18714
  if (!hasLightBlockWrapper) {
18715
  return;
19315
  index,
19316
  mode,
19317
  name,
19318
+ blockApiVersion,
19319
  blockTitle,
19320
  isPartOfSelection,
19321
  adjustScrolling,
19322
+ enableAnimation
 
19323
  } = (0,external_wp_data_namespaceObject.useSelect)(select => {
19324
  const {
19325
  getBlockRootClientId,
19342
  index: getBlockIndex(clientId, rootClientId),
19343
  mode: getBlockMode(clientId),
19344
  name: blockName,
19345
+ blockApiVersion: (blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) || 1,
19346
  blockTitle: blockType === null || blockType === void 0 ? void 0 : blockType.title,
19347
  isPartOfSelection: isSelected || isPartOfMultiSelection,
19348
  adjustScrolling: isSelected || isFirstMultiSelectedBlock(clientId),
19349
+ enableAnimation: !isTyping() && getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD
 
19350
  };
19351
  }, [clientId]); // translators: %s: Type of block (i.e. Text, Image etc)
19352
 
19361
  })]);
19362
  const blockEditContext = useBlockEditContext(); // Ensures it warns only inside the `edit` implementation for the block.
19363
 
19364
+ if (blockApiVersion < 2 && clientId === blockEditContext.clientId) {
19365
  typeof process !== "undefined" && process.env && "production" !== "production" ? external_wp_warning_default()(`Block type "${name}" must support API version 2 or higher to work correctly with "useBlockProps" method.`) : void 0;
19366
  }
19367
 
19497
  isSelectionEnabled: isSelectionEnabled,
19498
  toggleSelection: toggleSelection
19499
  });
19500
+ const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name); // Determine whether the block has props to apply to the wrapper.
 
19501
 
19502
+ if (blockType !== null && blockType !== void 0 && blockType.getEditWrapperProps) {
19503
  wrapperProps = mergeWrapperProps(wrapperProps, blockType.getEditWrapperProps(attributes));
19504
  }
19505
 
19534
  }, (0,external_wp_element_namespaceObject.createElement)(block_html, {
19535
  clientId: clientId
19536
  })));
19537
+ } else if ((blockType === null || blockType === void 0 ? void 0 : blockType.apiVersion) > 1) {
19538
  block = blockEdit;
19539
  } else {
19540
  block = (0,external_wp_element_namespaceObject.createElement)(Block, wrapperProps, blockEdit);
26128
  var _getBlockListSettings;
26129
 
26130
  const {
26131
+ getBlock,
26132
  getBlockIndex,
26133
  hasBlockMovingClientId,
26134
  getBlockListSettings
26135
  } = select(store);
26136
  const index = getBlockIndex(clientId, rootClientId);
 
26137
  const {
26138
  name,
26139
  attributes
26140
+ } = getBlock(clientId);
 
26141
  const blockMovingMode = hasBlockMovingClientId();
26142
  return {
26143
  index,
29299
  __unstableBoundaryParent: true // Observe movement for block animations (especially horizontal).
29300
  ,
29301
  __unstableObserveElement: node,
29302
+ shouldAnchorIncludePadding: true // Used to safeguard sticky position behavior against cases where it would permanently
29303
+ // obscure specific sections of a block.
29304
+ ,
29305
+ __unstableEditorCanvasWrapper: __unstableContentRef === null || __unstableContentRef === void 0 ? void 0 : __unstableContentRef.current
29306
  }, (shouldShowContextualToolbar || isToolbarForced) && (0,external_wp_element_namespaceObject.createElement)("div", {
29307
  onFocus: onFocus,
29308
  onBlur: onBlur // While ideally it would be enough to capture the
29350
  getSelectedBlockClientId,
29351
  getFirstMultiSelectedBlockClientId,
29352
  getBlockRootClientId,
29353
+ getBlock,
29354
  getBlockParents,
29355
  __experimentalGetBlockListSettingsForBlocks
29356
  } = select(store);
29364
  name,
29365
  attributes = {},
29366
  isValid
29367
+ } = getBlock(clientId) || {};
29368
  const blockParentsClientIds = getBlockParents(clientId); // Get Block List Settings for all ancestors of the current Block clientId
29369
 
29370
  const parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks(blockParentsClientIds); // Get the clientId of the topmost parent with the capture toolbars setting.
30736
  } = select(store);
30737
  return getSettings().supportsLayout;
30738
  }, []);
30739
+ const layoutBlockSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, layoutBlockSupportKey, {});
 
 
 
 
30740
  const {
30741
+ allowSwitching,
30742
  allowEditing = true,
30743
  allowInheriting = true,
30744
  default: defaultBlockLayout
30745
+ } = layoutBlockSupport;
30746
 
30747
  if (!allowEditing) {
30748
  return null;
30749
  }
30750
 
30751
+ const usedLayout = layout || defaultBlockLayout || {};
30752
  const {
30753
  inherit = false,
30754
  type = 'default'
30755
  } = usedLayout;
30756
+ /**
30757
+ * `themeSupportsLayout` is only relevant to the `default/flow`
30758
+ * layout and it should not be taken into account when other
30759
+ * `layout` types are used.
30760
+ */
30761
+
30762
+ if (type === 'default' && !themeSupportsLayout) {
30763
+ return null;
30764
+ }
30765
+
30766
  const layoutType = getLayoutType(type);
30767
 
30768
  const onChangeType = newType => setAttributes({
30775
  layout: newLayout
30776
  });
30777
 
30778
+ return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(inspector_controls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
30779
  title: (0,external_wp_i18n_namespaceObject.__)('Layout')
30780
  }, allowInheriting && !!defaultThemeLayout && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
30781
  label: (0,external_wp_i18n_namespaceObject.__)('Inherit default layout'),
30785
  inherit: !inherit
30786
  }
30787
  })
30788
+ }), !inherit && allowSwitching && (0,external_wp_element_namespaceObject.createElement)(LayoutTypeSwitcher, {
30789
  type: type,
30790
  onChange: onChangeType
30791
+ }), !inherit && layoutType && (0,external_wp_element_namespaceObject.createElement)(layoutType.inspectorControls, {
30792
  layout: usedLayout,
30793
+ onChange: onChangeLayout,
30794
+ layoutBlockSupport: layoutBlockSupport
30795
+ }))), !inherit && layoutType && (0,external_wp_element_namespaceObject.createElement)(layoutType.toolBarControls, {
30796
+ layout: usedLayout,
30797
+ onChange: onChangeLayout,
30798
+ layoutBlockSupport: layoutBlockSupport
30799
+ }));
30800
  }
30801
 
30802
  function LayoutTypeSwitcher({
31118
 
31119
 
31120
 
31121
+
31122
  //# sourceMappingURL=index.js.map
31123
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/colors/with-colors.js
31124
 
33439
  * @param {boolean} props.showOnlyCurrentHierarchy Flag to limit the list to the current hierarchy of blocks.
33440
  * @param {boolean} props.__experimentalFeatures Flag to enable experimental features.
33441
  * @param {boolean} props.__experimentalPersistentListViewFeatures Flag to enable features for the Persistent List View experiment.
33442
+ * @param {Object} ref Forwarded ref
33443
  */
33444
 
33445
 
33450
  __experimentalFeatures,
33451
  __experimentalPersistentListViewFeatures,
33452
  ...props
33453
+ }, ref) {
33454
  const {
33455
  clientIdsTree,
33456
  selectedClientIds
33468
  target: blockDropTarget
33469
  } = useListViewDropZone();
33470
  const elementRef = (0,external_wp_element_namespaceObject.useRef)();
33471
+ const treeGridRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([elementRef, dropZoneRef, ref]);
33472
  const isMounted = (0,external_wp_element_namespaceObject.useRef)(false);
33473
  (0,external_wp_element_namespaceObject.useEffect)(() => {
33474
  isMounted.current = true;
33533
  selectedBlockClientIds: selectedClientIds
33534
  }, props)))));
33535
  }
33536
+
33537
+ /* harmony default export */ var components_list_view = ((0,external_wp_element_namespaceObject.forwardRef)(ListView));
33538
  //# sourceMappingURL=index.js.map
33539
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/block-navigation/dropdown.js
33540
 
33599
  className: "block-editor-block-navigation__container"
33600
  }, (0,external_wp_element_namespaceObject.createElement)("p", {
33601
  className: "block-editor-block-navigation__label"
33602
+ }, (0,external_wp_i18n_namespaceObject.__)('List view')), (0,external_wp_element_namespaceObject.createElement)(components_list_view, {
33603
  showNestedBlocks: true,
33604
  showOnlyCurrentHierarchy: true,
33605
  __experimentalFeatures: __experimentalFeatures
34423
  }, (0,external_wp_i18n_namespaceObject.__)('Reset')))));
34424
  }
34425
  //# sourceMappingURL=index.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34426
  ;// CONCATENATED MODULE: ./packages/icons/build-module/library/keyboard-return.js
34427
 
34428
 
36931
  }, []);
36932
  }
36933
  //# sourceMappingURL=use-remove-browser-shortcuts.js.map
36934
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/rich-text/use-shortcuts.js
36935
+ /**
36936
+ * WordPress dependencies
36937
+ */
36938
+
36939
+ function useShortcuts(keyboardShortcuts) {
36940
+ return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
36941
+ function onKeyDown(event) {
36942
+ for (const keyboardShortcut of keyboardShortcuts.current) {
36943
+ keyboardShortcut(event);
36944
+ }
36945
+ }
36946
+
36947
+ element.addEventListener('keydown', onKeyDown);
36948
+ return () => {
36949
+ element.removeEventListener('keydown', onKeyDown);
36950
+ };
36951
+ }, []);
36952
+ }
36953
+ //# sourceMappingURL=use-shortcuts.js.map
36954
+ ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/rich-text/use-input-events.js
36955
+ /**
36956
+ * WordPress dependencies
36957
+ */
36958
+
36959
+ function useInputEvents(inputEvents) {
36960
+ return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
36961
+ function onInput(event) {
36962
+ for (const keyboardShortcut of inputEvents.current) {
36963
+ keyboardShortcut(event);
36964
+ }
36965
+ }
36966
+
36967
+ element.addEventListener('input', onInput);
36968
+ return () => {
36969
+ element.removeEventListener('input', onInput);
36970
+ };
36971
+ }, []);
36972
+ }
36973
+ //# sourceMappingURL=use-input-events.js.map
36974
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/rich-text/format-edit.js
36975
 
36976
 
37051
 
37052
 
37053
 
37054
+
37055
+
37056
+ const keyboardShortcutContext = (0,external_wp_element_namespaceObject.createContext)();
37057
+ const inputEventContext = (0,external_wp_element_namespaceObject.createContext)();
37058
  /**
37059
  * Removes props used for the native version of RichText so that they are not
37060
  * passed to the DOM element and log warnings.
37196
  const {
37197
  value,
37198
  onChange,
 
37199
  ref: richTextRef
37200
  } = (0,external_wp_richText_namespaceObject.__unstableUseRichText)({
37201
  value: adjustedValue,
37236
  html: adjustedValue,
37237
  value
37238
  });
37239
+ const keyboardShortcuts = (0,external_wp_element_namespaceObject.useRef)(new Set());
37240
+ const inputEvents = (0,external_wp_element_namespaceObject.useRef)(new Set());
37241
 
37242
  function onKeyDown(event) {
37243
  const {
37277
  }
37278
  }
37279
 
37280
+ function onFocus() {
37281
+ anchorRef.current.focus();
37282
+ }
37283
+
37284
  const TagName = tagName;
37285
+ const content = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isSelected && (0,external_wp_element_namespaceObject.createElement)(keyboardShortcutContext.Provider, {
37286
+ value: keyboardShortcuts
37287
+ }, (0,external_wp_element_namespaceObject.createElement)(inputEventContext.Provider, {
37288
+ value: inputEvents
37289
+ }, children && children({
37290
  value,
37291
  onChange,
37292
  onFocus
37293
+ }), (0,external_wp_element_namespaceObject.createElement)(FormatEdit, {
37294
  value: value,
37295
  onChange: onChange,
37296
  onFocus: onFocus,
37297
  formatTypes: formatTypes,
37298
  forwardedRef: anchorRef
37299
+ }))), isSelected && hasFormats && (0,external_wp_element_namespaceObject.createElement)(format_toolbar_container, {
37300
  inline: inlineToolbar,
37301
  anchorRef: anchorRef.current
37302
  }), (0,external_wp_element_namespaceObject.createElement)(TagName // Overridable props.
37311
  __unstableAllowPrefixTransformations,
37312
  formatTypes,
37313
  onReplace
37314
+ }), useRemoveBrowserShortcuts(), useShortcuts(keyboardShortcuts), useInputEvents(inputEvents), useUndoAutomaticChange(), usePasteHandler({
37315
  isSelected,
37316
  disableFormats,
37317
  onChange,
37923
  onSubmit: onSubmit
37924
  }, (0,external_wp_element_namespaceObject.createElement)("input", {
37925
  className: "block-editor-media-placeholder__url-input-field",
37926
+ type: "text",
37927
  "aria-label": (0,external_wp_i18n_namespaceObject.__)('URL'),
37928
  placeholder: (0,external_wp_i18n_namespaceObject.__)('Paste or type URL'),
37929
  onChange: onChange,
38476
  */
38477
 
38478
 
38479
+ /**
38480
+ * Internal dependencies
38481
+ */
38482
+
38483
+
38484
  function RichTextShortcut({
38485
  character,
38486
  type,
38487
  onUse
38488
  }) {
38489
+ const keyboardShortcuts = (0,external_wp_element_namespaceObject.useContext)(keyboardShortcutContext);
38490
+ const onUseRef = (0,external_wp_element_namespaceObject.useRef)();
38491
+ onUseRef.current = onUse;
38492
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
38493
+ function callback(event) {
38494
+ if (external_wp_keycodes_namespaceObject.isKeyboardEvent[type](event, character)) {
38495
+ onUseRef.current();
38496
+ event.preventDefault();
38497
+ }
38498
+ }
38499
 
38500
+ keyboardShortcuts.current.add(callback);
38501
+ return () => {
38502
+ keyboardShortcuts.current.delete(callback);
38503
+ };
38504
+ }, [character, type]);
38505
  return null;
38506
  }
38507
  //# sourceMappingURL=shortcut.js.map
38543
  * WordPress dependencies
38544
  */
38545
 
38546
+ /**
38547
+ * Internal dependencies
38548
+ */
 
 
 
 
 
 
 
 
 
 
 
 
38549
 
 
 
 
38550
 
38551
+ function __unstableRichTextInputEvent({
38552
+ inputType,
38553
+ onInput
38554
+ }) {
38555
+ const callbacks = (0,external_wp_element_namespaceObject.useContext)(inputEventContext);
38556
+ const onInputRef = (0,external_wp_element_namespaceObject.useRef)();
38557
+ onInputRef.current = onInput;
38558
+ (0,external_wp_element_namespaceObject.useEffect)(() => {
38559
+ function callback(event) {
38560
+ if (event.inputType === inputType) {
38561
+ onInputRef.current();
38562
+ event.preventDefault();
38563
+ }
38564
+ }
38565
 
38566
+ callbacks.current.add(callback);
38567
+ return () => {
38568
+ callbacks.current.delete(callback);
38569
+ };
38570
+ }, [inputType]);
38571
+ return null;
38572
  }
38573
  //# sourceMappingURL=input-event.js.map
38574
  ;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/tool-selector/index.js
build/block-editor/index.min.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', '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' => '5811b9f99a23806bdb23e7b21b14d794');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', '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' => '6c8f24abc50d2582462de543eaaec3fb');
build/block-editor/index.min.js CHANGED
@@ -1,30 +1,33 @@
1
- !function(){var e={1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},7154:function(e){function t(){return e.exports=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},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},5354:function(e,t,n){var o=n(9489);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},7316:function(e){e.exports=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.exports.default=e.exports,e.exports.__esModule=!0},9489:function(e){function t(n,o){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,o)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},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 m=t[i-1];return i>1&&"string"==typeof m.value&&(m.added||m.removed)&&e.equals("",m.value)&&(t[i-2].value+=m.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,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],t,e,0);if(m[0].newPos+1>=a&&p+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=m[n-1],p=m[n+1],f=(p?p.newPos:0)-n;d&&(m[n-1]=void 0);var g=d&&d.newPos+1<a,h=p&&0<=f&&f<c;if(g||h){if(!g||h&&d.newPos<p.newPos?(l=r(p),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));m[n]=l}else m[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var g=f();if(g)return g}},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 m=o.isWindow(t),p=!(!m||!t.frameElement),f=o.offset(e),g=o.outerHeight(e),h=o.outerWidth(e),b=void 0,v=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;p&&(t=t.document.scrollingElement||t.document.body),m||p?(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+h-(S.left+w)+d,top:f.top+g-(S.top+B)+u},_=S):(b=o.offset(t),v=t.clientHeight,k=t.clientWidth,_={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(b.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(b.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+h-(b.left+k+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+g-(b.top+v+(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 m=["margin","border","padding"];function p(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 g(e){return null!=e&&e==e.window}var h={};function b(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.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,m.slice(n),o)}u(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["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 v={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=b.apply(void 0,n):p(e,v,(function(){t=b.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);h["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[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:g,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(g(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(g(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},h)},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(3804),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",m=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(m,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},8088:function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=o(n(7154)),l=o(n(7316)),i=n(3804),s=o(i),a=o(n(5354)),c=o(n(1506)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,l(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return r({to:t},e);var n=Object.keys(e).reduce((function(n,o){var l;return u.und(t[o])?r({},n,((l={})[o]=e[o],l)):n}),{});return r({to:t},n)}var g,h,b=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),v=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof b&&e.addChild(c(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof b&&e.removeChild(c(t))}))},t}return a(t,e),t}(b),k=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof b&&e.addChild(c(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof b&&e.removeChild(c(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var o=this.payload[n];(!e||o instanceof b)&&(t[n]=o instanceof b?o[e?"getAnimatedValue":"getValue"]():o)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(b);function _(e,t){g={fn:e,transform:t}}function y(e){h=e}var E,C=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1};function S(e){E=e}var w=function(){return Date.now()};function B(e){e}var I,x,T=function(e){return e.current};function N(e){I=e}var L=function(e){function t(t,n){var o;return(o=e.call(this)||this).update=void 0,o.payload=t.style?r({},t,{style:I(t.style)}):t,o.update=n,o.attach(),o}return a(t,e),t}(k),P=!1,R=new Set,A=function e(){if(!P)return!1;var t=w(),n=R,o=Array.isArray(n),r=0;for(n=o?n:n[Symbol.iterator]();;){var l;if(o){if(r>=n.length)break;l=n[r++]}else{if((r=n.next()).done)break;l=r.value}for(var i=l,s=!1,a=0;a<i.configs.length;a++){for(var c=i.configs[a],u=void 0,d=void 0,m=0;m<c.animatedValues.length;m++){var p=c.animatedValues[m];if(!p.done){var f=c.fromValues[m],g=c.toValues[m],h=p.lastPosition,v=g instanceof b,k=Array.isArray(c.initialVelocity)?c.initialVelocity[m]:c.initialVelocity;if(v&&(g=g.getValue()),c.immediate)p.setValue(g),p.done=!0;else if("string"!=typeof f&&"string"!=typeof g){if(void 0!==c.duration)h=f+c.easing((t-p.startTime)/c.duration)*(g-f),u=t>=p.startTime+c.duration;else if(c.decay)h=f+k/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(u=Math.abs(p.lastPosition-h)<.1)&&(g=h);else{d=void 0!==p.lastTime?p.lastTime:t,k=void 0!==p.lastVelocity?p.lastVelocity:c.initialVelocity,t>d+64&&(d=t);for(var _=Math.floor(t-d),y=0;y<_;++y)h+=1*(k+=(-c.tension*(h-g)+-c.friction*k)/c.mass*1/1e3)/1e3;var E=!(!c.clamp||0===c.tension)&&(f<g?h>g:h<g),S=Math.abs(k)<=c.precision,B=0===c.tension||Math.abs(g-h)<=c.precision;u=E||S&&B,p.lastVelocity=k,p.lastTime=t}v&&!c.toValues[m].done&&(u=!1),u?(p.value!==g&&(h=g),p.done=!0):s=!0,p.setValue(h),p.lastPosition=h}else p.setValue(g),p.done=!0}}i.props.onFrame&&(i.values[c.name]=c.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),s||(R.delete(i),i.stop(!0))}return R.size?x?x():C(e):P=!1,P};function M(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return M({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var 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||function(e){return e};return function(e){var 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){var 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)}}var D=function(e){function t(n,o,r){var l;return(l=e.call(this)||this).calc=void 0,l.payload=n instanceof v&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],l.calc=M(o,r),l}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=M(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(v);function O(e,t){"update"in e?t.add(e):e.getChildren().forEach((function(e){return O(e,t)}))}var F=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&O(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new D(this,e,t)},t}(b),V=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new F(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,o){return n.payload[o].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new D(this,e,t)},t}(v),H=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,o=void 0===n?0:n,i=t.to,s=l(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(r({},s,{delay:o,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t,n=e[0],l=e[1],i=r({to:(t={},t[n]=l,t),delay:p(o,n)},s),c=a[i.delay]&&a[i.delay].to;a[i.delay]=r({},a[i.delay],i,{to:r({},c,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,o=void 0===n?{}:n,l=e.to,i=void 0===l?{}:l;u.obj(o)&&(t.merged=r({},o,t.merged)),u.obj(i)&&(t.merged=r({},t.merged,i))}));var n=this.local=++this.guid,o=this.localQueue=this.queue;this.queue=[],o.forEach((function(r,i){var s=r.delay,a=l(r,["delay"]),c=function(r){i===o.length-1&&n===t.guid&&r&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);s?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,c):t.diff(a).start(c))}),s):d?t.runAsync(a,c):t.diff(a).start(c)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,R.has(this)||R.add(this),P||(P=!0,C(x||A));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,R.has(this)&&R.delete(this)),this},t.runAsync=function(e,t){var n=this,o=(e.delay,l(e,["delay"])),i=this.local,s=Promise.resolve(void 0);if(u.arr(o.to))for(var a=function(e){var t=e,l=r({},o,f(o.to[t]));u.arr(l.config)&&(l.config=l.config[t]),s=s.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(l).start(e)}))}))},c=0;c<o.to.length;c++)a(c);else if(u.fun(o.to)){var d,m=0;s=s.then((function(){return o.to((function(e){var t=r({},o,f(e));if(u.arr(t.config)&&(t.config=t.config[m]),m++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=r({},this.props,e);var n=this.props,o=n.from,l=void 0===o?{}:o,i=n.to,s=void 0===i?{}:i,a=n.config,c=void 0===a?{}:a,f=n.reverse,g=n.attach,b=n.reset,v=n.immediate;if(f){var k=[s,l];l=k[0],s=k[1]}this.merged=r({},l,this.merged,s),this.hasChanged=!1;var _=g&&g(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var o=n[0],i=n[1],s=e[o]||{},a=u.num(i),f=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!h[i],g=u.arr(i),k=!a&&!g&&!f,y=u.und(l[o])?i:l[o],C=a||g||f?i:1,S=p(c,o);_&&(C=_.animations[o].parent);var B,I=s.parent,x=s.interpolation,T=m(_?C.getPayload():C),N=i;k&&(N=E({range:[0,1],output:[i,i]})(1));var L,P=x&&x.getValue(),R=!u.und(I)&&s.animatedValues.some((function(e){return!e.done})),A=!u.equ(N,P),M=!u.equ(N,s.previous),D=!u.equ(S,s.config);if(b||M&&A||D){var O;if(a||f)I=x=s.parent||new F(y);else if(g)I=x=s.parent||new V(y);else if(k){var H=s.interpolation&&s.interpolation.calc(s.parent.value);H=void 0===H||b?y:H,s.parent?(I=s.parent).setValue(0,!1):I=new F(0);var z={output:[H,i]};s.interpolation?(x=s.interpolation,s.interpolation.updateConfig(z)):x=I.interpolate(z)}return T=m(_?C.getPayload():C),B=m(I.getPayload()),b&&!k&&I.setValue(y,!1),t.hasChanged=!0,B.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=R?e.lastVelocity:void 0,e.lastTime=R?e.lastTime:void 0,e.startTime=w(),e.done=!1,e.animatedStyles.clear()})),p(v,o)&&I.setValue(k?C:i,!1),r({},e,((O={})[o]=r({},s,{name:o,parent:I,interpolation:x,animatedValues:B,toValues:T,previous:N,config:S,fromValues:m(I.getValue()),immediate:p(v,o),initialVelocity:d(S.velocity,0),clamp:d(S.clamp,!1),precision:d(S.precision,.01),tension:d(S.tension,170),friction:d(S.friction,26),mass:d(S.mass,1),duration:S.duration,easing:d(S.easing,(function(e){return e})),decay:S.decay}),O))}return A?e:(k&&(I.setValue(1,!1),x.updateConfig({output:[N,N]})),I.done=!0,t.hasChanged=!0,r({},e,((L={})[o]=r({},e[o],{previous:N}),L)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}();var U=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof b||(t=g.transform(t)),n.payload=t,n}return a(t,e),t}(k),G={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},W="[-+]?\\d*\\.?\\d+",K=W+"%";function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var $=new RegExp("rgb"+j(W,W,W)),q=new RegExp("rgba"+j(W,W,W,W)),Y=new RegExp("hsl"+j(W,K,K)),X=new RegExp("hsla"+j(W,K,K,W)),Q=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J=/^#([0-9a-fA-F]{6})$/,ee=/^#([0-9a-fA-F]{8})$/;function te(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 ne(e,t,n){var o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=te(r,o,e+1/3),i=te(r,o,e),s=te(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function oe(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function re(e){return(parseFloat(e)%360+360)%360/360}function le(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ie(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function se(e){var t,n,o="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=J.exec(t))?parseInt(n[1]+"ff",16)>>>0:G.hasOwnProperty(t)?G[t]:(n=$.exec(t))?(oe(n[1])<<24|oe(n[2])<<16|oe(n[3])<<8|255)>>>0:(n=q.exec(t))?(oe(n[1])<<24|oe(n[2])<<16|oe(n[3])<<8|le(n[4]))>>>0:(n=Q.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ee.exec(t))?parseInt(n[1],16)>>>0:(n=Z.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=Y.exec(t))?(255|ne(re(n[1]),ie(n[2]),ie(n[3])))>>>0:(n=X.exec(t))?(ne(re(n[1]),ie(n[2]),ie(n[3]))|le(n[4]))>>>0:null;return null===o?e:"rgba("+((4278190080&(o=o||0))>>>24)+", "+((16711680&o)>>>16)+", "+((65280&o)>>>8)+", "+(255&o)/255+")"}var ae=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ce=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ue=new RegExp("("+Object.keys(G).join("|")+")","g"),de={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},me=["Webkit","Ms","Moz","O"];function pe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}de=Object.keys(de).reduce((function(e,t){return me.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),de);var fe={};N((function(e){return new U(e)})),B("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ce,se)})).map((function(e){return e.replace(ue,se)})),n=t[0].match(ae).map((function(){return[]}));t.forEach((function(e){e.match(ae).forEach((function(e,t){return n[t].push(+e)}))}));var o=t[0].match(ae).map((function(t,o){return M(r({},e,{output:n[o]}))}));return function(e){var n=0;return t[0].replace(ae,(function(){return o[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,o,r){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(o)+", "+r+")"}))}})),y(G),_((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,o=t.children,r=t.scrollTop,i=t.scrollLeft,s=l(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var c in void 0!==r&&(e.scrollTop=r),void 0!==i&&(e.scrollLeft=i),void 0!==o&&(e.textContent=o),n)if(n.hasOwnProperty(c)){var u=0===c.indexOf("--"),d=pe(c,n[c],u);"float"===c&&(c="cssFloat"),u?e.style.setProperty(c,d):e.style[c]=d}for(var m in s){var p=a?m:fe[m]||(fe[m]=m.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,s[m])}}),(function(e){return e}));var ge,he,be=(ge=function(e){return i.forwardRef((function(t,n){var o,a=(o=i.useState(!1)[1],i.useCallback((function(){return o((function(e){return!e}))}),[])),c=i.useRef(!0),d=i.useRef(null),m=i.useRef(null),p=i.useCallback((function(e){var t=d.current;d.current=new L(e,(function(){m.current&&!1===g.fn(m.current,d.current.getAnimatedValue())&&a()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){c.current=!1,d.current&&d.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(m,c,a)})),p(t);var f=d.current.getValue(),h=(f.scrollTop,f.scrollLeft,l(f,["scrollTop","scrollLeft"]));return s.createElement(e,r({},h,{ref:function(e){return m.current=(t=e,(o=n)&&(u.fun(o)?o(t):u.obj(o)&&(o.current=t)),t);var t,o}}))}))},void 0===(he=!1)&&(he=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=he?t[0].toLowerCase()+t.substring(1):t;return e[n]=ge(n),e}),ge)})(["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"]);t.q=be,t.q_=function(e){var t=u.fun(e),n=function(e,t){var n=i.useRef(!1),o=i.useRef(),r=u.fun(t),l=i.useMemo((function(){var n;return o.current&&(o.current.map((function(e){return e.destroy()})),o.current=void 0),[new Array(e).fill().map((function(e,o){var l=new z,i=r?p(t,o,l):t[o];return 0===o&&(n=i.ref),l.update(i),n||l.start(),l})),n]}),[e]),s=l[0],a=l[1];o.current=s,i.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(o.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return o.current.forEach((function(t){return t.stop(e)}))},get controllers(){return o.current}}}));var c=i.useMemo((function(){return function(e){return o.current.map((function(t,n){t.update(r?p(e,n,t):e[n]),a||t.start()}))}}),[e]);i.useEffect((function(){n.current?r||c(t):a||o.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return o.current.forEach((function(e){return e.destroy()}))}}),[]);var d=o.current.map((function(e){return e.getValues()}));return r?[d,c,function(e){return o.current.forEach((function(t){return t.pause(e)}))}]:d}(1,t?e:[e]),o=n[0],r=n[1],l=n[2];return t?[o[0],r,l]:o}},7621:function(e,t,n){var o;!function(r){var l=/^\s+/,i=/\s+$/,s=0,a=r.round,c=r.min,u=r.max,d=r.random;function m(e,t){if(t=t||{},(e=e||"")instanceof m)return e;if(!(this instanceof m))return new m(e,t);var n=function(e){var t,n,o,s={r:0,g:0,b:0},a=1,d=null,m=null,p=null,f=!1,g=!1;return"string"==typeof e&&(e=function(e){e=e.replace(l,"").replace(i,"").toLowerCase();var t,n=!1;if(N[e])e=N[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:V(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:V(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(t=e.r,n=e.g,o=e.b,s={r:255*R(t,255),g:255*R(n,255),b:255*R(o,255)},f=!0,g="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(d=O(e.s),m=O(e.v),s=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var o=r.floor(e),l=e-o,i=n*(1-t),s=n*(1-l*t),a=n*(1-(1-l)*t),c=o%6;return{r:255*[n,s,i,i,a,n][c],g:255*[a,n,n,s,i,i][c],b:255*[i,i,a,n,n,s][c]}}(e.h,d,m),f=!0,g="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(d=O(e.s),p=O(e.l),s=function(e,t,n){var o,r,l;function i(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}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)o=r=l=n;else{var s=n<.5?n*(1+t):n+t-n*t,a=2*n-s;o=i(a,s,e+1/3),r=i(a,s,e),l=i(a,s,e-1/3)}return{r:255*o,g:255*r,b:255*l}}(e.h,d,p),f=!0,g="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=P(a),{ok:f,format:e.format||g,r:c(255,u(s.r,0)),g:c(255,u(s.g,0)),b:c(255,u(s.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,r,l=u(e,t,n),i=c(e,t,n),s=(l+i)/2;if(l==i)o=r=0;else{var a=l-i;switch(r=s>.5?a/(2-l-i):a/(l+i),l){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,l:s}}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,r,l=u(e,t,n),i=c(e,t,n),s=l,a=l-i;if(r=0===l?0:a/l,l==i)o=0;else{switch(l){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,v:s}}function g(e,t,n,o){var r=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function h(e,t,n,o){return[D(F(o)),D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16))].join("")}function b(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s-=t/100,n.s=A(n.s),m(n)}function v(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s+=t/100,n.s=A(n.s),m(n)}function k(e){return m(e).desaturate(100)}function _(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l+=t/100,n.l=A(n.l),m(n)}function y(e,t){t=0===t?0:t||10;var n=m(e).toRgb();return n.r=u(0,c(255,n.r-a(-t/100*255))),n.g=u(0,c(255,n.g-a(-t/100*255))),n.b=u(0,c(255,n.b-a(-t/100*255))),m(n)}function E(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l-=t/100,n.l=A(n.l),m(n)}function C(e,t){var n=m(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,m(n)}function S(e){var t=m(e).toHsl();return t.h=(t.h+180)%360,m(t)}function w(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+120)%360,s:t.s,l:t.l}),m({h:(n+240)%360,s:t.s,l:t.l})]}function B(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+90)%360,s:t.s,l:t.l}),m({h:(n+180)%360,s:t.s,l:t.l}),m({h:(n+270)%360,s:t.s,l:t.l})]}function I(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+72)%360,s:t.s,l:t.l}),m({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var o=m(e).toHsl(),r=360/n,l=[m(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,l.push(m(o));return l}function T(e,t){t=t||6;for(var n=m(e).toHsv(),o=n.h,r=n.s,l=n.v,i=[],s=1/t;t--;)i.push(m({h:o,s:r,v:l})),l=(l+s)%1;return i}m.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var l=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16)),D(F(o))];return r&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*R(this._r,255))+"%",g:a(100*R(this._g,255))+"%",b:a(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%)":"rgba("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=m(e);n="#"+h(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return m(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(B,arguments)}},m.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:O(e[o]));e=n}return m(e,t)},m.equals=function(e,t){return!(!e||!t)&&m(e).toRgbString()==m(t).toRgbString()},m.random=function(){return m.fromRatio({r:d(),g:d(),b:d()})},m.mix=function(e,t,n){n=0===n?0:n||50;var o=m(e).toRgb(),r=m(t).toRgb(),l=n/100;return m({r:(r.r-o.r)*l+o.r,g:(r.g-o.g)*l+o.g,b:(r.b-o.b)*l+o.b,a:(r.a-o.a)*l+o.a})},m.readability=function(e,t){var n=m(e),o=m(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},m.isReadable=function(e,t,n){var o,r,l,i,s,a=m.readability(e,t);switch(r=!1,(l=n,"AA"!==(i=((l=l||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(s=(l.size||"small").toLowerCase())&&"large"!==s&&(s="small"),o={level:i,size:s}).level+o.size){case"AAsmall":case"AAAlarge":r=a>=4.5;break;case"AAlarge":r=a>=3;break;case"AAAsmall":r=a>=7}return r},m.mostReadable=function(e,t,n){var o,r,l,i,s=null,a=0;r=(n=n||{}).includeFallbackColors,l=n.level,i=n.size;for(var c=0;c<t.length;c++)(o=m.readability(e,t[c]))>a&&(a=o,s=m(t[c]));return m.isReadable(e,s,{level:l,size:i})||!r?s:(n.includeFallbackColors=!1,m.mostReadable(e,["#fff","#000"],n))};var N=m.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=m.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(N);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function A(e){return c(1,u(0,e))}function M(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function F(e){return r.round(255*parseFloat(e)).toString(16)}function V(e){return M(e)/255}var H,z,U,G=(z="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",U="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=m:void 0===(o=function(){return m}.call(t,n,t,e))||(e.exports=o)}(Math)},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 m=n?r(d):d,p={},f=!0,g={node:m,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){g.isRoot||(g.parent.node[g.key]=e),g.node=e,t&&(f=!1)},delete:function(e){delete g.parent.node[g.key],e&&(f=!1)},remove:function(e){s(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],e&&(f=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return g;function h(){if("object"==typeof g.node&&null!==g.node){g.keys&&g.node_===g.node||(g.keys=l(g.node)),g.isLeaf=0==g.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){g.circular=i[e];break}}else g.isLeaf=!0,g.keys=null;g.notLeaf=!g.isLeaf,g.notRoot=!g.isRoot}h();var b=t.call(g,g.node);return void 0!==b&&g.update&&g.update(b),p.before&&p.before.call(g,g.node),f?("object"!=typeof g.node||null===g.node||g.circular||(i.push(g),h(),a(g.keys,(function(t,r){o.push(t),p.pre&&p.pre.call(g,g.node[t],t);var l=e(g.node[t]);n&&c.call(g.node,t)&&(g.node[t]=l.node),l.isLast=r==g.keys.length-1,l.isFirst=0==r,p.post&&p.post.call(g,l),o.pop()})),i.pop()),p.after&&p.after.call(g,g.node),g):g}(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}},3804: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 Pd},AlignmentToolbar:function(){return Rd},Autocomplete:function(){return Od},BlockAlignmentControl:function(){return yo},BlockAlignmentToolbar:function(){return Eo},BlockBreadcrumb:function(){return Ud},BlockColorsStyleSelector:function(){return $d},BlockContextProvider:function(){return Ii},BlockControls:function(){return Xn},BlockEdit:function(){return Li},BlockEditorKeyboardShortcuts:function(){return Af},BlockEditorProvider:function(){return xs},BlockFormatControls:function(){return Yn},BlockIcon:function(){return ws},BlockInspector:function(){return Nf},BlockList:function(){return Ju},BlockMover:function(){return Uc},BlockNavigationDropdown:function(){return bm},BlockPreview:function(){return fa},BlockSelectionClearer:function(){return Ls},BlockSettingsMenu:function(){return xu},BlockSettingsMenuControls:function(){return Su},BlockTitle:function(){return xc},BlockToolbar:function(){return Tu},BlockTools:function(){return Lf},BlockVerticalAlignmentControl:function(){return Fm},BlockVerticalAlignmentToolbar:function(){return Vm},ButtonBlockAppender:function(){return vc},ButtonBlockerAppender:function(){return bc},ColorPalette:function(){return zm},ColorPaletteControl:function(){return Um},ContrastChecker:function(){return Hr},CopyHandler:function(){return pu},DefaultBlockAppender:function(){return gc},FontSizePicker:function(){return Ul},InnerBlocks:function(){return Yu},Inserter:function(){return fc},InspectorAdvancedControls:function(){return Po},InspectorControls:function(){return Ro},JustifyContentControl:function(){return Qm},JustifyToolbar:function(){return Zm},LineHeightControl:function(){return _l},MediaPlaceholder:function(){return Xp},MediaReplaceFlow:function(){return Wp},MediaUpload:function(){return Up},MediaUploadCheck:function(){return Gp},MultiSelectScrollIntoView:function(){return Mf},NavigableToolbar:function(){return Pc},ObserveTyping:function(){return Vf},PanelColorSettings:function(){return Qp},PlainText:function(){return ef},PreserveScrollInReorder:function(){return Hf},RichText:function(){return Fp},RichTextShortcut:function(){return of},RichTextToolbarButton:function(){return rf},SETTINGS_DEFAULTS:function(){return b},SkipToSelectedBlock:function(){return Sf},ToolSelector:function(){return af},Typewriter:function(){return Wf},URLInput:function(){return np},URLInputButton:function(){return mf},URLPopover:function(){return qp},Warning:function(){return Ri},WritingFlow:function(){return zs},__experimentalBlockAlignmentMatrixControl:function(){return Hd},__experimentalBlockContentOverlay:function(){return Gd},__experimentalBlockFullHeightAligmentControl:function(){return Vd},__experimentalBlockPatternSetup:function(){return Tm},__experimentalBlockVariationPicker:function(){return km},__experimentalBlockVariationTransforms:function(){return Lm},__experimentalBorderRadiusControl:function(){return vr},__experimentalBorderStyleControl:function(){return Sr},__experimentalColorGradientControl:function(){return er},__experimentalDuotoneControl:function(){return Si},__experimentalFontAppearanceControl:function(){return Bl},__experimentalFontFamilyControl:function(){return Rl},__experimentalGetBorderClassesAndStyles:function(){return fd},__experimentalGetColorClassesAndStyles:function(){return bd},__experimentalGetGradientClass:function(){return Go},__experimentalGetGradientObjectByGradientValue:function(){return Ko},__experimentalGetMatchingVariation:function(){return Nm},__experimentalGetSpacingClassesAndStyles:function(){return kd},__experimentalImageSizeControl:function(){return Wm},__experimentalImageURLInputUI:function(){return _f},__experimentalLayoutStyle:function(){return fo},__experimentalLetterSpacingControl:function(){return ql},__experimentalLibrary:function(){return Pf},__experimentalLinkControl:function(){return _p},__experimentalLinkControlSearchInput:function(){return fp},__experimentalLinkControlSearchItem:function(){return lp},__experimentalLinkControlSearchResults:function(){return ap},__experimentalListView:function(){return gm},__experimentalListViewBlockFill:function(){return lm},__experimentalListViewEditor:function(){return Vp},__experimentalPanelColorGradientSettings:function(){return Fr},__experimentalPreviewOptions:function(){return Ef},__experimentalResponsiveBlockControl:function(){return nf},__experimentalUnitControl:function(){return cf},__experimentalUseBorderProps:function(){return gd},__experimentalUseColorProps:function(){return vd},__experimentalUseCustomSides:function(){return mi},__experimentalUseGradient:function(){return $o},__experimentalUseInnerBlocksProps:function(){return qu},__experimentalUseNoRecursiveRenders:function(){return qf},__experimentalUseResizeCanvas:function(){return Cf},__unstableBlockSettingsMenuFirstItem:function(){return ku},__unstableEditorStyles:function(){return da},__unstableIframe:function(){return Ws},__unstableInserterMenuExtension:function(){return Ka},__unstableRichTextInputEvent:function(){return lf},__unstableUseBlockSelectionClearer:function(){return Ns},__unstableUseCanvasClickRedirect:function(){return jf},__unstableUseClipboardHandler:function(){return mu},__unstableUseMouseMoveTypingReset:function(){return Of},__unstableUseTypewriter:function(){return Gf},__unstableUseTypingObserver:function(){return Ff},createCustomColorsHOC:function(){return Ed},getColorClassName:function(){return zo},getColorObjectByAttributeValues:function(){return Vo},getColorObjectByColorValue:function(){return Ho},getFontSize:function(){return Vl},getFontSizeClass:function(){return zl},getFontSizeObjectByValue:function(){return Hl},getGradientSlugByValue:function(){return jo},getGradientValueBySlug:function(){return Wo},store:function(){return Hn},storeConfig:function(){return Vn},transformStyles:function(){return aa},useBlockDisplayInformation:function(){return Ic},useBlockEditContext:function(){return Wn},useBlockProps:function(){return fs},useSetting:function(){return so},validateThemeColors:function(){return Yf},validateThemeGradients:function(){return Xf},withColorContext:function(){return Hm},withColors:function(){return Cd},withFontSizes:function(){return wd}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Bt},__experimentalGetAllowedBlocks:function(){return it},__experimentalGetAllowedPatterns:function(){return ct},__experimentalGetBlockListSettingsForBlocks:function(){return gt},__experimentalGetLastBlockAttributeChanges:function(){return kt},__experimentalGetParsedPattern:function(){return st},__experimentalGetParsedReusableBlock:function(){return ht},__experimentalGetPatternTransformItems:function(){return dt},__experimentalGetPatternsByBlockTypes:function(){return ut},__experimentalGetReusableBlockTitle:function(){return bt},__unstableGetBlockTree:function(){return $},__unstableGetBlockWithBlockTree:function(){return j},__unstableGetBlockWithoutInnerBlocks:function(){return W},__unstableGetClientIdWithClientIdsTree:function(){return q},__unstableGetClientIdsTree:function(){return Y},__unstableIsLastBlockChangeIgnored:function(){return vt},areInnerBlocksControlled:function(){return wt},canInsertBlockType:function(){return Xe},canInsertBlocks:function(){return Qe},didAutomaticChange:function(){return Ct},getAdjacentBlockClientId:function(){return fe},getBlock:function(){return G},getBlockAttributes:function(){return U},getBlockCount:function(){return ee},getBlockHierarchyRootClientId:function(){return me},getBlockIndex:function(){return Te},getBlockInsertionPoint:function(){return Ge},getBlockListSettings:function(){return mt},getBlockMode:function(){return De},getBlockName:function(){return H},getBlockOrder:function(){return xe},getBlockParents:function(){return ue},getBlockParentsByBlockName:function(){return de},getBlockRootClientId:function(){return ce},getBlockSelectionEnd:function(){return re},getBlockSelectionStart:function(){return oe},getBlockTransformItems:function(){return rt},getBlocks:function(){return K},getBlocksByClientId:function(){return J},getClientIdsOfDescendants:function(){return X},getClientIdsWithDescendants:function(){return Q},getDraggedBlockClientIds:function(){return Ve},getFirstMultiSelectedBlockClientId:function(){return ye},getGlobalBlockCount:function(){return Z},getInserterItems:function(){return ot},getLastMultiSelectedBlockClientId:function(){return Ee},getLowestCommonAncestorWithSelectedBlock:function(){return pe},getMultiSelectedBlockClientIds:function(){return ke},getMultiSelectedBlocks:function(){return _e},getMultiSelectedBlocksEndClientId:function(){return Ie},getMultiSelectedBlocksStartClientId:function(){return Be},getNextBlockClientId:function(){return he},getPreviousBlockClientId:function(){return ge},getSelectedBlock:function(){return ae},getSelectedBlockClientId:function(){return se},getSelectedBlockClientIds:function(){return ve},getSelectedBlockCount:function(){return le},getSelectedBlocksInitialCaretPosition:function(){return be},getSelectionEnd:function(){return ne},getSelectionStart:function(){return te},getSettings:function(){return pt},getTemplate:function(){return je},getTemplateLock:function(){return $e},hasBlockMovingClientId:function(){return Et},hasInserterItems:function(){return lt},hasMultiSelection:function(){return Re},hasSelectedBlock:function(){return ie},hasSelectedInnerBlock:function(){return Le},isAncestorBeingDragged:function(){return ze},isAncestorMultiSelected:function(){return we},isBlockBeingDragged:function(){return He},isBlockHighlighted:function(){return St},isBlockInsertionPointVisible:function(){return We},isBlockMultiSelected:function(){return Se},isBlockSelected:function(){return Ne},isBlockValid:function(){return z},isBlockWithinSelection:function(){return Pe},isCaretWithinFormattedText:function(){return Ue},isDraggingBlocks:function(){return Fe},isFirstMultiSelectedBlock:function(){return Ce},isLastBlockChangePersistent:function(){return ft},isMultiSelecting:function(){return Ae},isNavigationMode:function(){return yt},isSelectionEnabled:function(){return Me},isTyping:function(){return Oe},isValidTemplate:function(){return Ke},wasBlockJustInserted:function(){return It}});var t={};function r(){return(r=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)}n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return Tn},__unstableMarkAutomaticChangeFinal:function(){return Nn},__unstableMarkLastChangeAsPersistent:function(){return In},__unstableMarkNextChangeAsNotPersistent:function(){return xn},__unstableSaveReusableBlock:function(){return Bn},clearSelectedBlock:function(){return $t},duplicateBlocks:function(){return Rn},enterFormattedText:function(){return kn},exitFormattedText:function(){return yn},flashBlock:function(){return On},hideInsertionPoint:function(){return sn},insertAfterBlock:function(){return Mn},insertBeforeBlock:function(){return An},insertBlock:function(){return on},insertBlocks:function(){return rn},insertDefaultBlock:function(){return Cn},mergeBlocks:function(){return un},moveBlockToPosition:function(){return nn},moveBlocksDown:function(){return Jt},moveBlocksToPosition:function(){return tn},moveBlocksUp:function(){return en},multiSelect:function(){return jt},receiveBlocks:function(){return Ft},removeBlock:function(){return mn},removeBlocks:function(){return dn},replaceBlock:function(){return Qt},replaceBlocks:function(){return Xt},replaceInnerBlocks:function(){return pn},resetBlocks:function(){return Mt},resetSelection:function(){return Ot},selectBlock:function(){return zt},selectNextBlock:function(){return Gt},selectPreviousBlock:function(){return Ut},selectionChange:function(){return En},setBlockMovingClientId:function(){return Pn},setHasControlledInnerBlocks:function(){return Fn},setNavigationMode:function(){return Ln},setTemplateValidity:function(){return an},showInsertionPoint:function(){return ln},startDraggingBlocks:function(){return bn},startMultiSelect:function(){return Wt},startTyping:function(){return gn},stopDraggingBlocks:function(){return vn},stopMultiSelect:function(){return Kt},stopTyping:function(){return hn},synchronizeTemplate:function(){return cn},toggleBlockHighlight:function(){return Dn},toggleBlockMode:function(){return fn},toggleSelection:function(){return qt},updateBlock:function(){return Ht},updateBlockAttributes:function(){return Vt},updateBlockListSettings:function(){return Sn},updateSettings:function(){return wn},validateBlocksToTemplate:function(){return Dt}});var l=window.wp.element,i=n(4184),s=n.n(i),a=window.lodash,c=window.wp.compose,u=window.wp.hooks,d=window.wp.blocks,m=window.wp.components,p=window.wp.data,f={default:(0,m.createSlotFill)("BlockControls"),block:(0,m.createSlotFill)("BlockControlsBlock"),inline:(0,m.createSlotFill)("BlockFormatControls"),other:(0,m.createSlotFill)("BlockControlsOther"),parent:(0,m.createSlotFill)("BlockControlsParent")},g=window.wp.i18n;const h={insertUsage:{}},b={alignWide:!1,supportsLayout:!0,colors:[{name:(0,g.__)("Black"),slug:"black",color:"#000000"},{name:(0,g.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,g.__)("White"),slug:"white",color:"#ffffff"},{name:(0,g.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,g.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,g.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,g.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,g.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,g.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,g.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,g.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,g.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,g._x)("Small","font size name"),size:13,slug:"small"},{name:(0,g._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,g._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,g._x)("Large","font size name"),size:36,slug:"large"},{name:(0,g._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,g.__)("Thumbnail")},{slug:"medium",name:(0,g.__)("Medium")},{slug:"large",name:(0,g.__)("Large")},{slug:"full",name:(0,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,g.__)("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,g.__)("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,g.__)("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,g.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,g.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function v(e,t,n){return[...e.slice(0,n),...(0,a.castArray)(t),...e.slice(n)]}function k(e,t,n,o=1){const r=[...e];return r.splice(t,o),v(r,e.slice(t,t+o),n)}function _(e,t=""){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,t=""){return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e,t=a.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,a.omit)(e,"attributes")))}function S(e){return E(e,(e=>e.attributes))}function w(e,t="",n={}){return(0,a.reduce)(e[t],((t,o)=>n[o]?t:[...t,o,...w(e,o)]),[])}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,a.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,o=t.attributes,(0,a.isEqual)((0,a.keys)(n),(0,a.keys)(o)));var n,o}const I=e=>e.reduce(((e,t)=>(e[t]={},e)),{}),x=(0,a.flow)(p.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,a.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=>(t={},n)=>{const o=e(t,n);if(o===t)return t;o.cache=t.cache?t.cache:{};const r=e=>e.reduce(((e,n)=>{let o=n;do{e.push(o),o=t.parents[o]}while(o&&!t.controlledInnerBlocks[o]);return e}),[]);switch(n.type){case"RESET_BLOCKS":o.cache=(0,a.mapValues)(E(n.blocks),(()=>({})));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=(0,a.keys)(E(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&e.push(n.rootClientId),o.cache={...o.cache,...I(r(e))};break}case"UPDATE_BLOCK":o.cache={...o.cache,...I(r([n.clientId]))};break;case"UPDATE_BLOCK_ATTRIBUTES":o.cache={...o.cache,...I(r(n.clientIds))};break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=I(r(n.replacedClientIds));o.cache={...(0,a.omit)(o.cache,n.replacedClientIds),...(0,a.omit)(e,n.replacedClientIds),...I((0,a.keys)(E(n.blocks)))};break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":o.cache={...(0,a.omit)(o.cache,n.removedClientIds),...I((0,a.difference)(r(n.clientIds),n.clientIds))};break;case"MOVE_BLOCKS_TO_POSITION":{const e=[...n.clientIds];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),o.cache={...o.cache,...I(r(e))};break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[];n.rootClientId&&e.push(n.rootClientId),o.cache={...o.cache,...I(r(e))};break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,a.keys)((0,a.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.cache={...o.cache,...I(r(e))}}}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,a.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if(t&&"RESET_BLOCKS"===n.type){const e=w(t.order,"",t.controlledInnerBlocks),o=Object.keys((0,a.pickBy)(t.controlledInnerBlocks));return{...t,byClientId:{...(0,a.omit)(t.byClientId,e),...C(n.blocks)},attributes:{...(0,a.omit)(t.attributes,e),...S(n.blocks)},order:{...(0,a.omit)(t.order,e),...(0,a.omit)(_(n.blocks),o)},parents:{...(0,a.omit)(t.parents,e),...y(n.blocks)},cache:{...(0,a.omit)(t.cache,e),...(0,a.omit)((0,a.mapValues)(E(n.blocks),(()=>({}))),o)}}}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:!B(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(e={},t){switch(t.type){case"RESET_BLOCKS":return C(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,a.omit)(t.updates,"attributes");return(0,a.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,a.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,a.omit)(e,t.removedClientIds)}return e},attributes(e={},t){switch(t.type){case"RESET_BLOCKS":return S(t.blocks);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,a.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,a.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,a.omit)(e,t.removedClientIds)}return e},order(e={},t){switch(t.type){case"RESET_BLOCKS":return _(t.blocks);case"RECEIVE_BLOCKS":return{...e,...(0,a.omit)(_(t.blocks),"")};case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=_(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:v(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,a.without)(e[n],...r),[o]:v(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,a.first)(n),l=e[o];if(!l.length||r===(0,a.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,a.first)(n),l=(0,a.last)(n),i=e[o];if(!i.length||l===(0,a.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,a.flow)([e=>(0,a.omit)(e,t.replacedClientIds),e=>({...e,...(0,a.omit)(o,"")}),e=>(0,a.mapValues)(e,(e=>(0,a.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,a.flow)([e=>(0,a.omit)(e,t.removedClientIds),e=>(0,a.mapValues)(e,(e=>(0,a.without)(e,...t.removedClientIds)))])(e)}return e},parents(e={},t){switch(t.type){case"RESET_BLOCKS":return y(t.blocks);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,a.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,a.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function T(e={},t){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.indexToSelect||t.blocks.length-1,o=t.blocks[n];return o?o.clientId===e.clientId?e:{clientId:o.clientId}:{}}}return e}var N,L,P=(0,p.combineReducers)({blocks:x,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,o;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=t;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=t;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,c=null==e||null===(o=e.selectionEnd)||void 0===o?void 0:o.clientId;if(!a&&!c)return e;if(!t.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===c)))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:T(e.selectionStart,t),selectionEnd:T(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,a.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,a.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,a.omit)(e,n):e}}return e},insertionPoint:function(e=null,t){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(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=b,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=h,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n,l=(0,p.select)(d.store).getActiveBlockVariation(r,o);let i=null!=l&&l.name?`${r}/${l.name}`:r;const s={name:i};return"core/block"===r&&(s.ref=o.ref,i+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[i]:{time:t.time,count:e.insertUsage[i]?e.insertUsage[i].count+1:1,insert:s}}}}),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(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){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(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":return t.blocks.length?{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source}:e;case"RESET_BLOCKS":return{}}return e}});function R(e){return[e]}function A(){var e={clear:function(){e.head=null}};return e}function M(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=L?new WeakMap:A()}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&&!M(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(M(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=L?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=A()).isUniqueByDependants=a,s.set(N,l)),s.get(N)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}N={},L="undefined"!=typeof WeakMap;var O=window.wp.primitives,F=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 V=[];function H(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==l.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 z(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}const G=D(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:U(e,t),innerBlocks:wt(e,t)?V:K(e,t)}:null}),((e,t)=>[e.blocks.cache[t]])),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]])),K=D(((e,t)=>(0,a.map)(xe(e,t),(t=>G(e,t)))),((e,t)=>(0,a.map)(e.blocks.order[t||""],(t=>e.blocks.cache[t])))),j=D(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:U(e,t),innerBlocks:$(e,t)}:null}),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])),$=D(((e,t="")=>(0,a.map)(xe(e,t),(t=>j(e,t)))),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])),q=D(((e,t)=>({clientId:t,innerBlocks:Y(e,t)})),(e=>[e.blocks.order])),Y=D(((e,t="")=>(0,a.map)(xe(e,t),(t=>q(e,t)))),(e=>[e.blocks.order])),X=(e,t)=>(0,a.flatMap)(t,(t=>{const n=xe(e,t);return[...n,...X(e,n)]})),Q=D((e=>{const t=xe(e);return[...t,...X(e,t)]}),(e=>[e.blocks.order])),Z=D(((e,t)=>{const n=Q(e);return t?(0,a.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),J=D(((e,t)=>(0,a.map)((0,a.castArray)(t),(t=>G(e,t)))),(e=>[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function ee(e,t){return xe(e,t).length}function te(e){return e.selection.selectionStart}function ne(e){return e.selection.selectionEnd}function oe(e){return e.selection.selectionStart.clientId}function re(e){return e.selection.selectionEnd.clientId}function le(e){return ke(e).length||(e.selection.selectionStart.clientId?1:0)}function ie(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function se(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ae(e){const t=se(e);return t?G(e,t):null}function ce(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ue=D(((e,t,n=!1)=>{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])),de=D(((e,t,n,o=!1)=>{const r=ue(e,t,o);return(0,a.map)((0,a.filter)((0,a.map)(r,(t=>({id:t,name:H(e,t)}))),(({name:e})=>Array.isArray(n)?n.includes(e):e===n)),(({id:e})=>e))}),(e=>[e.blocks.parents]));function me(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function pe(e,t){const n=se(e),o=[...ue(e,t),t],r=[...ue(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 fe(e,t,n=1){if(void 0===t&&(t=se(e)),void 0===t&&(t=n<0?ye(e):Ee(e)),!t)return null;const o=ce(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t)+1*n;return i<0||i===l.length?null:l[i]}function ge(e,t){return fe(e,t,-1)}function he(e,t){return fe(e,t,1)}function be(e){return e.initialPosition}const ve=D((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const o=ce(e,t.clientId);if(null===o)return V;const r=xe(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 ke(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:ve(e)}const _e=D((e=>{const t=ke(e);return t.length?t.map((t=>G(e,t))):V}),(e=>[...ve.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function ye(e){return(0,a.first)(ke(e))||null}function Ee(e){return(0,a.last)(ke(e))||null}function Ce(e,t){return ye(e)===t}function Se(e,t){return-1!==ke(e).indexOf(t)}const we=D(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ce(e,n),o=Se(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Ie(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function xe(e,t){return e.blocks.order[t||""]||V}function Te(e,t,n){return xe(e,n).indexOf(t)}function Ne(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Le(e,t,n=!1){return(0,a.some)(xe(e,t),(t=>Ne(e,t)||Se(e,t)||n&&Le(e,t,n)))}function Pe(e,t){if(!t)return!1;const n=ke(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Re(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function Ae(e){return e.isMultiSelecting}function Me(e){return e.isSelectionEnabled}function De(e,t){return e.blocksMode[t]||"visual"}function Oe(e){return e.isTyping}function Fe(e){return!!e.draggedBlocks.length}function Ve(e){return e.draggedBlocks}function He(e,t){return e.draggedBlocks.includes(t)}function ze(e,t){if(!Fe(e))return!1;const n=ue(e,t);return(0,a.some)(n,(t=>He(e,t)))}function Ue(e){return e.isCaretWithinFormattedText}function Ge(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=ce(e,l)||void 0,n=Te(e,r.clientId,t)+1):n=xe(e).length,{rootClientId:t,index:n}}function We(e){return null!==e.insertionPoint}function Ke(e){return e.template.isValid}function je(e){return e.settings.template}function $e(e,t){if(!t)return e.settings.templateLock;const n=mt(e,t);return n?n.templateLock:null}const qe=(e,t,n=null)=>(0,a.isBoolean)(e)?e:(0,a.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,Ye=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,d.getBlockType)(t),!o)return!1;const{allowedBlockTypes:r}=pt(e);if(!qe(r,t,!0))return!1;if($e(e,n))return!1;const l=mt(e,n);if(n&&void 0===l)return!1;const i=null==l?void 0:l.allowedBlocks,s=qe(i,t),a=o.parent,c=H(e,n),u=qe(a,c);return null!==s&&null!==u?s||u:null!==s?s:null===u||u},Xe=D(Ye,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Qe(e,t,n=null){return t.every((t=>Xe(e,H(e,t),n)))}function Ze(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 Je=(e,t,n)=>!!(0,d.hasBlockSupport)(t,"inserter",!0)&&Ye(e,t.name,n),et=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=Ze(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:tt(r,l)}},tt=(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}},nt=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,d.hasBlockSupport)(n.name,"multiple",!0)||(r=(0,a.some)(J(e,Q(e)),{name:n.name}));const{time:l,count:i=0}=Ze(e,o)||{},s={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:tt(l,i)};if("transform"===t)return s;const c=n.variations.filter((({scope:e})=>!e||e.includes("inserter")));return{...s,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:c,example:n.example,utility:1}},ot=D(((e,t=null)=>{const n=nt(e,{buildScope:"inserter"}),o=(0,d.getBlockTypes)().filter((n=>Je(e,n,t))).map(n),r=Ye(e,"core/block",t)?_t(e).map((t=>{const n=`core/block/${t.id}`,o=ht(e,t.id);let r;1===o.length&&(r=(0,d.getBlockType)(o[0].name));const{time:l,count:i=0}=Ze(e,n)||{},s=tt(l,i);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:r?r.icon:F,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}})):[],l=o.filter((({variations:e=[]})=>!e.some((({isDefault:e})=>e)))),i=[];for(const t of o){const{variations:n=[]}=t;if(n.length){const o=et(e,t);i.push(...n.map(o))}}const s=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},a=l.reduce(s,{core:[],noncore:[]}),c=i.reduce(s,{core:[],noncore:[]});return[...a.core,...c.core,...a.noncore,...c.noncore,...r]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),(0,d.getBlockTypes)()])),rt=D(((e,t,n=null)=>{const o=nt(e,{buildScope:"transform"}),r=(0,d.getBlockTypes)().filter((t=>Je(e,t,n))).map(o),l=(0,a.mapKeys)(r,(({name:e})=>e)),i=(0,d.getPossibleBlockTransformations)(t).reduce(((e,t)=>(l[null==t?void 0:t.name]&&e.push(l[t.name]),e)),[]);return(0,a.orderBy)(i,(e=>l[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,d.getBlockTypes)()])),lt=D(((e,t=null)=>!!(0,a.some)((0,d.getBlockTypes)(),(n=>Je(e,n,t)))||Ye(e,"core/block",t)&&_t(e).length>0),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,_t(e),(0,d.getBlockTypes)()])),it=D(((e,t=null)=>{if(t)return(0,a.filter)((0,d.getBlockTypes)(),(n=>Je(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,d.getBlockTypes)()])),st=D(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((({name:e})=>e===t));return n?{...n,blocks:(0,d.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),at=D((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=pt(e);return t.map((({name:t})=>st(e,t))).filter((({blocks:e})=>((e,t)=>{if((0,a.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!qe(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(e,n)))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),ct=D(((e,t=null)=>{const n=at(e);return(0,a.filter)(n,(({blocks:n})=>n.every((({name:n})=>Xe(e,n,t)))))}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),ut=D(((e,t,n=null)=>{if(!t)return V;const o=ct(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)=>[...ct.getDependants(e,t)])),dt=D(((e,t,n=null)=>{if(!t)return V;if(t.some((({clientId:t,innerBlocks:n})=>n.length||wt(e,t))))return V;const o=Array.from(new Set(t.map((({name:e})=>e))));return ut(e,o,n)}),((e,t)=>[...ut.getDependants(e,t)]));function mt(e,t){return e.blockListSettings[t]}function pt(e){return e.settings}function ft(e){return e.blocks.isPersistentChange}const gt=D(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),ht=D(((e,t)=>{const n=(0,a.find)(_t(e),(e=>e.id===t));return n?(0,d.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(e=>[_t(e)])),bt=D(((e,t)=>{var n;const o=(0,a.find)(_t(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[_t(e)]));function vt(e){return e.blocks.isIgnoredChange}function kt(e){return e.lastBlockAttributesChange}function _t(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function yt(e){return e.isNavigationMode}function Et(e){return e.hasBlockMovingClientId}function Ct(e){return!!e.automaticChangeStatus}function St(e,t){return e.highlightedBlock===t}function wt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Bt=D(((e,t)=>{if(!t.length)return null;const n=se(e);if(t.includes(H(e,n)))return n;const o=ke(e),r=de(e,n||o[0],t);return r?(0,a.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function It(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var xt=window.wp.a11y,Tt=window.wp.richText,Nt=window.wp.deprecated,Lt=n.n(Nt),Pt={SLEEP:({duration:e})=>new Promise((t=>{setTimeout(t,e)})),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:(0,p.createRegistryControl)((e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>e.dispatch(Hn).__unstableMarkAutomaticChangeFinal()))}))};const Rt="core/block-editor";function*At(){if(0===(yield p.controls.select(Rt,"getBlockCount"))){const{__unstableHasCustomAppender:e}=yield p.controls.select(Rt,"getSettings");if(e)return;return yield Cn()}}function*Mt(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*Dt(e)}function*Dt(e){const t=yield p.controls.select(Rt,"getTemplate"),n=yield p.controls.select(Rt,"getTemplateLock"),o=!t||"all"!==n||(0,d.doBlocksMatchTemplate)(e,t);if(o!==(yield p.controls.select(Rt,"isValidTemplate")))return yield an(o),o}function Ot(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ft(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function Vt(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,a.castArray)(e),attributes:t,uniqueByBlock:n}}function Ht(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function zt(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*Ut(e){const t=yield p.controls.select(Rt,"getPreviousBlockClientId",e);if(t)return yield zt(t,-1),[t]}function*Gt(e){const t=yield p.controls.select(Rt,"getNextBlockClientId",e);if(t)return yield zt(t),[t]}function Wt(){return{type:"START_MULTI_SELECT"}}function Kt(){return{type:"STOP_MULTI_SELECT"}}function*jt(e,t){if((yield p.controls.select(Rt,"getBlockRootClientId",e))!==(yield p.controls.select(Rt,"getBlockRootClientId",t)))return;yield{type:"MULTI_SELECT",start:e,end:t};const n=yield p.controls.select(Rt,"getSelectedBlockCount");(0,xt.speak)((0,g.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
- (0,g._n)("%s block selected.","%s blocks selected.",n),n),"assertive")}function $t(){return{type:"CLEAR_SELECTED_BLOCK"}}function qt(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Yt(e,t){var n,o;const r=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,d.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[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:l={}}=e,i=r[n];return{...e,attributes:{...l,className:`${o||""} is-style-${i}`.trim()}}}))}function*Xt(e,t,n,o=0,r){e=(0,a.castArray)(e),t=Yt((0,a.castArray)(t),yield p.controls.select(Rt,"getSettings"));const l=yield p.controls.select(Rt,"getBlockRootClientId",(0,a.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield p.controls.select(Rt,"canInsertBlockType",n.name,l)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r},yield*At()}function Qt(e,t){return Xt(e,t)}function Zt(e){return(t,n)=>({clientIds:(0,a.castArray)(t),type:e,rootClientId:n})}const Jt=Zt("MOVE_BLOCKS_DOWN"),en=Zt("MOVE_BLOCKS_UP");function*tn(e,t="",n="",o){const r=yield p.controls.select(Rt,"getTemplateLock",t);if("all"===r)return;const l={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o};t!==n?"insert"!==r&&(yield p.controls.select(Rt,"canInsertBlocks",e,n))&&(yield l):yield l}function*nn(e,t="",n="",o){yield tn([e],t,n,o)}function on(e,t,n,o=!0,r){return rn([e],t,n,o,0,r)}function*rn(e,t,n,o=!0,r=0,l){(0,a.isObject)(r)&&(l=r,r=0,Lt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=Yt((0,a.castArray)(e),yield p.controls.select(Rt,"getSettings"));const i=[];for(const t of e)(yield p.controls.select(Rt,"canInsertBlockType",t.name,n))&&i.push(t);if(i.length)return{type:"INSERT_BLOCKS",blocks:i,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l}}function ln(e,t,n={}){const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function sn(){return{type:"HIDE_INSERTION_POINT"}}function an(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function*cn(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=yield p.controls.select(Rt,"getBlocks"),t=yield p.controls.select(Rt,"getTemplate"),n=(0,d.synchronizeBlocksWithTemplate)(e,t);return yield Mt(n)}function*un(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[o,r]=n,l=yield p.controls.select(Rt,"getBlock",o),i=(0,d.getBlockType)(l.name);if(!i.merge)return void(yield zt(l.clientId));const s=yield p.controls.select(Rt,"getBlock",r),c=(0,d.getBlockType)(s.name),{clientId:u,attributeKey:m,offset:f}=yield p.controls.select(Rt,"getSelectionStart"),g=(u===o?i:c).attributes[m],h=(u===o||u===r)&&void 0!==m&&void 0!==f&&!!g;g||("number"==typeof m?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 m):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,d.cloneBlock)(l),v=(0,d.cloneBlock)(s);if(h){const e=u===o?b:v,t=e.attributes[m],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:l}=g,i=(0,Tt.insert)((0,Tt.create)({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:l}),"†",f,f);e.attributes[m]=(0,Tt.toHTMLString)({value:i,multilineTag:n,preserveWhiteSpace:l})}const k=l.name===s.name?[v]:(0,d.switchToBlockType)(v,l.name);if(!k||!k.length)return;const _=i.merge(b.attributes,k[0].attributes);if(h){const e=(0,a.findKey)(_,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=_[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=i.attributes[e],s=(0,Tt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),c=s.text.indexOf("†"),u=(0,Tt.remove)(s,c,c+1),d=(0,Tt.toHTMLString)({value:u,multilineTag:n,preserveWhiteSpace:r});_[e]=d,yield En(l.clientId,e,c,c)}yield*Xt([l.clientId,s.clientId],[{...l,attributes:{...l.attributes,..._}},...k.slice(1)])}function*dn(e,t=!0){if(!e||!e.length)return;e=(0,a.castArray)(e);const n=yield p.controls.select(Rt,"getBlockRootClientId",e[0]);if(yield p.controls.select(Rt,"getTemplateLock",n))return;let o;o=t?yield Ut(e[0]):yield p.controls.select(Rt,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const r=yield*At();return[o||r]}function mn(e,t){return dn([e],t)}function pn(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function fn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function gn(){return{type:"START_TYPING"}}function hn(){return{type:"STOP_TYPING"}}function bn(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function vn(){return{type:"STOP_DRAGGING_BLOCKS"}}function kn(){return{type:"ENTER_FORMATTED_TEXT"}}function yn(){return{type:"EXIT_FORMATTED_TEXT"}}function En(e,t,n,o){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}}function Cn(e,t,n){const o=(0,d.getDefaultBlockName)();if(o)return on((0,d.createBlock)(o,e),n,t)}function Sn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function wn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Bn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function In(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function xn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function*Tn(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function Nn(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*Ln(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},e?(0,xt.speak)((0,g.__)("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,xt.speak)((0,g.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}function*Pn(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&(0,xt.speak)((0,g.__)("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."))}function*Rn(e,t=!0){if(!e&&!e.length)return;const n=yield p.controls.select(Rt,"getBlocksByClientId",e),o=yield p.controls.select(Rt,"getBlockRootClientId",e[0]);if((0,a.some)(n,(e=>!e)))return;const r=n.map((e=>e.name));if((0,a.some)(r,(e=>!(0,d.hasBlockSupport)(e,"multiple",!0))))return;const l=yield p.controls.select(Rt,"getBlockIndex",(0,a.last)((0,a.castArray)(e)),o),i=n.map((e=>(0,d.__experimentalCloneSanitizedBlock)(e)));return yield rn(i,l+1,o,t),i.length>1&&t&&(yield jt((0,a.first)(i).clientId,(0,a.last)(i).clientId)),i.map((e=>e.clientId))}function*An(e){if(!e)return;const t=yield p.controls.select(Rt,"getBlockRootClientId",e);if(yield p.controls.select(Rt,"getTemplateLock",t))return;const n=yield p.controls.select(Rt,"getBlockIndex",e,t);return yield Cn({},t,n)}function*Mn(e){if(!e)return;const t=yield p.controls.select(Rt,"getBlockRootClientId",e);if(yield p.controls.select(Rt,"getTemplateLock",t))return;const n=yield p.controls.select(Rt,"getBlockIndex",e,t);return yield Cn({},t,n+1)}function Dn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*On(e){yield Dn(e,!0),yield{type:"SLEEP",duration:150},yield Dn(e,!1)}function Fn(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Vn={reducer:P,selectors:e,actions:t,controls:Pt},Hn=(0,p.createReduxStore)(Rt,{...Vn,persist:["preferences"]});(0,p.registerStore)(Rt,{...Vn,persist:["preferences"]});const zn={name:"",isSelected:!1},Un=(0,l.createContext)(zn),{Provider:Gn}=Un;function Wn(){return(0,l.useContext)(Un)}function Kn(){const{isSelected:e,clientId:t,name:n}=Wn();return(0,p.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(Hn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function jn({group:e="default",controls:t,children:n,__experimentalExposeToChildren:o=!1}){const r=function(e,t){const n=Kn(),{clientId:o}=Wn(),r=(0,p.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:r}=e(Hn),{hasBlockSupport:l}=e(d.store);return t&&l(n(o),"__experimentalExposeControlsToChildren",!1)&&r(o)}),[t,o]);var l;return n?null===(l=f[e])||void 0===l?void 0:l.Fill:r?f.parent.Fill:null}(e,o);return r?(0,l.createElement)(m.__experimentalStyleProvider,{document:document},(0,l.createElement)(r,null,(o=>{const r=(0,a.isEmpty)(o)?null:o;return(0,l.createElement)(m.__experimentalToolbarContext.Provider,{value:r},"default"===e&&(0,l.createElement)(m.ToolbarGroup,{controls:t}),n)}))):null}function $n({group:e="default",...t}){const n=(0,l.useContext)(m.__experimentalToolbarContext),o=f[e].Slot,i=(0,m.__experimentalUseSlot)(o.__unstableName);return Boolean(i.fills&&i.fills.length)?"default"===e?(0,l.createElement)(o,r({},t,{bubblesVirtually:!0,fillProps:n})):(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(o,r({},t,{bubblesVirtually:!0,fillProps:n}))):null}const qn=jn;qn.Slot=$n;const Yn=e=>(0,l.createElement)(jn,r({group:"inline"},e));Yn.Slot=e=>(0,l.createElement)($n,r({group:"inline"},e));var Xn=qn,Qn=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Zn=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Jn=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),eo=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),to=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));function no(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}var oo={name:"flex",label:(0,g.__)("Flex"),edit:()=>null,save:function({selector:e}){return(0,l.createElement)("style",null,`\n\t\t\t\t${no(e)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: var( --wp--style--block-gap, 0.5em );\n\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\n\t\t\t\t${no(e,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation:()=>"horizontal",getAlignments:()=>[]},ro=function({icon:e,size:t=24,...n}){return(0,l.cloneElement)(e,{width:t,height:t,...n})};const lo={"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.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing},io={"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0};function so(e){const{name:t}=Wn();return(0,p.useSelect)((n=>{var o;const r=n(Hn).getSettings(),l=`__experimentalFeatures.${e}`,i=`__experimentalFeatures.blocks.${t}.${e}`,s=null!==(o=(0,a.get)(r,i))&&void 0!==o?o:(0,a.get)(r,l);var c,u;if(void 0!==s)return io[e]?null!==(c=null!==(u=s.user)&&void 0!==u?u:s.theme)&&void 0!==c?c:s.core:s;const d=lo[e]?lo[e](r):void 0;return void 0!==d?d:"typography.dropCap"===e||void 0}),[t,e])}const ao=[{name:"default",label:(0,g.__)("Flow"),edit:function({layout:e,onChange:t}){const{wideSize:n,contentSize:o}=e,r=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,l.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,l.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||n||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:r}),(0,l.createElement)(ro,{icon:Zn})),(0,l.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,l.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:n||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:r}),(0,l.createElement)(ro,{icon:eo}))),(0,l.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,l.createElement)(m.Button,{variant:"secondary",isSmall:!0,disabled:!o&&!n,onClick:()=>t({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,g.__)("Reset"))),(0,l.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,g.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},save:function({selector:e,layout:t={}}){const{contentSize:n,wideSize:o}=t;let r=n||o?`\n\t\t\t\t\t${no(e,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=n?n:o};\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\t\n\t\t\t\t\t${no(e,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=o?o:n};\n\t\t\t\t\t}\n\t\n\t\t\t\t\t${no(e,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return r+=`\n\t\t\t${no(e,'> [data-align="left"]')} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 2em;\n\t\t\t}\n\t\n\t\t\t${no(e,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t\t${no(e,"> * + *")} {\n\t\t\t\tmargin-top: var( --wp--style--block-gap );\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t`,(0,l.createElement)("style",null,r)},getOrientation:()=>"vertical",getAlignments:e=>void 0!==e.alignments?e.alignments:e.contentSize||e.wideSize?["wide","full","left","center","right"]:["left","center","right"]},oo];function co(e="default"){return ao.find((t=>t.name===e))}const uo={type:"default"},mo=(0,l.createContext)(uo),po=mo.Provider;function fo({layout:e={},...t}){const n=co(e.type);return n?(0,l.createElement)(n.save,r({layout:e},t)):null}const go=["left","center","right","wide","full"],ho=["wide","full"];function bo(e=go){const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=(0,l.useContext)(mo),r=co(null==o?void 0:o.type),i=r.getAlignments(o);if(n)return i.filter((t=>e.includes(t)));if("default"!==r.name)return[];const{alignments:s=go}=o;return e.filter((e=>(o.alignments||t||!ho.includes(e))&&s.includes(e)))}const vo={left:{icon:Qn,title:(0,g.__)("Align left")},center:{icon:Zn,title:(0,g.__)("Align center")},right:{icon:Jn,title:(0,g.__)("Align right")},wide:{icon:eo,title:(0,g.__)("Wide width")},full:{icon:to,title:(0,g.__)("Full width")}},ko={isAlternate:!0};var _o=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:i=!0}){const s=bo(n);if(0===s.length)return null;const a=vo[e],c=vo.center,u=o?m.ToolbarGroup:m.ToolbarDropdownMenu,d=o?{isCollapsed:i}:{};return(0,l.createElement)(u,r({popoverProps:ko,icon:a?a.icon:c.icon,label:(0,g.__)("Align"),toggleProps:{describedBy:(0,g.__)("Change alignment")},controls:s.map((n=>{return{...vo[n],isActive:e===n,role:i?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o}))},d))};function yo(e){return(0,l.createElement)(_o,r({},e,{isToolbar:!1}))}function Eo(e){return(0,l.createElement)(_o,r({},e,{isToolbar:!0}))}const Co=["left","center","right","wide","full"],So=["wide","full"];function wo(e,t=!0,n=!0){let o;return o=Array.isArray(e)?Co.filter((t=>e.includes(t))):!0===e?Co:[],!n||!0===e&&!t?(0,a.without)(o,...So):o}const Bo=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=bo(wo((0,d.getBlockSupport)(n,"align"),(0,d.hasBlockSupport)(n,"alignWide",!0)));return(0,l.createElement)(l.Fragment,null,o.length>0&&(0,l.createElement)(Xn,{group:"block",__experimentalExposeToChildren:!0},(0,l.createElement)(yo,{value:t.attributes.align,onChange:e=>{var n,o;e||(null===(n=(0,d.getBlockType)(t.name).attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="");t.setAttributes({align:e})},controls:o})),(0,l.createElement)(e,t))}),"withToolbarControls"),Io=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:i}=o,s=bo(wo((0,d.getBlockSupport)(n,"align"),(0,d.hasBlockSupport)(n,"alignWide",!0)));if(void 0===i)return(0,l.createElement)(e,t);let a=t.wrapperProps;return s.includes(i)&&(a={...a,"data-align":i}),(0,l.createElement)(e,r({},t,{wrapperProps:a}))}));(0,u.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,a.has)(e.attributes,["align","type"])||(0,d.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Co,""]}}),e})),(0,u.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Io),(0,u.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Bo),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return wo((0,d.getBlockSupport)(t,"align"),(0,d.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=s()(`align${o}`,e.className)),e})),window.wp.warning;var xo={default:(0,m.createSlotFill)("InspectorControls"),advanced:(0,m.createSlotFill)("InspectorAdvancedControls")};function To({__experimentalGroup:e="default",children:t}){var n;const o=Kn(),r=null===(n=xo[e])||void 0===n?void 0:n.Fill;return r?o?(0,l.createElement)(m.__experimentalStyleProvider,{document:document},(0,l.createElement)(r,null,t)):null:("undefined"!=typeof process&&process.env,null)}function No({__experimentalGroup:e="default",bubblesVirtually:t=!0,...n}){var o;const i=null===(o=xo[e])||void 0===o?void 0:o.Slot,s=(0,m.__experimentalUseSlot)(null==i?void 0:i.__unstableName);return i&&s?Boolean(s.fills&&s.fills.length)?(0,l.createElement)(i,r({},n,{bubblesVirtually:t})):null:("undefined"!=typeof process&&process.env,null)}const Lo=To;Lo.Slot=No;const Po=e=>(0,l.createElement)(To,r({},e,{__experimentalGroup:"advanced"}));Po.Slot=e=>(0,l.createElement)(No,r({},e,{__experimentalGroup:"advanced"})),Po.slotName="InspectorAdvancedControls";var Ro=Lo;const Ao=/[\s#]/g,Mo=(0,c.createHigherOrderComponent)((e=>t=>{if((0,d.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===l.Platform.OS,o=(0,l.createElement)(m.TextControl,{className:"html-anchor-control",label:(0,g.__)("HTML anchor"),help:(0,l.createElement)(l.Fragment,null,(0,g.__)("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,l.createElement)(m.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},(0,g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,g.__)("Add an anchor"),onChange:e=>{e=e.replace(Ao,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,t),n&&(0,l.createElement)(Ro,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,l.createElement)(Ro,null,(0,l.createElement)(m.PanelBody,{title:(0,g.__)("Heading settings")},o)))}return(0,l.createElement)(e,t)}),"withInspectorControl");(0,u.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,a.has)(e.attributes,["anchor","type"])||(0,d.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}}),e})),(0,u.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Mo),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,d.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Do=(0,c.createHigherOrderComponent)((e=>t=>(0,d.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,t),(0,l.createElement)(Ro,{__experimentalGroup:"advanced"},(0,l.createElement)(m.TextControl,{autoComplete:"off",label:(0,g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,g.__)("Separate multiple classes with spaces.")}))):(0,l.createElement)(e,t)),"withInspectorControl");(0,u.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,d.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,u.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Do),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,d.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=s()(e.className,n.className)),e})),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,d.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,a.uniq)([(0,d.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,d.getBlockDefaultClassName)(t.name)),e}));var Oo=n(7621),Fo=n.n(Oo);const Vo=(e,t,n)=>{if(t){const n=(0,a.find)(e,{slug:t});if(n)return n}return{color:n}},Ho=(e,t)=>(0,a.find)(e,{color:t});function zo(e,t){if(e&&t)return`has-${(0,a.kebabCase)(t)}-${e}`}const Uo=[];function Go(e){if(e)return`has-${e}-gradient-background`}function Wo(e,t){const n=(0,a.find)(e,["slug",t]);return n&&n.gradient}function Ko(e,t){return(0,a.find)(e,["gradient",t])}function jo(e,t){const n=Ko(e,t);return n&&n.slug}function $o({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=Wn(),o=so("color.gradients")||Uo,{gradient:r,customGradient:i}=(0,p.useSelect)((o=>{const{getBlockAttributes:r}=o(Hn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:s}=(0,p.useDispatch)(Hn),a=(0,l.useCallback)((r=>{const l=jo(o,r);s(n,l?{[e]:l,[t]:void 0}:{[e]:void 0,[t]:r})}),[o,n,s]),c=Go(r);let u;return u=r?Wo(o,r):i,{gradientClass:c,gradientValue:u,setGradient:a}}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
5
- const qo=(0,g.__)("(Color: %s)"),Yo=(0,g.__)("(Gradient: %s)"),Xo=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
6
- function Qo({colors:e,gradients:t,label:n,currentTab:o,colorValue:r,gradientValue:i}){let s,a;if("color"===o){if(r){s=r;const t=Ho(e,s),n=t&&t.name;a=(0,g.sprintf)(qo,n||s)}}else if("gradient"===o&&i){s=i;const e=Ko(t,s),n=e&&e.name;a=(0,g.sprintf)(Yo,n||s)}return(0,l.createElement)(l.Fragment,null,n,!!s&&(0,l.createElement)(m.ColorIndicator,{colorValue:s,"aria-label":a}))}function Zo({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,className:r,label:i,onColorChange:c,onGradientChange:u,colorValue:d,gradientValue:p,clearable:f}){const h=c&&(!(0,a.isEmpty)(e)||!n),b=u&&(!(0,a.isEmpty)(t)||!o),[v,k]=(0,l.useState)(p?"gradient":!!h&&"color");return h||b?(0,l.createElement)(m.BaseControl,{className:s()("block-editor-color-gradient-control",r)},(0,l.createElement)("fieldset",null,(0,l.createElement)("legend",null,(0,l.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,l.createElement)(m.BaseControl.VisualLabel,null,(0,l.createElement)(Qo,{currentTab:v,label:i,colorValue:d,gradientValue:p})))),h&&b&&(0,l.createElement)(m.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},(0,l.createElement)(m.Button,{isSmall:!0,isPressed:"color"===v,onClick:()=>k("color")},(0,g.__)("Solid")),(0,l.createElement)(m.Button,{isSmall:!0,isPressed:"gradient"===v,onClick:()=>k("gradient")},(0,g.__)("Gradient"))),("color"===v||!b)&&(0,l.createElement)(m.ColorPalette,{value:d,onChange:b?e=>{c(e),u()}:c,colors:e,disableCustomColors:n,clearable:f}),("gradient"===v||!h)&&(0,l.createElement)(m.GradientPicker,{value:p,onChange:h?e=>{u(e),c()}:u,gradients:t,disableCustomGradients:o,clearable:f}))):null}function Jo(e){const t={};return t.colors=so("color.palette"),t.gradients=so("color.gradients"),t.disableCustomColors=!so("color.custom"),t.disableCustomGradients=!so("color.customGradient"),(0,l.createElement)(Zo,r({},t,e))}var er=function(e){return(0,a.every)(Xo,(t=>e.hasOwnProperty(t)))?(0,l.createElement)(Zo,e):(0,l.createElement)(Jo,e)};const tr=e=>{if(!(0,a.isObject)(e)||Array.isArray(e))return e;const t=(0,a.pickBy)((0,a.mapValues)(e,tr),a.identity);return(0,a.isEmpty)(t)?void 0:t},nr=[];function or(e){var t;const{attributes:{borderColor:n,style:o},setAttributes:r}=e,i=so("color.palette")||nr,s=!so("color.custom"),a=!so("color.customGradient");return(0,l.createElement)(er,{label:(0,g.__)("Color"),value:n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color),colors:i,gradients:void 0,disableCustomColors:s,disableCustomGradients:a,onColorChange:e=>{const t=Ho(i,e),n={...o,border:{...null==o?void 0:o.border,color:null!=t&&t.slug?void 0:e}},l=null!=t&&t.slug?t.slug:void 0;r({style:tr(n),borderColor:l})}})}function rr(e,t,n){var o;if(!Tr(t,"color")||Nr(t))return e;const{borderColor:r,style:l}=n,i=zo("border-color",r),a=s()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=a||void 0,e}const lr=(0,c.createHigherOrderComponent)((e=>t=>{var n,o;const{name:i,attributes:s}=t,{borderColor:a}=s,c=so("color.palette")||nr;if(!Tr(i,"color")||Nr(i))return(0,l.createElement)(e,t);const u={borderColor:a?null===(n=Vo(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,l.createElement)(e,r({},t,{wrapperProps:d}))}));function ir(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function sr(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,m.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=ir(o);return 0===r||r?`${r}${l}`:null}function ar(e={}){const t=sr(e);return isNaN(parseFloat(t))}function cr(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function ur({onChange:e,values:t,...n}){const o=sr(t),i=cr(t)&&ar(t),s=i?(0,g.__)("Mixed"):null;return(0,l.createElement)(m.__experimentalUnitControl,r({},n,{"aria-label":(0,g.__)("Border radius"),disableUnits:i,isOnly:!0,value:o,onChange:e,placeholder:s}))}(0,u.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Tr(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",rr),(0,u.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Tr(e,"color")||Nr(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),rr(o,e,n)},e})),(0,u.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",lr);const dr={topLeft:(0,g.__)("Top left"),topRight:(0,g.__)("Top right"),bottomLeft:(0,g.__)("Bottom left"),bottomRight:(0,g.__)("Bottom right")};function mr({onChange:e,values:t,...n}){const o="string"!=typeof t?t:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t};return(0,l.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(dr).map((([t,i])=>{return(0,l.createElement)(m.__experimentalUnitControl,r({},n,{key:t,"aria-label":i,value:o[t],onChange:(s=t,t=>{e&&e({...o,[s]:t||void 0})})}));var s})))}var pr=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),fr=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 gr({isLinked:e,...t}){const n=e?(0,g.__)("Unlink Radii"):(0,g.__)("Link Radii");return(0,l.createElement)(m.Tooltip,{text:n},(0,l.createElement)(m.Button,r({},t,{className:"component-border-radius-control__linked-button",isPrimary:e,isSecondary:!e,isSmall:!0,icon:e?pr:fr,iconSize:16,"aria-label":n})))}const hr={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},br={px:100,em:20,rem:20};function vr({onChange:e,values:t}){const[n,o]=(0,l.useState)(!cr(t)||!ar(t)),r=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"]}),i=function(e={}){if("string"==typeof e){const[,t]=(0,m.__experimentalParseUnit)(e);return t||"px"}return ir(Object.values(e).map((e=>{const[,t]=(0,m.__experimentalParseUnit)(e);return t})))}(t),s=r&&r.find((e=>e.value===i)),a=(null==s?void 0:s.step)||1,[c]=(0,m.__experimentalParseUnit)(sr(t));return(0,l.createElement)("fieldset",{className:"components-border-radius-control"},(0,l.createElement)("legend",null,(0,g.__)("Radius")),(0,l.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ur,{className:"components-border-radius-control__unit-control",values:t,min:0,onChange:e,unit:i,units:r}),(0,l.createElement)(m.RangeControl,{className:"components-border-radius-control__range-control",value:c,min:0,max:br[i],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${i}`:void 0)},step:a})):(0,l.createElement)(mr,{min:0,onChange:e,values:t||hr,units:r}),(0,l.createElement)(gr,{onClick:()=>o(!n),isLinked:n})))}function kr(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,l.createElement)(vr,{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=tr(t)),o({style:t})}})}var _r=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,l.createElement)(O.Path,{d:"M5 11.25h14v1.5H5z"})),yr=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,l.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"})),Er=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,l.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 Cr=[{label:(0,g.__)("Solid"),icon:_r,value:"solid"},{label:(0,g.__)("Dashed"),icon:yr,value:"dashed"},{label:(0,g.__)("Dotted"),icon:Er,value:"dotted"}];function Sr({onChange:e,value:t}){return(0,l.createElement)("fieldset",{className:"components-border-style-control"},(0,l.createElement)("legend",null,(0,g.__)("Style")),(0,l.createElement)("div",{className:"components-border-style-control__buttons"},Cr.map((n=>(0,l.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===t,onClick:()=>e(n.value===t?void 0:n.value),"aria-label":n.label})))))}const wr=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,l.createElement)(Sr,{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:tr(t)})}})},Br=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:i,style:s}=(null==n?void 0:n.border)||{},[a,c]=(0,l.useState)(),[u,d]=(0,l.useState)();(0,l.useEffect)((()=>{"none"!==s&&c(s)}),[s]),(0,l.useEffect)((()=>{(t||i)&&d({name:t||void 0,color:i||void 0})}),[t,i]);const p=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"]});return(0,l.createElement)(m.__experimentalUnitControl,{value:r,label:(0,g.__)("Width"),min:0,onChange:e=>{let r={...n,border:{...null==n?void 0:n.border,width:e}},l=t;const i=0===parseFloat(e);i&&(l=void 0,r.border.color=void 0,r.border.style="none"),i||"none"!==s||(r.border.style=a),i||void 0!==t||(l=null==u?void 0:u.name,r.border.color=null==u?void 0:u.color),void 0!==e&&""!==e||(r=tr(r)),o({borderColor:l,style:r})},units:p})},Ir="__experimentalBorder";function xr(e){const t=Lr(e),n=Tr(e.name),o=so("border.customColor")&&Tr(e.name,"color"),r=so("border.customRadius")&&Tr(e.name,"radius"),i=so("border.customStyle")&&Tr(e.name,"style"),s=so("border.customWidth")&&Tr(e.name,"width");return t||!n?null:(0,l.createElement)(Ro,null,(0,l.createElement)(m.PanelBody,{className:"block-editor-hooks__border-controls",title:(0,g.__)("Border"),initialOpen:!1},(s||i)&&(0,l.createElement)("div",{className:"block-editor-hooks__border-controls-row"},s&&(0,l.createElement)(Br,e),i&&(0,l.createElement)(wr,e)),o&&(0,l.createElement)(or,e),r&&(0,l.createElement)(kr,e)))}function Tr(e,t="any"){if("web"!==l.Platform.OS)return!1;const n=(0,d.getBlockSupport)(e,Ir);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 Nr(e){const t=(0,d.getBlockSupport)(e,Ir);return null==t?void 0:t.__experimentalSkipSerialization}const Lr=()=>[!so("border.customColor"),!so("border.customRadius"),!so("border.customStyle"),!so("border.customWidth")].every(Boolean),Pr=(0,g.__)("(%s: color %s)"),Rr=(0,g.__)("(%s: gradient %s)"),Ar=["colors","disableCustomColors","gradients","disableCustomGradients"],Mr=({colors:e,gradients:t,settings:n})=>n.map((({colorValue:n,gradientValue:o,label:r,colors:i,gradients:s},a)=>{if(!n&&!o)return null;let c;if(n){const t=Ho(i||e,n);c=(0,g.sprintf)(Pr,r.toLowerCase(),t&&t.name||n)}else{const e=Ko(s||t,n);c=(0,g.sprintf)(Rr,r.toLowerCase(),e&&e.name||o)}return(0,l.createElement)(m.ColorIndicator,{key:a,colorValue:n||o,"aria-label":c})})),Dr=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:i,children:c,settings:u,title:d,...p})=>{if((0,a.isEmpty)(t)&&(0,a.isEmpty)(n)&&o&&i&&(0,a.every)(u,(e=>(0,a.isEmpty)(e.colors)&&(0,a.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const f=(0,l.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},d,(0,l.createElement)(Mr,{colors:t,gradients:n,settings:u}));return(0,l.createElement)(m.PanelBody,r({className:s()("block-editor-panel-color-gradient-settings",e),title:f},p),u.map(((e,s)=>(0,l.createElement)(er,r({key:s,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:i},e)))),c)},Or=e=>{const t={};return t.colors=so("color.palette"),t.gradients=so("color.gradients"),t.disableCustomColors=!so("color.custom"),t.disableCustomGradients=!so("color.customGradient"),(0,l.createElement)(Dr,r({},t,e))};var Fr=e=>(0,a.every)(Ar,(t=>e.hasOwnProperty(t)))?(0,l.createElement)(Dr,e):(0,l.createElement)(Or,e);function Vr({tinyBackgroundColor:e,tinyTextColor:t,backgroundColor:n,textColor:o}){const r=e.getBrightness()<t.getBrightness()?(0,g.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,g.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.");return(0,l.useEffect)((()=>{(0,xt.speak)((0,g.__)("This color combination may be hard for people to read."))}),[n,o]),(0,l.createElement)("div",{className:"block-editor-contrast-checker"},(0,l.createElement)(m.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},r))}var Hr=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fontSize:o,isLargeText:r,textColor:i}){if(!e&&!t||!i&&!n)return null;const s=Fo()(e||t),a=Fo()(i||n);return 1!==s.getAlpha()||1!==a.getAlpha()||Fo().isReadable(s,a,{level:"AA",size:r||!1!==r&&o>=24?"large":"small"})?null:(0,l.createElement)(Vr,{backgroundColor:e,textColor:i,tinyBackgroundColor:s,tinyTextColor:a})};const zr=(0,l.createContext)();function Ur({children:e}){const t=(0,l.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,l.createElement)(zr.Provider,{value:t},e)}function Gr(e){const{refs:t,callbacks:n}=(0,l.useContext)(zr),o=(0,l.useRef)();return(0,l.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,c.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Wr(e){const{refs:t}=(0,l.useContext)(zr),n=(0,l.useRef)();return n.current=e,(0,l.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Kr(e){const{callbacks:t}=(0,l.useContext)(zr),n=Wr(e),[o,r]=(0,l.useState)(null);return(0,l.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function jr(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function $r({settings:e,clientId:t,enableContrastChecking:n=!0}){const[o,r]=(0,l.useState)(),[i,s]=(0,l.useState)(),a=Wr(t);return(0,l.useEffect)((()=>{if(!n)return;if(!a.current)return;s(jr(a.current).color);let e=a.current,t=jr(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=jr(e).backgroundColor;r(t)})),(0,l.createElement)(Ro,null,(0,l.createElement)(Fr,{title:(0,g.__)("Color"),initialOpen:!1,settings:e},n&&(0,l.createElement)(Hr,{backgroundColor:o,textColor:i})))}const qr="color",Yr=[],Xr=e=>{const t=(0,d.getBlockSupport)(e,qr);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Qr=e=>{const t=(0,d.getBlockSupport)(e,qr);return null==t?void 0:t.__experimentalSkipSerialization},Zr=e=>{const t=(0,d.getBlockSupport)(e,qr);return(0,a.isObject)(t)&&!!t.gradients};function Jr(e,t,n){var o,r,l,i,a,c;if(!Xr(t)||Qr(t))return e;const u=Zr(t),{backgroundColor:d,textColor:m,gradient:p,style:f}=n,g=zo("background-color",d),h=Go(p),b=zo("color",m),v=s()(e.className,b,h,{[g]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!g),"has-text-color":m||(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&&(p||(null==f||null===(i=f.color)||void 0===i?void 0:i.gradient)),"has-link-color":null==f||null===(a=f.elements)||void 0===a||null===(c=a.link)||void 0===c?void 0:c.color});return e.className=v||void 0,e}const el=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Vo(e,n[1]).color:t};function tl(e){var t,n,o,r,i,s,c,u,m;const{name:p,attributes:f}=e,h=so("color.palette")||Yr,b=so("color.gradients")||Yr,v=so("color.custom"),k=so("color.customGradient"),_=so("color.link"),y=(0,l.useRef)(f);if((0,l.useEffect)((()=>{y.current=f}),[f]),!Xr(p))return null;const E=(e=>{if("web"!==l.Platform.OS)return!1;const t=(0,d.getBlockSupport)(e,qr);return(0,a.isObject)(t)&&!!t.link})(p)&&_&&(h.length>0||v),C=(e=>{const t=(0,d.getBlockSupport)(e,qr);return t&&!1!==t.text})(p)&&(h.length>0||v),S=(e=>{const t=(0,d.getBlockSupport)(e,qr);return t&&!1!==t.background})(p)&&(h.length>0||v),w=Zr(p)&&(b.length>0||k);if(!(E||C||S||w))return null;const{style:B,textColor:I,backgroundColor:x,gradient:T}=f;let N;if(w&&T)N=Wo(b,T);else if(w){var L;N=null==B||null===(L=B.color)||void 0===L?void 0:L.gradient}const P=t=>n=>{var o,r;const l=Ho(h,n),i=t+"Color",s={...y.current.style,color:{...null===(o=y.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:tr(s),[i]:a};e.setAttributes(c),y.current={...y.current,...c}};return(0,l.createElement)($r,{enableContrastChecking:!("web"!==l.Platform.OS||T||null!=B&&null!==(t=B.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...C?[{label:(0,g.__)("Text color"),onColorChange:P("text"),colorValue:Vo(h,I,null==B||null===(n=B.color)||void 0===n?void 0:n.text).color}]:[],...S||w?[{label:(0,g.__)("Background color"),onColorChange:S?P("background"):void 0,colorValue:Vo(h,x,null==B||null===(o=B.color)||void 0===o?void 0:o.background).color,gradientValue:N,onGradientChange:w?t=>{const n=jo(b,t);let o;if(n){var r,l,i;const e={...null===(r=y.current)||void 0===r?void 0:r.style,color:{...null===(l=y.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:tr(e),gradient:n}}else{var s,a,c;const e={...null===(s=y.current)||void 0===s?void 0:s.style,color:{...null===(a=y.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:tr(e),gradient:void 0}}e.setAttributes(o),y.current={...y.current,...o}}:void 0}]:[],...E?[{label:(0,g.__)("Link Color"),onColorChange:t=>{const n=Ho(h,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=function(e,t,n){return(0,a.setWith)(e?(0,a.clone)(e):{},["elements","link","color","text"],n,a.clone)}(B,0,o);e.setAttributes({style:r})},colorValue:el(h,null==B||null===(r=B.elements)||void 0===r||null===(i=r.link)||void 0===i||null===(s=i.color)||void 0===s?void 0:s.text),clearable:!(null==B||null===(c=B.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(m=u.color)||void 0===m||!m.text)}]:[]]})}const nl=(0,c.createHigherOrderComponent)((e=>t=>{var n,o,i;const{name:s,attributes:a}=t,{backgroundColor:c,textColor:u}=a,d=so("color.palette")||Yr;if(!Xr(s)||Qr(s))return(0,l.createElement)(e,t);const m={color:u?null===(n=Vo(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:c?null===(o=Vo(d,c))||void 0===o?void 0:o.color:void 0};let p=t.wrapperProps;return p={...t.wrapperProps,style:{...m,...null===(i=t.wrapperProps)||void 0===i?void 0:i.style}},(0,l.createElement)(e,r({},t,{wrapperProps:p}))}));(0,u.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Xr(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Zr(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Jr),(0,u.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Xr(e)||Qr(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Jr(o,e,n)},e})),(0,u.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",nl);var ol=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),rl=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 ll=[{name:(0,g.__)("Underline"),value:"underline",icon:ol},{name:(0,g.__)("Strikethrough"),value:"line-through",icon:rl}];function il({value:e,onChange:t}){return(0,l.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,l.createElement)("legend",null,(0,g.__)("Decoration")),(0,l.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},ll.map((n=>(0,l.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===e,onClick:()=>t(n.value===e?void 0:n.value),"aria-label":n.name})))))}const sl="typography.__experimentalTextDecoration";function al(e){var t;const{attributes:{style:n},setAttributes:o}=e;return cl(e)?null:(0,l.createElement)(il,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:tr({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function cl({name:e}={}){const t=!(0,d.hasBlockSupport)(e,sl),n=so("typography.customTextDecorations");return t||!n}var ul=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),dl=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),ml=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 pl=[{name:(0,g.__)("Uppercase"),value:"uppercase",icon:ul},{name:(0,g.__)("Lowercase"),value:"lowercase",icon:dl},{name:(0,g.__)("Capitalize"),value:"capitalize",icon:ml}];function fl({value:e,onChange:t}){return(0,l.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,l.createElement)("legend",null,(0,g.__)("Letter case")),(0,l.createElement)("div",{className:"block-editor-text-transform-control__buttons"},pl.map((n=>(0,l.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:e===n.value,"aria-label":n.name,onClick:()=>t(e===n.value?void 0:n.value)})))))}const gl="typography.__experimentalTextTransform";function hl(e){var t;const{attributes:{style:n},setAttributes:o}=e;return bl(e)?null:(0,l.createElement)(fl,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:tr({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function bl({name:e}={}){const t=!(0,d.hasBlockSupport)(e,gl),n=so("typography.customTextTransforms");return t||!n}function vl(e){const t=!cl(e),n=!bl(e);return t||n?(0,l.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&(0,l.createElement)(al,e),n&&(0,l.createElement)(hl,e)):null}var kl=window.wp.keycodes;function _l({value:e,onChange:t}){const n=function(e){return void 0!==e&&""!==e}(e),o=n?e:"";return(0,l.createElement)("div",{className:"block-editor-line-height-control"},(0,l.createElement)(m.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:o}=e;o!==kl.ZERO||n||(e.preventDefault(),t("0"))},onChange:e=>{if(n)return void t(e);let o=e;switch(e){case"0.1":o=1.6;break;case"0":o=1.4}t(o)},label:(0,g.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}const yl="typography.lineHeight";function El(e){var t;const{attributes:{style:n}}=e;return Cl(e)?null:(0,l.createElement)(_l,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:t=>{const o={...n,typography:{...null==n?void 0:n.typography,lineHeight:t}};e.setAttributes({style:tr(o)})}})}function Cl({name:e}={}){const t=!so("typography.customLineHeight");return!(0,d.hasBlockSupport)(e,yl)||t}const Sl=[{name:(0,g.__)("Regular"),value:"normal"},{name:(0,g.__)("Italic"),value:"italic"}],wl=[{name:(0,g.__)("Thin"),value:"100"},{name:(0,g.__)("Extra Light"),value:"200"},{name:(0,g.__)("Light"),value:"300"},{name:(0,g.__)("Regular"),value:"400"},{name:(0,g.__)("Medium"),value:"500"},{name:(0,g.__)("Semi Bold"),value:"600"},{name:(0,g.__)("Bold"),value:"700"},{name:(0,g.__)("Extra Bold"),value:"800"},{name:(0,g.__)("Black"),value:"900"}];function Bl(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:i}}=e,s=n||o,a={key:"default",name:(0,g.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},c=(0,l.useMemo)((()=>n&&o?(()=>{const e=[a];return Sl.forEach((({name:t,value:n})=>{wl.forEach((({name:o,value:r})=>{const l="normal"===n?o:(0,g.sprintf)(
7
  /* translators: 1: Font weight name. 2: Font style name. */
8
- (0,g.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:l,style:{fontStyle:n,fontWeight:r}})}))})),e})():n?(()=>{const e=[a];return Sl.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[a];return wl.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),u=c.find((e=>e.style.fontStyle===r&&e.style.fontWeight===i));return(0,l.createElement)("fieldset",{className:"components-font-appearance-control"},s&&(0,l.createElement)(m.CustomSelectControl,{className:"components-font-appearance-control__select",label:n?o?(0,g.__)("Appearance"):(0,g.__)("Font style"):(0,g.__)("Font weight"),options:c,value:u,onChange:({selectedItem:e})=>t(e.style)}))}const Il="typography.__experimentalFontStyle",xl="typography.__experimentalFontWeight";function Tl(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,i=!Nl(e),s=!Ll(e);if(!i&&!s)return null;const 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,l.createElement)(Bl,{onChange:e=>{r({style:tr({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:s,value:{fontStyle:a,fontWeight:c}})}function Nl({name:e}={}){const t=(0,d.hasBlockSupport)(e,Il),n=so("typography.customFontStyle");return!t||!n}function Ll({name:e}={}){const t=(0,d.hasBlockSupport)(e,xl),n=so("typography.customFontWeight");return!t||!n}function Pl(e){const t=Nl(e),n=Ll(e);return t&&n}function Rl({value:e="",onChange:t,fontFamilies:n,...o}){const i=so("typography.fontFamilies");if(n||(n=i),(0,a.isEmpty)(n))return null;const s=[{value:"",label:(0,g.__)("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,l.createElement)(m.SelectControl,r({label:(0,g.__)("Font family"),options:s,value:e,onChange:t,labelPosition:"top"},o))}const Al="typography.__experimentalFontFamily";function Ml({name:e,setAttributes:t,attributes:{style:n={}}}){var o;const r=so("typography.fontFamilies");if(Dl({name:e}))return null;const i=((e,t)=>{const n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){const t=(0,a.find)(e,(({slug:e})=>e===n[1]));if(t)return t.fontFamily}return t})(r,null===(o=n.typography)||void 0===o?void 0:o.fontFamily);return(0,l.createElement)(Rl,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:i,onChange:function(e){const o=(0,a.find)(r,(({fontFamily:t})=>t===e));t({style:tr({...n,typography:{...n.typography||{},fontFamily:o?`var:preset|font-family|${o.slug}`:e||void 0}})})}})}function Dl({name:e}){const t=so("typography.fontFamilies");return!t||0===t.length||!(0,d.hasBlockSupport)(e,Al)}var Ol=window.wp.tokenList,Fl=n.n(Ol);const Vl=(e,t,n)=>{if(t){const n=(0,a.find)(e,{slug:t});if(n)return n}return{size:n}};function Hl(e,t){return(0,a.find)(e,{size:t})||{size:t}}function zl(e){if(e)return`has-${(0,a.kebabCase)(e)}-font-size`}var Ul=function(e){const t=so("typography.fontSizes"),n=!so("typography.customFontSize");return(0,l.createElement)(m.FontSizePicker,r({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Gl="typography.fontSize";function Wl(e,t,n){if(!(0,d.hasBlockSupport)(t,Gl))return e;if((0,d.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(Fl())(e.className);o.add(zl(n.fontSize));const r=o.value;return e.className=r||void 0,e}function Kl(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:i}=e,s=jl(e),a=so("typography.fontSizes");if(s)return null;const c=Vl(a,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),u=(null==c?void 0:c.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,l.createElement)(Ul,{onChange:e=>{const t=Hl(a,e).slug;i({style:tr({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:u})}function jl({name:e}={}){const t=so("typography.fontSizes"),n=!(null==t||!t.length);return!(0,d.hasBlockSupport)(e,Gl)||!n}const $l=(0,c.createHigherOrderComponent)((e=>t=>{var n,o;const r=so("typography.fontSizes"),{name:i,attributes:{fontSize:s,style:a},wrapperProps:c}=t;if(!(0,d.hasBlockSupport)(i,Gl)||(0,d.hasBlockSupport)(i,"typography.__experimentalSkipSerialization")||!s||null!=a&&null!==(n=a.typography)&&void 0!==n&&n.fontSize)return(0,l.createElement)(e,t);const u=Vl(r,s,null==a||null===(o=a.typography)||void 0===o?void 0:o.fontSize).size,m={...t,wrapperProps:{...c,style:{fontSize:u,...null==c?void 0:c.style}}};return(0,l.createElement)(e,m)}),"withFontSizeInlineStyles");function ql({value:e,onChange:t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,l.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Letter-spacing"),value:e,__unstableInputWidth:"60px",units:n,onChange:t})}(0,u.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,d.hasBlockSupport)(e,Gl)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Wl),(0,u.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,d.hasBlockSupport)(e,Gl))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Wl(o,e,n)},e})),(0,u.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",$l);const Yl="__experimentalLetterSpacing";function Xl(e){var t;const{attributes:{style:n},setAttributes:o}=e;return Ql(e)?null:(0,l.createElement)(ql,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:tr({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})}})}function Ql({name:e}={}){const t=!(0,d.hasBlockSupport)(e,Yl),n=so("typography.customLetterSpacing");return t||!n}const Zl=[yl,Gl,Il,xl,Al,sl,gl,Yl];function Jl(e){const t=function(e={}){const t=[Pl(e),jl(e),Cl(e),Dl(e),cl(e),bl(e),Ql(e)];return t.filter(Boolean).length===t.length}(e),n=ei(e.name);return t||!n?null:(0,l.createElement)(Ro,null,(0,l.createElement)(m.PanelBody,{title:(0,g.__)("Typography")},(0,l.createElement)(Ml,e),(0,l.createElement)(Kl,e),(0,l.createElement)(Tl,e),(0,l.createElement)(El,e),(0,l.createElement)(vl,e),(0,l.createElement)(Xl,e)))}const ei=e=>Zl.some((t=>(0,d.hasBlockSupport)(e,t)));function ti(e){const t=(0,d.getBlockSupport)(e,si);return!!(!0===t||null!=t&&t.margin)}function ni({name:e}={}){const t=!so("spacing.customMargin"),n=!pi(e,"margin");return!ti(e)||t||n}function oi(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,i=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]}),s=mi(n,"margin"),a=s&&s.some((e=>ci.includes(e)));return ni(e)?null:l.Platform.select({web:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.__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:tr(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:tr(t)})},label:(0,g.__)("Margin"),sides:s,units:i,allowReset:!1,splitOnAxis:a})),native:null})}function ri(e){const t=(0,d.getBlockSupport)(e,si);return!!(!0===t||null!=t&&t.padding)}function li({name:e}={}){const t=!so("spacing.customPadding"),n=!pi(e,"padding");return!ri(e)||t||n}function ii(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,i=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]}),s=mi(n,"padding"),a=s&&s.some((e=>ci.includes(e)));return li(e)?null:l.Platform.select({web:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.__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:tr(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:tr(t)})},label:(0,g.__)("Padding"),sides:s,units:i,allowReset:!1,splitOnAxis:a})),native:null})}const si="spacing",ai=["top","right","bottom","left"],ci=["vertical","horizontal"];function ui(e){const t=li(e),n=ni(e),o=di(e),r=(i=e.name,"web"===l.Platform.OS&&(ri(i)||ti(i)));var i;if(o||!r)return null;const s=(0,d.getBlockSupport)(e.name,[si,"__experimentalDefaultControls"]);return(0,l.createElement)(Ro,{key:"dimensions"},(0,l.createElement)(m.__experimentalToolsPanel,{label:(0,g.__)("Dimensions options"),header:(0,g.__)("Dimensions"),resetAll:()=>{const{style:t}=e.attributes;e.setAttributes({style:tr({...t,spacing:{...null==t?void 0:t.spacing,margin:void 0,padding:void 0}})})}},!t&&(0,l.createElement)(m.__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,g.__)("Padding"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:tr({...n,spacing:{...null==n?void 0:n.spacing,padding:void 0}})})}(e),isShownByDefault:null==s?void 0:s.padding},(0,l.createElement)(ii,e)),!n&&(0,l.createElement)(m.__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,g.__)("Margin"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:tr({...n,spacing:{...null==n?void 0:n.spacing,margin:void 0}})})}(e),isShownByDefault:null==s?void 0:s.margin},(0,l.createElement)(oi,e))))}const di=(e={})=>{const t=li(e),n=ni(e);return t&&n};function mi(e,t){const n=(0,d.getBlockSupport)(e,si);if(n&&"boolean"!=typeof n[t])return n[t]}function pi(e,t){const n=mi(e,t);return!(n&&n.some((e=>ai.includes(e)))&&n.some((e=>ci.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const fi=[...Zl,Ir,qr,si],gi=e=>fi.some((t=>(0,d.hasBlockSupport)(e,t))),hi="var:";function bi(e){return(0,a.startsWith)(e,hi)?`var(--wp--${e.slice(hi.length).split("|").join("--")})`:e}function vi(e={}){const t={};return Object.keys(d.__EXPERIMENTAL_STYLE_PROPERTY).forEach((n=>{const o=d.__EXPERIMENTAL_STYLE_PROPERTY[n].value,r=d.__EXPERIMENTAL_STYLE_PROPERTY[n].properties;if((0,a.has)(e,o)&&"elements"!==(0,a.first)(o)){const l=(0,a.get)(e,o);r&&!(0,a.isString)(l)?Object.entries(r).forEach((e=>{const[n,o]=e,r=(0,a.get)(l,[o]);r&&(t[n]=bi(r))})):t[n]=bi((0,a.get)(e,o))}})),t}const ki={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[qr],"typography.__experimentalSkipSerialization":["typography"],[`${si}.__experimentalSkipSerialization`]:["spacing"]};function _i(e,t,n){if(!gi(t))return e;let{style:o}=n;return(0,a.forEach)(ki,((e,n)=>{(0,d.getBlockSupport)(t,n)&&(o=(0,a.omit)(o,e))})),e.style={...vi(o),...e.style},e}const yi=(0,c.createHigherOrderComponent)((e=>t=>{const n=Kn();return(0,l.createElement)(l.Fragment,null,n&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Jl,t),(0,l.createElement)(xr,t),(0,l.createElement)(tl,t),(0,l.createElement)(ui,t)),(0,l.createElement)(e,t))}),"withToolbarControls"),Ei=(0,c.createHigherOrderComponent)((e=>t=>{var n,o;const i=null===(n=t.attributes.style)||void 0===n?void 0:n.elements,u=`wp-elements-${(0,c.useInstanceId)(e)}`,m=function(e,t={}){return(0,a.map)(t,((t,n)=>{const o=vi(t);return(0,a.isEmpty)(o)?"":[`.${e} ${d.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,a.map)(o,((e,t)=>`\t${(0,a.kebabCase)(t)}: ${e}${"link"===n?"!important":""};`)),"}"].join("\n")})).join("\n")}(u,null===(o=t.attributes.style)||void 0===o?void 0:o.elements);return(0,l.createElement)(l.Fragment,null,i&&(0,l.createElement)("style",{dangerouslySetInnerHTML:{__html:m}}),(0,l.createElement)(e,r({},t,{className:i?s()(t.className,u):t.className})))}));(0,u.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return gi(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,u.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",_i),(0,u.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!gi(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),_i(o,e,n)},e})),(0,u.addFilter)("editor.BlockEdit","core/style/with-block-controls",yi),(0,u.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Ei);var Ci=function({value:e,onChange:t,onToggle:n,duotonePalette:o,colorPalette:r,disableCustomColors:i,disableCustomDuotone:s}){return(0,l.createElement)(m.Popover,{className:"block-editor-duotone-control__popover",headerTitle:(0,g.__)("Duotone"),onFocusOutside:n},(0,l.createElement)(m.MenuGroup,{label:(0,g.__)("Duotone")},(0,l.createElement)(m.DuotonePicker,{colorPalette:r,duotonePalette:o,disableCustomColors:i,disableCustomDuotone:s,value:e,onChange:t})))},Si=function({colorPalette:e,duotonePalette:t,disableCustomColors:n,disableCustomDuotone:o,value:r,onChange:i}){const[s,a]=(0,l.useState)(!1),c=()=>{a((e=>!e))};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.ToolbarButton,{showTooltip:!0,onClick:c,"aria-haspopup":"true","aria-expanded":s,onKeyDown:e=>{s||e.keyCode!==kl.DOWN||(e.preventDefault(),c())},label:(0,g.__)("Apply duotone filter"),icon:(0,l.createElement)(m.DuotoneSwatch,{values:r})}),s&&(0,l.createElement)(Ci,{value:r,onChange:i,onToggle:c,duotonePalette:t,colorPalette:e,disableCustomColors:n,disableCustomDuotone:o}))},wi=window.wp.dom;const Bi=(0,l.createContext)({});function Ii({value:e,children:t}){const n=(0,l.useContext)(Bi),o=(0,l.useMemo)((()=>({...n,...e})),[n,e]);return(0,l.createElement)(Bi.Provider,{value:o,children:t})}var xi=Bi;const Ti={};var Ni=(0,m.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,d.getBlockType)(n),i=(0,l.useContext)(xi),c=(0,l.useMemo)((()=>o&&o.usesContext?(0,a.pick)(i,o.usesContext):Ti),[o,i]);if(!o)return null;const u=o.edit||o.save;if(o.apiVersion>1||(0,d.hasBlockSupport)(o,"lightBlockWrapper",!1))return(0,l.createElement)(u,r({},e,{context:c}));const m=(0,d.hasBlockSupport)(o,"className",!0)?(0,d.getBlockDefaultClassName)(n):null,p=s()(m,t.className);return(0,l.createElement)(u,r({},e,{context:c,className:p}))}));function Li(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,l.createElement)(Gn,{value:(0,l.useMemo)((()=>r),Object.values(r))},(0,l.createElement)(Ni,e))}var Pi=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Ri=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,l.createElement)("div",{className:s()(e,"block-editor-warning")},(0,l.createElement)("div",{className:"block-editor-warning__contents"},(0,l.createElement)("p",{className:"block-editor-warning__message"},n),(l.Children.count(t)>0||o)&&(0,l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(t)>0&&l.Children.map(t,((e,t)=>(0,l.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,l.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:Pi,label:(0,g.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,l.createElement)(m.MenuGroup,null,o.map(((e,t)=>(0,l.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},Ai=n(7630);function Mi({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,l.createElement)("div",{className:i},(0,l.createElement)("div",{className:"block-editor-block-compare__content"},(0,l.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,l.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,l.createElement)(l.RawHTML,null,(0,wi.safeHTML)(n)))),(0,l.createElement)("div",{className:"block-editor-block-compare__action"},(0,l.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}var Di=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(c=o(e),(0,a.castArray)(c).map((e=>(0,d.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var c;const u=(m=e.originalContent,p=i,(0,Ai.Kx)(m,p).map(((e,t)=>{const n=s()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,l.createElement)("span",{key:t,className:n},e.value)})));var m,p;return(0,l.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,l.createElement)(Mi,{title:(0,g.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,g.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,l.createElement)(Mi,{title:(0,g.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:u,renderedContent:i}))};const Oi=e=>(0,d.rawHandler)({HTML:e.originalContent});var Fi=(0,c.compose)([(0,p.withSelect)(((e,{clientId:t})=>({block:e(Hn).getBlock(t)}))),(0,p.withDispatch)(((e,{block:t})=>{const{replaceBlock:n}=e(Hn);return{convertToClassic(){n(t.clientId,(e=>(0,d.createBlock)("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>(0,d.createBlock)("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,Oi(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>(0,d.createBlock)(e,t,n))(t))}}}))])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:o,block:r}){const i=!!(0,d.getBlockType)("core/html"),[s,a]=(0,l.useState)(!1),c=(0,l.useCallback)((()=>a(!0)),[]),u=(0,l.useCallback)((()=>a(!1)),[]),p=(0,l.useMemo)((()=>[{
 
 
 
9
  // translators: Button to fix block content
10
- title:(0,g._x)("Resolve","imperative verb"),onClick:c},i&&{title:(0,g.__)("Convert to HTML"),onClick:e},{title:(0,g.__)("Convert to Classic Block"),onClick:n}].filter(Boolean)),[c,e,n]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Ri,{actions:[(0,l.createElement)(m.Button,{key:"recover",onClick:o,variant:"primary"},(0,g.__)("Attempt Block Recovery"))],secondaryActions:p},(0,g.__)("This block contains unexpected or invalid content.")),s&&(0,l.createElement)(m.Modal,{title:// translators: Dialog title to fix block content
11
- (0,g.__)("Resolve Block"),onRequestClose:u,className:"block-editor-block-compare"},(0,l.createElement)(Di,{block:r,onKeep:e,onConvert:t,convertor:Oi,convertButtonText:(0,g.__)("Convert to Blocks")})))}));const Vi=(0,l.createElement)(Ri,{className:"block-editor-block-list__block-crash-warning"},(0,g.__)("This block has encountered an error and cannot be previewed."));var Hi=()=>Vi;class zi extends l.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 Ui=zi,Gi=n(4042),Wi=function({clientId:e}){const[t,n]=(0,l.useState)(""),o=(0,p.useSelect)((t=>t(Hn).getBlock(e)),[e]),{updateBlock:r}=(0,p.useDispatch)(Hn);return(0,l.useEffect)((()=>{n((0,d.getBlockContent)(o))}),[o]),(0,l.createElement)(Gi.Z,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const l=(0,d.getBlockType)(o.name),i=(0,d.getBlockAttributes)(l,t,o.attributes),s=t||(0,d.getSaveContent)(l,i),a=!t||(0,d.isValidBlockContent)(l,i,s);r(e,{attributes:i,originalContent:s,isValid:a}),t||n({content:s})},onChange:e=>n(e.target.value)})},Ki=n(8088);const ji=e=>e+1,$i=e=>({top:e.offsetTop,left:e.offsetLeft});var qi=function({isSelected:e,adjustScrolling:t,enableAnimation:n,triggerAnimationOnChange:o}){const r=(0,l.useRef)(),i=(0,c.useReducedMotion)()||!n,[s,a]=(0,l.useReducer)(ji,0),[u,d]=(0,l.useReducer)(ji,0),[m,p]=(0,l.useState)({x:0,y:0}),f=(0,l.useMemo)((()=>r.current?$i(r.current):null),[o]),g=(0,l.useMemo)((()=>{if(!t||!r.current)return()=>{};const e=(0,wi.getScrollContainer)(r.current);if(!e)return()=>{};const n=r.current.getBoundingClientRect();return()=>{const t=r.current.getBoundingClientRect().top-n.top;t&&(e.scrollTop+=t)}}),[o,t]);function h({x:t,y:n}){t=Math.round(t),n=Math.round(n),t===h.x&&n===h.y||(function({x:t,y:n}){if(!r.current)return;const o=0===t&&0===n;r.current.style.transformOrigin=o?"":"center",r.current.style.transform=o?"":`translate3d(${t}px,${n}px,0)`,r.current.style.zIndex=!e||o?"":"1",g()}({x:t,y:n}),h.x=t,h.y=n)}return(0,l.useLayoutEffect)((()=>{s&&d()}),[s]),(0,l.useLayoutEffect)((()=>{if(!f)return;if(i)return void g();r.current.style.transform="";const e=$i(r.current);a(),p({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[o]),h.x=0,h.y=0,(0,Ki.q_)({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onFrame:h}),r};const Yi=".block-editor-block-list__block",Xi=".block-list-appender";function Qi(e,t){return t.closest([Yi,Xi].join(","))===e}function Zi(e){const t=(0,l.useRef)(),n=function(e){return(0,p.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(Hn);if(l(e)&&!o()&&!r())return n()}),[e])}(e);return(0,l.useEffect)((()=>{if(null==n)return;if(!t.current)return;const{ownerDocument:e}=t.current;if(t.current.contains(e.activeElement))return;const o=wi.focus.tabbable.find(t.current).filter((e=>(0,wi.isTextField)(e))),r=-1===n,l=(r?a.last:a.first)(o)||t.current;Qi(t.current,l)?(0,wi.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function Ji(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function es(){const e=(0,p.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(Hn);return t()||n().outlineMode}),[]);return(0,c.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",Ji),t.addEventListener("mouseover",Ji),()=>{t.removeEventListener("mouseout",Ji),t.removeEventListener("mouseover",Ji),t.classList.remove("is-hovered")}}),[e])}function ts(e){return(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:l,getBlockName:i,getSettings:a,hasSelectedInnerBlock:c,isTyping:u,__experimentalGetActiveBlockIdByBlockNames:m}=t(Hn),{__experimentalSpotlightEntityBlocks:p,outlineMode:f}=a(),g=n(e),h=r(e),b=i(e),v=c(e,!0),k=m(p);return s()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":l(e),"is-reusable":(0,d.isReusableBlock)((0,d.getBlockType)(b)),"is-dragging":g,"has-child-selected":v,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":h&&f&&u()})}),[e])}function ns(e){return(0,p.useSelect)((t=>{const n=t(Hn).getBlockName(e),o=(0,d.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1||(0,d.hasBlockSupport)(o,"lightBlockWrapper",!1))return(0,d.getBlockDefaultClassName)(n)}),[e])}function os(e){return(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Hn),r=o(e);if(null==r||!r.className)return;const l=(0,d.getBlockType)(n(e));return l.apiVersion>1||(0,d.hasBlockSupport)(l,"lightBlockWrapper",!1)?r.className:void 0}),[e])}function rs(e){return(0,p.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(Hn);if(!i(e))return;const a=n();return a?s()("is-block-moving-mode",{"can-insert-moving-block":o(r(a),l(e))}):void 0}),[e])}function ls(e){const{isBlockSelected:t}=(0,p.useSelect)(Hn),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(Hn);return(0,c.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):Qi(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}function is(e){const t=(0,p.useSelect)((t=>t(Hn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(Hn),{insertDefaultBlock:r,removeBlock:l}=(0,p.useDispatch)(Hn);return(0,c.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!==kl.ENTER&&s!==kl.BACKSPACE&&s!==kl.DELETE||a!==i||(0,wi.isTextField)(a)||(t.preventDefault(),s===kl.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function ss(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(Hn),{setNavigationMode:o,selectBlock:r}=(0,p.useDispatch)(Hn);return(0,c.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 as=n(4979),cs=n.n(as);function us(e){const t=(0,l.useRef)(),n=(0,p.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Hn);return n(e)||o()===e}),[e]);return(0,l.useEffect)((()=>{if(!n)return;const e=t.current;if(!e)return;if(e.contains(e.ownerDocument.activeElement))return;const o=(0,wi.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&cs()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}function ds(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function ms(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,p.useDispatch)(Hn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:u}=(0,p.useSelect)(Hn);return(0,c.useRefEffect)((c=>{const{ownerDocument:d}=c,{defaultView:m}=d;let p,f;function g({isSelectionEnd:t}){const n=m.getSelection();if(!n.rangeCount||n.isCollapsed)return void ds(c,!0);const l=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Yi);return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===l){if(r(e),t&&(ds(c,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);p.contains(e)&&p.focus()}}else{const t=[...s(e),e],n=[...s(l),l],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function h(){d.removeEventListener("selectionchange",g),m.removeEventListener("mouseup",h),f=m.requestAnimationFrame((()=>{g({isSelectionEnd:!0}),n()}))}function b({buttons:n}){1===n&&l()&&i(e)&&(p=d.activeElement,t(),d.addEventListener("selectionchange",g),m.addEventListener("mouseup",h),ds(c,!1))}function v(t){if(l()&&0===t.button)if(t.shiftKey){const n=a();n&&n!==e&&(ds(c,!1),o(n,e),t.preventDefault())}else u()&&r(e)}return c.addEventListener("mousedown",v),c.addEventListener("mouseleave",b),()=>{c.removeEventListener("mousedown",v),c.removeEventListener("mouseleave",b),d.removeEventListener("selectionchange",g),m.removeEventListener("mouseup",h),m.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function ps(){const e=(0,l.useContext)(Qu);return(0,c.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function fs(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i}=(0,l.useContext)(gs),{index:a,mode:u,name:m,blockTitle:f,isPartOfSelection:h,adjustScrolling:b,enableAnimation:v,lightBlockWrapper:k}=(0,p.useSelect)((e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:r,getBlockName:l,isTyping:i,getGlobalBlockCount:s,isBlockSelected:a,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:m}=e(Hn),p=a(n),f=c(n)||u(n),g=l(n),h=t(n),b=(0,d.getBlockType)(g);return{index:o(n,h),mode:r(n),name:g,blockTitle:null==b?void 0:b.title,isPartOfSelection:p||f,adjustScrolling:p||m(n),enableAnimation:!i()&&s()<=200,lightBlockWrapper:(null==b?void 0:b.apiVersion)>1||(0,d.hasBlockSupport)(b,"lightBlockWrapper",!1)}}),[n]),_=(0,g.sprintf)((0,g.__)("Block: %s"),f),y="html"!==u||t?"":"-visual",E=(0,c.useMergeRefs)([e.ref,Zi(n),us(n),Gr(n),ls(n),ms(n),is(n),ss(n),es(),ps(),qi({isSelected:h,adjustScrolling:b,enableAnimation:v,triggerAnimationOnChange:a})]),C=Wn();return k||n!==C.clientId||"undefined"!=typeof process&&process.env,{...r,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":m,"data-title":f,className:s()(s()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,r.className,ts(n),ns(n),os(n),rs(n)),style:{...r.style,...e.style}}}fs.save=d.__unstableGetBlockProps;const gs=(0,l.createContext)();function hs({children:e,isHtml:t,...n}){return(0,l.createElement)("div",fs(n,{__unstableIsHtml:t}),e)}const bs=(0,p.withSelect)(((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,__unstableGetBlockWithoutInnerBlocks:s}=e(Hn),a=s(t),c=o(t),u=i(n),{name:d,attributes:m,isValid:p}=a||{};return{mode:r(t),isSelectionEnabled:l(),isLocked:!!u,block:a,name:d,attributes:m,isValid:p,isSelected:c}})),vs=(0,p.withDispatch)(((e,t,{select:n})=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:l,replaceBlocks:i,toggleSelection:s,__unstableMarkLastChangeAsPersistent:a}=e(Hn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n(Hn),l=r(),{clientId:i}=t,s=l.length?l:[i];o(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:l}=t,{getBlockIndex:i}=n(Hn),s=i(o,l);r(e,s+1,l)},onMerge(e){const{clientId:o}=t,{getPreviousBlockClientId:r,getNextBlockClientId:i}=n(Hn);if(e){const e=i(o);e&&l(o,e)}else{const e=r(o);e&&l(e,o)}},onReplace(e,n,o){e.length&&!(0,d.isUnmodifiedDefaultBlock)(e[e.length-1])&&a(),i([t.clientId],e,n,o)},toggleSelection(e){s(e)}}}));var ks=(0,c.compose)(c.pure,bs,vs,(0,c.ifCondition)((({block:e})=>!!e)),(0,m.withFilters)("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:o,isSelectionEnabled:r,className:i,name:c,isValid:u,attributes:m,wrapperProps:f,setAttributes:g,onReplace:h,onInsertBlocksAfter:b,onMerge:v,toggleSelection:k}){const{removeBlock:_}=(0,p.useDispatch)(Hn),y=(0,l.useCallback)((()=>_(n)),[n]);let E=(0,l.createElement)(Li,{name:c,isSelected:o,attributes:m,setAttributes:g,insertBlocksAfter:t?void 0:b,onReplace:t?void 0:h,onRemove:t?void 0:y,mergeBlocks:t?void 0:v,clientId:n,isSelectionEnabled:r,toggleSelection:k});const C=(0,d.getBlockType)(c),S=C.apiVersion>1||(0,d.hasBlockSupport)(C,"lightBlockWrapper",!1);C.getEditWrapperProps&&(f=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=s()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(f,C.getEditWrapperProps(m)));const w=f&&!!f["data-align"];let B;if(w&&(E=(0,l.createElement)("div",{className:"wp-block","data-align":f["data-align"]},E)),u)B="html"===e?(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{display:"none"}},E),(0,l.createElement)(hs,{isHtml:!0},(0,l.createElement)(Wi,{clientId:n}))):S?E:(0,l.createElement)(hs,f,E);else{const e=(0,d.getSaveContent)(C,m);B=(0,l.createElement)(hs,{className:"has-warning"},(0,l.createElement)(Fi,{clientId:n}),(0,l.createElement)(l.RawHTML,null,(0,wi.safeHTML)(e)))}const I={clientId:n,className:i,wrapperProps:(0,a.omit)(f,["data-align"]),isAligned:w},x=(0,l.useMemo)((()=>I),Object.values(I));return(0,l.createElement)(gs.Provider,{value:x},(0,l.createElement)(Ui,{fallback:(0,l.createElement)(hs,{className:"has-warning"},(0,l.createElement)(Hi,null))},B))})),_s=window.wp.htmlEntities,ys=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Es=[(0,l.createInterpolateElement)((0,g.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,l.createElement)("kbd",null)}),(0,l.createInterpolateElement)((0,g.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,l.createElement)("kbd",null)}),(0,l.createInterpolateElement)((0,g.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,l.createElement)("kbd",null)}),(0,g.__)("Drag files into the editor to automatically insert media blocks."),(0,g.__)("Change a block's type by pressing the block icon on the toolbar.")];var Cs=function(){const[e]=(0,l.useState)(Math.floor(Math.random()*Es.length));return(0,l.createElement)(m.Tip,null,Es[e])},Ss=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"}));function ws({icon:e,showColors:t=!1,className:n}){var o;"block-default"===(null===(o=e)||void 0===o?void 0:o.src)&&(e={src:Ss});const r=(0,l.createElement)(m.Icon,{icon:e&&e.src?e.src:e}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,l.createElement)("span",{style:i,className:s()("block-editor-block-icon",n,{"has-colors":t})},r)}var Bs=function({title:e,icon:t,description:n,blockType:o}){return o&&(Lt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o)),(0,l.createElement)("div",{className:"block-editor-block-card"},(0,l.createElement)(ws,{icon:t,showColors:!0}),(0,l.createElement)("div",{className:"block-editor-block-card__content"},(0,l.createElement)("h2",{className:"block-editor-block-card__title"},e),(0,l.createElement)("span",{className:"block-editor-block-card__description"},n)))};function Is({clientId:e=null,value:t,selection:n,onChange:o=a.noop,onInput:r=a.noop}){const i=(0,p.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:u,setHasControlledInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:f}=i.dispatch(Hn),{getBlockName:g,getBlocks:h}=i.select(Hn),b=(0,l.useRef)({incoming:null,outgoing:[]}),v=(0,l.useRef)(!1),k=(0,l.useRef)(r),_=(0,l.useRef)(o);(0,l.useEffect)((()=>{k.current=r,_.current=o}),[r,o]),(0,l.useEffect)((()=>{b.current.outgoing.includes(t)?(0,a.last)(b.current.outgoing)===t&&(b.current.outgoing=[]):h(e)!==t&&(b.current.outgoing=[],(()=>{if(t)if(f(),e){m(e,!0),f();const n=t.map((e=>(0,d.cloneBlock)(e)));v.current&&(b.current.incoming=n),u(e,n)}else v.current&&(b.current.incoming=t),s(t)})(),n&&c(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,l.useEffect)((()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=i.select(Hn);let s=h(e),a=r(),c=!1;v.current=!0;const u=i.subscribe((()=>{if(null!==e&&null===g(e))return;const i=r(),u=h(e),d=u!==s;if(s=u,d&&(b.current.incoming||l()))return b.current.incoming=null,void(a=i);(d||c&&!d&&i&&!a)&&(a=i,b.current.outgoing.push(s),(a?_.current:k.current)(s,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:o()}})),c=d}));return()=>u()}),[i,e])}var xs=(0,c.createHigherOrderComponent)((e=>(0,p.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,l.createElement)(e,r({registry:n},o));const[i,s]=(0,l.useState)(null);return(0,l.useEffect)((()=>{const e=(0,p.createRegistry)({},n);e.registerStore(Rt,Vn),s(e)}),[n]),i?(0,l.createElement)(p.RegistryProvider,{value:i},(0,l.createElement)(e,r({registry:i},o))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,p.useDispatch)(Hn);return(0,l.useEffect)((()=>{o(n)}),[n]),Is(e),(0,l.createElement)(Ur,null,t)}));function Ts({onClick:e}){return(0,l.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},(0,l.createElement)(m.Disabled,null,(0,l.createElement)(Ju,null)))}function Ns(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,p.useSelect)(Hn),{clearSelectedBlock:n}=(0,p.useDispatch)(Hn);return(0,c.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function Ls(e){return(0,l.createElement)("div",r({ref:Ns()},e))}function Ps(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 Rs(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Hn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function As(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,p.useSelect)(Rs,[]),r=Wr(o),l=Wr((0,a.first)(t)),i=Wr((0,a.last)(t));return(0,c.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;s.focus();const d=c.getSelection(),m=a.createRange(),p=Ps(l.current,"start"),f=Ps(i.current,"end");var g;g=s,Array.from(g.querySelectorAll(".rich-text")).forEach((e=>{e.removeAttribute("contenteditable")})),m.setStartBefore(p),m.setEndAfter(f),d.removeAllRanges(),d.addRange(m)}),[n,e,t,o])}function Ms(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ds(e,t,n,o){let r,l=wi.focus.focusable.find(n);return t&&(l=(0,a.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,a.find)(l,(function(e){if(!wi.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 Os(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,p.useSelect)(Hn),{multiSelect:u,selectBlock:d}=(0,p.useDispatch)(Hn);return(0,c.useRefEffect)((c=>{let m;function p(){m=null}function f(l){const i=e(),s=t(),a=n(),c=o(a||i),m=r(a||i),p=l?c:m;p&&(s===p?d(p):u(s||i,p))}function g(e){const t=l(),n=i(),o=e?t:n;o&&d(o)}function h(t){const{keyCode:l,target:i}=t,u=l===kl.UP,d=l===kl.DOWN,p=l===kl.LEFT,h=l===kl.RIGHT,b=u||p,v=p||h,k=u||d,_=v||k,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=k?wi.isVerticalEdge:wi.isHorizontalEdge,{ownerDocument:S}=c,{defaultView:w}=S;if(a())return void(_&&((y?f:g)(b),t.preventDefault()));if(k?m||(m=(0,wi.computeCaretRect)(w)):m=null,t.defaultPrevented)return;if(!_)return;if(!function(e,t,n){if((t===kl.UP||t===kl.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,wi.isRTL)(i)?!b:b,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(b&&l||!b&&s)&&function(e,t){const n=Ds(e,t,c);return!(n&&(o=e,r=n,o.closest(Yi)===r.closest(Yi)));var o,r}(i,b)&&C(i,b)&&(f(b),t.preventDefault())}else if(k&&(0,wi.isVerticalEdge)(i,b)&&!I){const e=Ds(i,b,c,!0);e&&((0,wi.placeCaretAtVerticalEdge)(e,b,m),t.preventDefault())}else if(v&&w.getSelection().isCollapsed&&(0,wi.isHorizontalEdge)(i,B)&&!I){const e=Ds(i,B,c);(0,wi.placeCaretAtHorizontalEdge)(e,b),t.preventDefault()}}return c.addEventListener("mousedown",p),c.addEventListener("keydown",h),()=>{c.removeEventListener("mousedown",p),c.removeEventListener("keydown",h)}}),[])}var Fs=window.wp.keyboardShortcuts;function Vs(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(Hn),{multiSelect:o}=(0,p.useDispatch)(Hn),r=(0,Fs.__unstableUseShortcutEventMatch)();return(0,c.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,wi.isEntirelySelected)(l.target))return;const i=t(),[s]=i,c=n(s);let u=e(c);i.length===u.length&&(u=e(n(c)));const d=(0,a.first)(u),m=(0,a.last)(u);d!==m&&(o(d,m),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function Hs(){const[e,t,n]=function(){const e=(0,l.useRef)(),t=(0,l.useRef)(),n=(0,l.useRef)(),o=(0,l.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:i}=(0,p.useSelect)(Hn),{setNavigationMode:s}=(0,p.useDispatch)(Hn),a=(0,p.useSelect)((e=>e(Hn).isNavigationMode()),[])?void 0:"0",u=(0,l.useRef)();function d(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(i())o.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";wi.focus.tabbable[n](t.target).focus()}}const m=(0,l.createElement)("div",{ref:t,tabIndex:a,onFocus:d}),f=(0,l.createElement)("div",{ref:n,tabIndex:a,onFocus:d}),g=(0,c.useRefEffect)((l=>{function a(e){if(e.defaultPrevented)return;if(e.keyCode===kl.ESCAPE&&!r())return e.preventDefault(),void s(!0);if(e.keyCode!==kl.TAB)return;const o=e.shiftKey,a=o?"findPrevious":"findNext";if(!r()&&!i())return void(e.target===l&&s(!0));if(Ms(e.target)&&Ms(wi.focus.tabbable[a](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function c(e){o.current=e.target}function d(o){var r;if(o.keyCode!==kl.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=wi.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=l,{defaultView:p}=m;return p.addEventListener("keydown",d),l.addEventListener("keydown",a),l.addEventListener("focusout",c),()=>{p.removeEventListener("keydown",d),l.removeEventListener("keydown",a),l.removeEventListener("focusout",c)}}),[]);return[m,(0,c.useMergeRefs)([e,g]),f]}(),o=(0,p.useSelect)((e=>e(Hn).hasMultiSelection()),[]);return[e,(0,c.useMergeRefs)([t,As(),Vs(),Os(),(0,c.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,g.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var zs=(0,l.forwardRef)((function({children:e,...t},n){const[o,i,a]=Hs();return(0,l.createElement)(l.Fragment,null,o,(0,l.createElement)("div",r({},t,{ref:(0,c.useMergeRefs)([i,n]),className:s()(t.className,"block-editor-writing-flow")}),e),a)}));const Us="editor-styles-wrapper";function Gs(e){return(0,l.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var Ws=(0,l.forwardRef)((function({contentRef:e,children:t,head:n,tabIndex:o=0,...i},a){const[,u]=(0,l.useReducer)((()=>({}))),[d,p]=(0,l.useState)(),[f,h]=(0,l.useState)([]),b=Gs(window.__editorAssets.styles),v=Gs(window.__editorAssets.scripts),k=Ns(),[_,y,E]=Hs(),C=(0,c.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=["keydown","keypress","dragover"];for(const t of r)e.addEventListener(t,o)}(t),p(t),k(r),h(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()}))}),[]),S=(0,c.useRefEffect)((e=>{v.reduce(((t,n)=>t.then((()=>async function(e,{id:t,src:n}){return new Promise(((o,r)=>{const l=e.ownerDocument.createElement("script");l.id=t,n?(l.src=n,l.onload=()=>o(),l.onerror=()=>r()):o(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{u()}))}),[]),w=(0,c.useMergeRefs)([e,k,y]);return(0,l.useEffect)((()=>{var e;d&&(e=d,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((({selectorText:e})=>e&&(e.includes(`.${Us}`)||e.includes(".wp-block"))))&&!e.getElementById(n.id)){console.error(`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))}})))}),[d]),n=(0,l.createElement)(l.Fragment,null,(0,l.createElement)("style",null,"body{margin:0}"),b.map((({tagName:e,href:t,id:n,rel:o,media:r,textContent:i})=>{const s=e.toLowerCase();return"style"===s?(0,l.createElement)(s,{id:n,key:n},i):(0,l.createElement)(s,{href:t,id:n,rel:o,media:r,key:n})})),n),(0,l.createElement)(l.Fragment,null,o>=0&&_,(0,l.createElement)("iframe",r({},i,{ref:(0,c.useMergeRefs)([a,C]),tabIndex:o,title:(0,g.__)("Editor canvas")}),d&&(0,l.createPortal)((0,l.createElement)(l.Fragment,null,(0,l.createElement)("head",{ref:S},n),(0,l.createElement)("body",{ref:w,className:s()(Us,...f)},(0,l.createElement)(m.__experimentalStyleProvider,{document:d},t))),d.documentElement)),o>=0&&E)})),Ks=n(3692),js=n.n(Ks);const $s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function qs(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),p(),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 m(/^{\s*/)}function u(){return m(/^}/)}function d(){let t;const n=[];for(p(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function m(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function p(){m(/^\s*/)}function f(e){let t;for(e=e||[];t=g();)!1!==t&&e.push(t);return e}function g(){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 h(){const e=m(/^([^{]+)/);if(e)return Ys(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 b(){const e=l();let t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Ys(t[0]),!m(/^:\s*/))return a("property missing ':'");const n=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace($s,""),value:n?Ys(n[0]).replace($s,""):""});return m(/^[;\s]*/),o}function v(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=b();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function k(){let e;const t=[],n=l();for(;e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=m(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=m(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=m(/^([-\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=m(/^@media *([^{]+)/);if(!t)return;const n=Ys(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=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Ys(t[1]),media:Ys(t[2])})}()||function(){const e=l(),t=m(/^@supports *([^{]+)/);if(!t)return;const n=Ys(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=m(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Ys(t[1]),o=Ys(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(!m(/^@page */))return;const t=h()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=b();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!m(/^@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(!m(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=b();)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=h();return t?(f(),e({type:"rule",selectors:t,declarations:v()})):a("selector missing")}return Xs(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Ys(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Xs(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){Xs(e,o)})):n&&"object"==typeof n&&Xs(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Qs=n(5717),Zs=n.n(Qs),Js=ea;function ea(e){this.options=e||{}}ea.prototype.emit=function(e){return e},ea.prototype.visit=function(e){return this[e.type](e)},ea.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 ta=na;function na(e){Js.call(this,e)}Zs()(na,Js),na.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},na.prototype.comment=function(e){return this.emit("",e.position)},na.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},na.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},na.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("}")},na.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},na.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},na.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},na.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},na.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},na.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("}")},na.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},na.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},na.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},na.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("}"):""},na.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var oa=ra;function ra(e){e=e||{},Js.call(this,e),this.indentation=e.indent}Zs()(ra,Js),ra.prototype.compile=function(e){return this.stylesheet(e)},ra.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},ra.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},ra.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},ra.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}")},ra.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}")},ra.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},ra.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},ra.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}")},ra.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)+"}")},ra.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")},ra.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}")},ra.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}")},ra.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}")},ra.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},ra.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()+"}"):""},ra.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},ra.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};function la(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 ia(e,t){return new URL(e,t).toString()}const sa=/^(body|html|:root).*$/;var aa=(e,t="")=>(0,a.map)(e,(({css:e,baseURL:n,__experimentalNoWrapper:o=!1})=>{const r=[];return t&&!o&&r.push(((e,t=[])=>n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(sa)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n)(t)),n&&r.push((l=n,e=>{if("declaration"===e.type){const r=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]};la(e)&&o.push(e)}return o}(e.value).map((o=l,e=>({...e,newUrl:"url("+e.before+e.quote+ia(e.value,o)+e.quote+e.after+")"})));return{...e,value:(t=e.value,n=r,n.forEach((e=>{t=t.replace(e.source,e.newUrl)})),t)}}var t,n,o;return e})),r.length?function(e,t){try{const r=qs(e);return n=js().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new ta(o):new oa(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o}(e,(0,c.compose)(r)):e;var l}));const ca=".editor-styles-wrapper";function ua(e){return(0,l.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(ca);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)}Fo()(l).getLuminance()>.5||0===Fo()(l).getAlpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function da({styles:e}){const t=(0,l.useMemo)((()=>aa(e,ca)),[e]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("style",{ref:ua(e)}),t.map(((e,t)=>(0,l.createElement)("style",{key:t},e))))}let ma;var pa=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:o}]=(0,c.useResizeObserver)(),[r,{height:i}]=(0,c.useResizeObserver)(),s=(0,p.useSelect)((e=>e(Hn).getSettings().styles));ma=ma||(0,c.pure)(Ju);const a=o/e;return(0,l.createElement)("div",{className:"block-editor-block-preview__container"},n,(0,l.createElement)(m.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${a})`,height:i*a}},(0,l.createElement)(Ws,{head:(0,l.createElement)(da,{styles:s}),contentRef:(0,c.useRefEffect)((e=>{const{ownerDocument:{documentElement:n}}=e;n.style.position="absolute",n.style.width="100%",e.style.padding=t+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none"}},r,(0,l.createElement)(ma,{renderAppender:!1}))))},fa=(0,l.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:o=!1,__experimentalOnClick:r}){const i=(0,p.useSelect)((e=>e(Hn).getSettings()),[]),s=(0,l.useMemo)((()=>{const e={...i};return e.__experimentalBlockPatterns=[],e}),[i]),c=(0,l.useMemo)((()=>(0,a.castArray)(e)),[e]);return e&&0!==e.length?(0,l.createElement)(xs,{value:c,settings:s},o?(0,l.createElement)(Ts,{onClick:r}):(0,l.createElement)(pa,{viewportWidth:n,__experimentalPadding:t})):null})),ga=function({item:e}){var t,n;const{name:o,title:r,icon:i,description:s,initialAttributes:a}=e,c=(0,d.getBlockType)(o),u=(0,d.isReusableBlock)(e);return(0,l.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,l.createElement)("div",{className:"block-editor-inserter__preview"},u||c.example?(0,l.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,l.createElement)(fa,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=c.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:c.example?(0,d.getBlockFromExample)(e.name,{attributes:{...c.example.attributes,...a},innerBlocks:c.example.innerBlocks}):(0,d.createBlock)(o,a)})):(0,l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,g.__)("No Preview Available."))),!u&&(0,l.createElement)(Bs,{title:r,icon:i,description:s}))},ha=(0,l.createContext)(),ba=(0,l.forwardRef)((function({isFirst:e,as:t,children:n,...o},i){const s=(0,l.useContext)(ha);return(0,l.createElement)(m.__unstableCompositeItem,r({ref:i,state:s,role:"option",focusable:!0},o),(o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,l.createElement)(t,r,n):"function"==typeof n?n(r):(0,l.createElement)(m.Button,r,n)}))})),va=(0,l.createElement)(O.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,l.createElement)(O.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function ka({count:e,icon:t}){return(0,l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,l.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,l.createElement)(m.FlexItem,null,t?(0,l.createElement)(ws,{icon:t}):(0,g.sprintf)(
12
  /* translators: %d: Number of blocks. */
13
- (0,g._n)("%d block","%d blocks",e),e)),(0,l.createElement)(m.FlexItem,null,(0,l.createElement)(ws,{icon:va})))))}var _a=({isEnabled:e,blocks:t,icon:n,children:o})=>{const r={type:"inserter",blocks:t};return(0,l.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:r,__experimentalDragComponent:(0,l.createElement)(ka,{count:t.length,icon:n})},(({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0})))};function ya(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var Ea=(0,l.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:i,isDraggable:a,...c}){const u=(0,l.useRef)(!1),m=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},p=(0,l.useMemo)((()=>[(0,d.createBlock)(n.name,n.initialAttributes,(0,d.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.initialAttributes]);return(0,l.createElement)(_a,{isEnabled:a&&!n.disabled,blocks:p,icon:n.icon},(({draggable:a,onDragStart:d,onDragEnd:p})=>(0,l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:e=>{u.current=!0,d&&(i(null),d(e))},onDragEnd:e=>{u.current=!1,p&&p(e)}},(0,l.createElement)(ba,r({isFirst:t,className:s()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,ya()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===kl.ENTER&&(e.preventDefault(),o(n,ya()?e.metaKey:e.ctrlKey),i(null))},onFocus:()=>{u.current||i(n)},onMouseEnter:()=>{u.current||i(n)},onMouseLeave:()=>i(null),onBlur:()=>i(null)},c),(0,l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,l.createElement)(ws,{icon:n.icon,showColors:!0})),(0,l.createElement)("span",{className:"block-editor-block-types-list__item-title"},n.title)))))})),Ca=(0,l.forwardRef)((function(e,t){const[n,o]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{n&&(0,xt.speak)((0,g.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,l.createElement)("div",r({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Sa=(0,l.forwardRef)((function(e,t){const n=(0,l.useContext)(ha);return(0,l.createElement)(m.__unstableCompositeGroup,r({state:n,role:"presentation",ref:t},e))})),wa=function({items:e=[],onSelect:t,onHover:n=(()=>{}),children:o,label:r,isDraggable:i=!0}){return(0,l.createElement)(Ca,{className:"block-editor-block-types-list","aria-label":r},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}(e).map(((e,o)=>(0,l.createElement)(Sa,{key:o},e.map(((e,r)=>(0,l.createElement)(Ea,{key:e.id,item:e,className:(0,d.getBlockMenuDefaultClassName)(e.id),onSelect:t,onHover:n,isDraggable:i,isFirst:0===o&&0===r})))))),o)},Ba=function({title:e,icon:t,children:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,l.createElement)("h2",{className:"block-editor-inserter__panel-title"},e),(0,l.createElement)(m.Icon,{icon:t})),(0,l.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},Ia=(e,t)=>{const{categories:n,collections:o,items:r}=(0,p.useSelect)((t=>{const{getInserterItems:n}=t(Hn),{getCategories:o,getCollections:r}=t(d.store);return{categories:o(),collections:r(),items:n(e)}}),[e]);return[r,n,o,(0,l.useCallback)((({name:e,initialAttributes:n,innerBlocks:o},r)=>{const l=(0,d.createBlock)(e,n,(0,d.createBlocksFromInnerBlocksTemplate)(o));t(l,void 0,r)}),[t])]},xa=function({children:e}){const t=(0,m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,l.createElement)(ha.Provider,{value:t},e)};const Ta=[];var Na=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,i,s,u]=Ia(e,t),d=(0,l.useMemo)((()=>(0,a.orderBy)(r,["frecency"],["desc"]).slice(0,6)),[r]),m=(0,l.useMemo)((()=>r.filter((e=>!e.category))),[r]),p=(0,l.useMemo)((()=>(0,a.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,a.groupBy)(e,"category")))(r)),[r]),f=(0,l.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=r.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[r,s]);(0,l.useEffect)((()=>()=>n(null)),[]);const h=(0,c.useAsyncList)(i),b=i.length===h.length,v=(0,l.useMemo)((()=>Object.entries(s)),[s]),k=(0,c.useAsyncList)(b?v:Ta);return(0,l.createElement)(xa,null,(0,l.createElement)("div",null,o&&!!d.length&&(0,l.createElement)(Ba,{title:(0,g._x)("Most used","blocks")},(0,l.createElement)(wa,{items:d,onSelect:u,onHover:n,label:(0,g._x)("Most used","blocks")})),(0,a.map)(h,(e=>{const t=p[e.slug];return t&&t.length?(0,l.createElement)(Ba,{key:e.slug,title:e.title,icon:e.icon},(0,l.createElement)(wa,{items:t,onSelect:u,onHover:n,label:e.title})):null})),b&&m.length>0&&(0,l.createElement)(Ba,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,g.__)("Uncategorized")},(0,l.createElement)(wa,{items:m,onSelect:u,onHover:n,label:(0,g.__)("Uncategorized")})),(0,a.map)(k,(([e,t])=>{const o=f[e];return o&&o.length?(0,l.createElement)(Ba,{key:e,title:t.title,icon:t.icon},(0,l.createElement)(wa,{items:o,onSelect:u,onHover:n,label:t.title})):null}))))},La=function({selectedCategory:e,patternCategories:t,onClickCategory:n,children:o}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:s()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},(0,l.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,g.__)("Filter patterns"),hideLabelFromVision:!0,value:e.name,onChange:e=>{n(t.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return t.map((t=>e.push({value:t.name,label:t.label}))),e})()})),(0,l.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},Pa=window.wp.notices,Ra=(e,t)=>{const{patternCategories:n,patterns:o}=(0,p.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Hn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:r}=(0,p.useDispatch)(Pa.store);return[o,n,(0,l.useCallback)(((t,n)=>{e((0,a.map)(n,(e=>(0,d.cloneBlock)(e))),t.name),r((0,g.sprintf)(
14
  /* translators: %s: block pattern title. */
15
- (0,g.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function Aa({isDraggable:e,pattern:t,onClick:n,composite:o}){const{name:i,viewportWidth:s}=t,{blocks:a}=(0,p.useSelect)((e=>e(Hn).__experimentalGetParsedPattern(i)),[i]),u=`block-editor-block-patterns-list__item-description-${(0,c.useInstanceId)(Aa)}`;return(0,l.createElement)(_a,{isEnabled:e,blocks:a},(({draggable:e,onDragStart:i,onDragEnd:c})=>(0,l.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":t.title,"aria-describedby":t.description?u:void 0,draggable:e,onDragStart:i,onDragEnd:c},(0,l.createElement)(m.__unstableCompositeItem,r({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>n(t,a)}),(0,l.createElement)(fa,{blocks:a,viewportWidth:s}),(0,l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&(0,l.createElement)(m.VisuallyHidden,{id:u},t.description)))))}function Ma(){return(0,l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Da=function({isDraggable:e,blockPatterns:t,shownPatterns:n,onClickPattern:o,orientation:i,label:s=(0,g.__)("Block Patterns")}){const a=(0,m.__unstableUseCompositeState)({orientation:i});return(0,l.createElement)(m.__unstableComposite,r({},a,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),t.map((t=>n.includes(t)?(0,l.createElement)(Aa,{key:t.name,pattern:t,onClick:o,isDraggable:e,composite:a}):(0,l.createElement)(Ma,{key:t.name}))))};function Oa({rootClientId:e,onInsert:t,selectedCategory:n,onClickCategory:o}){const[r,i,s]=Ra(t,e),u=(0,l.useMemo)((()=>i.filter((e=>r.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))))),[r,i]),d=n||u[0];(0,l.useEffect)((()=>{r.some((e=>m(e)===1/0))&&!u.find((e=>"uncategorized"===e.name))&&u.push({name:"uncategorized",label:(0,g._x)("Uncategorized")})}),[u,r]);const m=(0,l.useCallback)((e=>{if(!e.categories||!e.categories.length)return 1/0;const t=(0,a.fromPairs)(u.map((({name:e},t)=>[e,t])));return Math.min(...e.categories.map((e=>void 0!==t[e]?t[e]:1/0)))}),[u]),p=(0,l.useMemo)((()=>r.filter((e=>"uncategorized"===d.name?m(e)===1/0:e.categories&&e.categories.includes(d.name)))),[r,d]),f=(0,l.useMemo)((()=>p.sort(((e,t)=>m(e)-m(t)))),[p,m]),h=(0,c.useAsyncList)(f);return(0,l.createElement)(l.Fragment,null,!!p.length&&(0,l.createElement)(La,{selectedCategory:d,patternCategories:u,onClickCategory:o},(0,l.createElement)(Da,{shownPatterns:h,blockPatterns:p,onClickPattern:s,label:d.label,orientation:"vertical",isDraggable:!0})))}var Fa=function({rootClientId:e,onInsert:t,onClickCategory:n,selectedCategory:o}){return(0,l.createElement)(Oa,{rootClientId:e,selectedCategory:o,onInsert:t,onClickCategory:n})},Va=window.wp.url,Ha=function(){return(0,l.createElement)("div",{className:"block-editor-inserter__no-results"},(0,l.createElement)(ro,{className:"block-editor-inserter__no-results-icon",icon:Ss}),(0,l.createElement)("p",null,(0,g.__)("No results found.")))};function za({onHover:e,onInsert:t,rootClientId:n}){const[o,,,r]=Ia(n,t),i=(0,l.useMemo)((()=>o.filter((({category:e})=>"reusable"===e))),[o]);return 0===i.length?(0,l.createElement)(Ha,null):(0,l.createElement)(Ba,{title:(0,g.__)("Reusable blocks")},(0,l.createElement)(wa,{items:i,onSelect:r,onHover:e,label:(0,g.__)("Reusable blocks")}))}var Ua=function({rootClientId:e,onInsert:t,onHover:n}){return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(za,{onHover:n,onInsert:t,rootClientId:e}),(0,l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,Va.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,g.__)("Manage Reusable blocks"))))};const{Fill:Ga,Slot:Wa}=(0,m.createSlotFill)("__unstableInserterMenuExtension");Ga.Slot=Wa;var Ka=Ga,ja=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:i=!0}){const{getSelectedBlock:s}=(0,p.useSelect)(Hn),{destinationRootClientId:c,destinationIndex:u}=(0,p.useSelect)((r=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=r(Hn),c=l();let u,d=e;return void 0!==t?u=t:n?u=s(n,d):!o&&c?(d=i(c),u=s(c,d)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[e,t,n,o]),{replaceBlocks:m,insertBlocks:f,showInsertionPoint:h,hideInsertionPoint:b}=(0,p.useDispatch)(Hn),v=(0,l.useCallback)(((e,t,n=!1)=>{const l=s();!o&&l&&(0,d.isUnmodifiedDefaultBlock)(l)?m(l.clientId,e,null,i||n?0:null,t):f(e,u,c,!0,i||n?0:null,t);const p=(0,g.sprintf)(// translators: %d: the name of the block that has been added
16
- (0,g._n)("%d block added.","%d blocks added.",(0,a.castArray)(e).length),(0,a.castArray)(e).length);(0,xt.speak)(p),r&&r()}),[o,s,m,f,c,u,r,i]),k=(0,l.useCallback)((e=>{e?h(c,u):b()}),[h,b,c,u]);return[c,v,k]};const $a=e=>e.name||"",qa=e=>e.title,Ya=e=>e.description||"",Xa=e=>e.keywords||[],Qa=e=>e.category,Za=()=>null;function Ja(e=""){return(e=(e=(0,a.deburr)(e)).replace(/^\//,"")).toLowerCase()}const ec=(e="")=>(0,a.words)(Ja(e)),tc=(e,t,n,o)=>0===ec(o).length?e:nc(e,o,{getCategory:e=>{var n;return null===(n=(0,a.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}}),nc=(e=[],t="",n={})=>{if(0===ec(t).length)return e;const o=e.map((e=>[e,oc(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function oc(e,t,n={}){const{getName:o=$a,getTitle:r=qa,getDescription:l=Ya,getKeywords:i=Xa,getCategory:s=Qa,getCollection:c=Za}=n,u=o(e),d=r(e),m=l(e),p=i(e),f=s(e),g=c(e),h=Ja(t),b=Ja(d);let v=0;if(h===b)v+=30;else if(b.startsWith(h))v+=20;else{const e=[u,d,m,...p,f,g].join(" ");0===(k=(0,a.words)(h),_=e,(0,a.differenceWith)(k,ec(_),((e,t)=>t.includes(e)))).length&&(v+=10)}var k,_;return 0!==v&&u.startsWith("core/")&&v++,v}const rc=[];var lc=function({filterValue:e,onSelect:t,onHover:n,rootClientId:o,clientId:r,isAppender:i,__experimentalInsertionIndex:s,maxBlockPatterns:u,maxBlockTypes:d,showBlockDirectory:p=!1,isDraggable:f=!0,shouldFocusBlock:h=!0}){const b=(0,c.useDebounce)(xt.speak,500),[v,k]=ja({onSelect:t,rootClientId:o,clientId:r,isAppender:i,insertionIndex:s,shouldFocusBlock:h}),[_,y,E,C]=Ia(v,k),[S,,w]=Ra(k,v),B=(0,l.useMemo)((()=>{const t=tc((0,a.orderBy)(_,["frecency"],["desc"]),y,E,e);return void 0!==d?t.slice(0,d):t}),[e,_,y,E,d]),I=(0,l.useMemo)((()=>{const t=nc(S,e);return void 0!==u?t.slice(0,u):t}),[e,S,u]);(0,l.useEffect)((()=>{if(!e)return;const t=B.length+I.length,n=(0,g.sprintf)(
17
  /* translators: %d: number of results. */
18
- (0,g._n)("%d result found.","%d results found.",t),t);b(n)}),[e,b]);const x=(0,c.useAsyncList)(B,{step:9}),T=(0,c.useAsyncList)(x.length===B.length?I:rc),N=!(0,a.isEmpty)(B)||!(0,a.isEmpty)(I);return(0,l.createElement)(xa,null,!p&&!N&&(0,l.createElement)(Ha,null),!!B.length&&(0,l.createElement)(Ba,{title:(0,l.createElement)(m.VisuallyHidden,null,(0,g.__)("Blocks"))},(0,l.createElement)(wa,{items:x,onSelect:C,onHover:n,label:(0,g.__)("Blocks"),isDraggable:f})),!!B.length&&!!I.length&&(0,l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!I.length&&(0,l.createElement)(Ba,{title:(0,l.createElement)(m.VisuallyHidden,null,(0,g.__)("Block Patterns"))},(0,l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,l.createElement)(Da,{shownPatterns:T,blockPatterns:I,onClickPattern:w,isDraggable:f}))),p&&(0,l.createElement)(Ka.Slot,{fillProps:{onSelect:C,onHover:n,filterValue:e,hasItems:N,rootClientId:v}},(e=>e.length?e:N?null:(0,l.createElement)(Ha,null))))};const ic={name:"blocks",
19
  /* translators: Blocks tab title in the block inserter. */
20
- title:(0,g.__)("Blocks")},sc={name:"patterns",
21
  /* translators: Patterns tab title in the block inserter. */
22
- title:(0,g.__)("Patterns")},ac={name:"reusable",
23
  /* translators: Reusable blocks tab title in the block inserter. */
24
- title:(0,g.__)("Reusable")};var cc=function({children:e,showPatterns:t=!1,showReusableBlocks:n=!1,onSelect:o}){const r=(0,l.useMemo)((()=>{const e=[ic];return t&&e.push(sc),n&&e.push(ac),e}),[ic,t,sc,n,ac]);return(0,l.createElement)(m.TabPanel,{className:"block-editor-inserter__tabs",tabs:r,onSelect:o},e)},uc=function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:i,showMostUsedBlocks:s,shouldFocusBlock:a=!0}){const[c,u]=(0,l.useState)(""),[d,f]=(0,l.useState)(null),[h,b]=(0,l.useState)(null),[v,k,_]=ja({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:a}),{showPatterns:y,hasReusableBlocks:E}=(0,p.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Hn);return{showPatterns:!!n(v).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[v]),C=(0,l.useCallback)(((e,t,n)=>{k(e,t,n),r()}),[k,r]),S=(0,l.useCallback)(((e,t)=>{k(e,{patternName:t}),r()}),[k,r]),w=(0,l.useCallback)((e=>{_(!!e),f(e)}),[_,f]),B=(0,l.useCallback)((e=>{b(e)}),[b]),I=(0,l.useMemo)((()=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"block-editor-inserter__block-list"},(0,l.createElement)(Na,{rootClientId:v,onInsert:C,onHover:w,showMostUsedBlocks:s})),i&&(0,l.createElement)("div",{className:"block-editor-inserter__tips"},(0,l.createElement)(m.VisuallyHidden,{as:"h2"},(0,g.__)("A tip for using the block editor")),(0,l.createElement)(Cs,null)))),[v,C,w,c,s,i]),x=(0,l.useMemo)((()=>(0,l.createElement)(Fa,{rootClientId:v,onInsert:S,onClickCategory:B,selectedCategory:h})),[v,S,B,h]),T=(0,l.useMemo)((()=>(0,l.createElement)(Ua,{rootClientId:v,onInsert:C,onHover:w})),[v,C,w]),N=(0,l.useCallback)((e=>"blocks"===e.name?I:"patterns"===e.name?x:T),[I,x,T]);return(0,l.createElement)("div",{className:"block-editor-inserter__menu"},(0,l.createElement)("div",{className:"block-editor-inserter__main-area"},(0,l.createElement)("div",{className:"block-editor-inserter__content"},(0,l.createElement)(m.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{d&&f(null),u(e)},value:c,label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),!!c&&(0,l.createElement)(lc,{filterValue:c,onSelect:r,onHover:w,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:a}),!c&&(y||E)&&(0,l.createElement)(cc,{showPatterns:y,showReusableBlocks:E},N),!c&&!y&&!E&&I)),i&&d&&(0,l.createElement)(ga,{item:d}))};function dc({onSelect:e,rootClientId:t,clientId:n,isAppender:o}){const[r,i]=(0,l.useState)(""),[a,c]=ja({onSelect:e,rootClientId:t,clientId:n,isAppender:o}),[u]=Ia(a,c),[d]=Ra(c,a),f=d.length&&!!r,h=f&&d.length>6||u.length>6,{setInserterIsOpened:b,insertionIndex:v}=(0,p.useSelect)((e=>{const{getSettings:o,getBlockIndex:r,getBlockCount:l}=e(Hn),i=r(n,t);return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,insertionIndex:-1===i?l():i}}),[n,t]);return(0,l.useEffect)((()=>{b&&b(!1)}),[b]),(0,l.createElement)("div",{className:s()("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":b})},h&&(0,l.createElement)(m.SearchControl,{className:"block-editor-inserter__search",value:r,onChange:e=>{i(e)},label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),(0,l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,l.createElement)(lc,{filterValue:r,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:f?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,l.createElement)(m.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:t,insertionIndex:v})},"aria-label":(0,g.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,g.__)("Browse all")))}const mc=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:i,toggleProps:s={}})=>{let a;a=i?(0,g.sprintf)(// translators: %s: the name of the block when there is only one
25
- (0,g._x)("Add %s","directly add the only allowed block"),o):(0,g._x)("Add block","Generic label for block inserter button");const{onClick:c,...u}=s;return(0,l.createElement)(m.Button,r({icon:ys,label:a,tooltipPosition:"bottom",onClick:function(t){e&&e(t),c&&c(t)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&n,disabled:t},u))};class pc extends l.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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,toggleProps:l,hasItems:i,renderToggle:s=mc}=this.props;return s({onToggle:e,isOpen:t,disabled:n||!i,blockTitle:o,hasSingleBlockType:r,toggleProps:l})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:i}=this.props;return i?(0,l.createElement)(dc,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o}):(0,l.createElement)(uc,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,insertOnlyAllowedBlock:n,__experimentalIsQuick:o,onSelectOrClose:r}=this.props;return t?this.renderToggle({onToggle:n}):(0,l.createElement)(m.Dropdown,{className:"block-editor-inserter",contentClassName:s()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,g.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:r})}}var fc=(0,c.compose)([(0,p.withSelect)(((e,{clientId:t,rootClientId:n})=>{const{getBlockRootClientId:o,hasInserterItems:r,__experimentalGetAllowedBlocks:l}=e(Hn),{getBlockVariations:i}=e(d.store),s=l(n=n||o(t)||void 0),c=1===(0,a.size)(s)&&0===(0,a.size)(i(s[0].name,"inserter"));let u=!1;return c&&(u=s[0]),{hasItems:r(n),hasSingleBlockType:c,blockTitle:u?u.title:"",allowedBlockType:u,rootClientId:n}})),(0,p.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:l,hasSingleBlockType:i,allowedBlockType:s,onSelectOrClose:a}=t;if(!i)return;const{insertBlock:c}=e(Hn);c((0,d.createBlock)(s.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:i,getBlockRootClientId:s}=n(Hn);if(r)return e(r,o);const a=t();return!l&&a&&s(a)===o?e(a,o)+1:i(o).length}(),o),a&&a();const u=(0,g.sprintf)(// translators: %s: the name of the block that has been added
26
- (0,g.__)("%s block added"),s.title);(0,xt.speak)(u)}}))),(0,c.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(pc),gc=(0,c.compose)((0,p.withSelect)(((e,t)=>{const{getBlockCount:n,getBlockName:o,isBlockValid:r,getSettings:l,getTemplateLock:i}=e(Hn),s=!n(t.rootClientId),a=o(t.lastBlockClientId)===(0,d.getDefaultBlockName)(),c=r(t.lastBlockClientId),{bodyPlaceholder:u}=l();return{isVisible:s||!a||!c,showPrompt:s,isLocked:!!i(t.rootClientId),placeholder:u}})),(0,p.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Hn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function({isLocked:e,isVisible:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:i}){if(e||!t)return null;const a=(0,_s.decodeEntities)(r)||(0,g.__)("Type / to choose a block");return(0,l.createElement)("div",{"data-root-client-id":i||"",className:s()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,l.createElement)("p",{tabIndex:"0",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":(0,g.__)("Add block"),className:"wp-block block-editor-default-block-appender__content",onFocus:n},o?a:"\ufeff"),(0,l.createElement)(fc,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function hc({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return(0,l.createElement)(fc,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:i,isOpen:a,blockTitle:c,hasSingleBlockType:u})=>{let d;d=u?(0,g.sprintf)(// translators: %s: the name of the block when there is only one
27
- (0,g._x)("Add %s","directly add the only allowed block"),c):(0,g._x)("Add block","Generic label for block inserter button");const p=!u;let f=(0,l.createElement)(m.Button,{ref:r,onFocus:n,tabIndex:o,className:s()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":p?"true":void 0,"aria-expanded":p?a:void 0,disabled:i,label:d},!u&&(0,l.createElement)(m.VisuallyHidden,{as:"span"},d),(0,l.createElement)(ro,{icon:ys}));return(p||u)&&(f=(0,l.createElement)(m.Tooltip,{text:d},f)),f},isAppender:!0})}const bc=(0,l.forwardRef)(((e,t)=>(Lt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),hc(e,t))));var vc=(0,l.forwardRef)(hc),kc=(0,p.withSelect)(((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:o,getTemplateLock:r,getSelectedBlockClientId:l}=e(Hn);return{isLocked:!!r(t),blockClientIds:n(t),canInsertDefaultBlock:o((0,d.getDefaultBlockName)(),t),selectedBlockClientId:l()}}))((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:o,renderAppender:r,className:i,selectedBlockClientId:c,tagName:u="div"}){if(o||!1===r)return null;let d;if(r)d=(0,l.createElement)(r,null);else{const o=!t,r=c===t,i=c&&!e.includes(c);if(!o&&!r&&(!c||i))return null;d=n?(0,l.createElement)(gc,{rootClientId:t,lastBlockClientId:(0,a.last)(e)}):(0,l.createElement)(vc,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,l.createElement)(u,{tabIndex:-1,className:s()("block-list-appender wp-block",i)},d)}));function _c(e){return(0,c.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 yc=(0,l.createContext)();function Ec({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=(0,p.useDispatch)(Hn),o=(0,l.useContext)(yc),r=(0,l.useRef)(),{orientation:i,previousClientId:a,nextClientId:c,rootClientId:u,isInserterShown:d}=(0,p.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(Hn),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}}),[]),f=Kr(a),h=Kr(c),b=(0,l.useMemo)((()=>{if(!f&&!h)return{};const e=f?f.getBoundingClientRect():null,t=h?h.getBoundingClientRect():null;if("vertical"===i)return{width:f?f.offsetWidth:h.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,g.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f?f.offsetHeight:h.offsetHeight}}),[f,h]),v=(0,l.useCallback)((()=>{if(!f&&!h)return{};const{ownerDocument:e}=f||h,t=f?f.getBoundingClientRect():null,n=h?h.getBoundingClientRect():null;return"vertical"===i?(0,g.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,g.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}}),[f,h]),k=_c(t),_=s()("block-editor-block-list__insertion-point","is-"+i),y=f&&h&&d;return(0,l.createElement)(m.Popover,{ref:k,noArrow:!0,animate:!1,getAnchorRect:v,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},(0,l.createElement)("div",{ref:r,tabIndex:-1,onClick:function(e){e.target===r.current&&c&&n(c,-1)},onFocus:function(e){e.target!==r.current&&(o.current=!0)},className:s()(_,{"is-with-inserter":y}),style:b},(0,l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),y&&(0,l.createElement)("div",{className:s()("block-editor-block-list__insertion-point-inserter")},(0,l.createElement)(fc,{position:"bottom center",clientId:c,rootClientId:u,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function Cc({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const o=(0,p.useSelect)((e=>e(Hn).isBlockInsertionPointVisible()),[]);return(0,l.createElement)(yc.Provider,{value:(0,l.useRef)(!1)},o&&(0,l.createElement)(Ec,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function Sc(){const e=(0,l.useContext)(yc),t=(0,p.useSelect)((e=>e(Hn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:i,isMultiSelecting:s,getSelectedBlockClientIds:a,getTemplateLock:u}=(0,p.useSelect)(Hn),{showInsertionPoint:d,hideInsertionPoint:m}=(0,p.useDispatch)(Hn);return(0,c.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",l),()=>{o.removeEventListener("mousemove",l)};function l(t){var o,l;if(e.current)return;if(s())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&m());let c;if(t.target.classList.contains("is-root-container")||(c=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")),u(c))return;const p=(null===(o=n(c))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),g=t.clientY-f.top,h=t.clientX-f.left;let b=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>g||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>h));if(!b)return;if(!b.id&&(b=b.firstElementChild,!b))return;if(null===(l=b.parentElement)||void 0===l?void 0:l.closest(".block-editor-block-content-overlay.overlay-active"))return;const v=b.id.slice("block-".length);if(!v)return;if(a().includes(v))return;const k=b.getBoundingClientRect();if("horizontal"===p&&(t.clientY>k.bottom||t.clientY<k.top)||"vertical"===p&&(t.clientX>k.right||t.clientX<k.left))return void(i()&&m());const _=r(v,c);0!==_?d(c,_,{__unstableWithInserter:!0}):i()&&m()}}),[e,n,o,r,i,s,d,m,a])}const wc="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Bc="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Ic(e){return(0,p.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Hn),{getBlockType:r,getActiveBlockVariation:l}=t(d.store),i=n(e),s=r(i);if(!s)return null;const a=o(e),c=l(i,a),u={title:s.title,icon:s.icon,description:s.description,anchor:null==a?void 0:a.anchor};return c?{title:c.title||s.title,icon:c.icon||s.icon,description:c.description||s.description}:u}),[e])}function xc({clientId:e}){const{attributes:t,name:n,reusableBlockTitle:o}=(0,p.useSelect)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:r}=t(Hn),l=n(e);if(!l)return{};const i=(0,d.isReusableBlock)((0,d.getBlockType)(l));return{attributes:o(e),name:l,reusableBlockTitle:i&&r(o(e).ref)}}),[e]),r=Ic(e);if(!n||!r)return null;const l=(0,d.getBlockType)(n),i=o||(0,d.__experimentalGetBlockLabel)(l,t);return i!==l.title?(0,a.truncate)(i,{length:35}):r.title}var Tc=({children:e,clientIds:t,cloneClassname:n,onDragStart:o,onDragEnd:r})=>{const{srcRootClientId:i,isDraggable:s,icon:a}=(0,p.useSelect)((e=>{var n;const{getBlockRootClientId:o,getTemplateLock:r,getBlockName:l}=e(Hn),i=o(t[0]),s=i?r(i):null,a=l(t[0]);return{srcRootClientId:i,isDraggable:"all"!==s,icon:null===(n=(0,d.getBlockType)(a))||void 0===n?void 0:n.icon}}),[t]),c=(0,l.useRef)(!1),[u,f,g]=function(){const e=(0,l.useRef)(null),t=(0,l.useRef)(null),n=(0,l.useRef)(null),o=(0,l.useRef)(null);return(0,l.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,l.useCallback)((r=>{e.current=r.clientY,n.current=(0,wi.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,l.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:h,stopDraggingBlocks:b}=(0,p.useDispatch)(Hn);if((0,l.useEffect)((()=>()=>{c.current&&b()}),[]),!s)return e({isDraggable:!1});const v={type:"block",srcClientIds:t,srcRootClientId:i};return(0,l.createElement)(m.Draggable,{cloneClassname:n,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(t),c.current=!0,u(e),o&&o()},onDragOver:f,onDragEnd:()=>{b(),c.current=!1,g(),r&&r()},__experimentalDragComponent:(0,l.createElement)(ka,{count:t.length,icon:a})},(({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n})))},Nc=function({clientId:e,rootClientId:t,blockElement:n}){const o=Ic(e),i=(0,p.useSelect)((n=>{var o;const{__unstableGetBlockWithoutInnerBlocks:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=n(Hn),a=l(e,t),{name:c,attributes:u}=r(e);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(t))||void 0===o?void 0:o.orientation}}),[e,t]),{index:a,name:c,attributes:u,blockMovingMode:f,orientation:h}=i,{setNavigationMode:b,removeBlock:v}=(0,p.useDispatch)(Hn),k=(0,l.useRef)(),_=(0,d.getBlockType)(c),y=(0,d.__experimentalGetAccessibleBlockLabel)(_,u,a+1,h);(0,l.useEffect)((()=>{k.current.focus(),(0,xt.speak)(y)}),[y]);const{hasBlockMovingClientId:E,getBlockIndex:C,getBlockRootClientId:S,getClientIdsOfDescendants:w,getSelectedBlockClientId:B,getMultiSelectedBlocksEndClientId:I,getPreviousBlockClientId:x,getNextBlockClientId:T}=(0,p.useSelect)(Hn),{selectBlock:N,clearSelectedBlock:L,setBlockMovingClientId:P,moveBlockToPosition:R}=(0,p.useDispatch)(Hn),A=s()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!f}),M=(0,g.__)("Drag");return(0,l.createElement)("div",{className:A},(0,l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,l.createElement)(m.FlexItem,null,(0,l.createElement)(ws,{icon:null==o?void 0:o.icon,showColors:!0})),(0,l.createElement)(m.FlexItem,null,(0,l.createElement)(Tc,{clientIds:[e]},(e=>(0,l.createElement)(m.Button,r({icon:va,className:"block-selection-button_drag-handle","aria-hidden":"true",label:M,tabIndex:"-1"},e))))),(0,l.createElement)(m.FlexItem,null,(0,l.createElement)(m.Button,{ref:k,onClick:()=>b(!1),onKeyDown:function(t){const{keyCode:o}=t,r=o===kl.UP,l=o===kl.DOWN,i=o===kl.LEFT,s=o===kl.RIGHT,a=o===kl.TAB,c=o===kl.ESCAPE,u=o===kl.ENTER,d=o===kl.SPACE,m=t.shiftKey;if(o===kl.BACKSPACE||o===kl.DELETE)return v(e),void t.preventDefault();const p=B(),f=I(),g=x(f||p),h=T(f||p),b=a&&m||r,k=a&&!m||l,_=i,y=s;let A;if(b)A=g;else if(k)A=h;else if(_){var M;A=null!==(M=S(p))&&void 0!==M?M:p}else if(y){var D;A=null!==(D=w([p])[0])&&void 0!==D?D:p}const O=E();if(c&&O&&!t.defaultPrevented&&(P(null),t.preventDefault()),(u||d)&&O){const e=S(O),t=S(p),n=C(O,e);let o=C(p,t);n<o&&e===t&&(o-=1),R(O,e,t,o),N(O),P(null)}if(k||b||_||y)if(A)t.preventDefault(),N(A);else if(a&&p){let e;k?(e=wi.focus.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=wi.focus.tabbable.findNext(e))):e=wi.focus.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),L())}},label:y,className:"block-selection-button_select-button"},(0,l.createElement)(xc,{clientId:e})))))};function Lc(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var Pc=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,...i}){const s=(0,l.useRef)(),a=function(e){const[t,n]=(0,l.useState)(!0),o=(0,l.useCallback)((()=>{const t=!wi.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Lt()("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,l.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return function(e,t,n,o,r){const[i]=(0,l.useState)(t),[s]=(0,l.useState)(o),a=(0,l.useCallback)((()=>{!function(e){const[t]=wi.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,Fs.useShortcut)("core/block-editor/focus-toolbar",a,{bindGlobal:!0,eventName:"keydown"}),(0,l.useEffect)((()=>{i&&a()}),[n,i,a]),(0,l.useEffect)((()=>{let t=0;return s&&!i&&(t=window.requestAnimationFrame((()=>{const t=Lc(e.current),n=s||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=Lc(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[s,i])}(s,t,a,n,o),a?(0,l.createElement)(m.Toolbar,r({label:i["aria-label"],ref:s},i),e):(0,l.createElement)(m.NavigableMenu,r({orientation:"horizontal",role:"toolbar",ref:s},i),e)},Rc=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Ac=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Mc=(0,l.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(O.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Dc=(0,l.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(O.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Oc=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?Rc:Ac:Mc:"down"===e?"horizontal"===t?(0,g.isRTL)()?Ac:Rc:Dc:null,Fc=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move right"):(0,g.__)("Move left"):(0,g.__)("Move up"):"down"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move left"):(0,g.__)("Move right"):(0,g.__)("Move down"):null,Vc=(0,l.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},i)=>{const u=(0,c.useInstanceId)(Vc),f=(0,a.castArray)(e).length,{blockType:h,isDisabled:b,rootClientId:v,isFirst:k,isLast:_,firstIndex:y,orientation:E="vertical"}=(0,p.useSelect)((o=>{const{getBlockIndex:r,getBlockRootClientId:l,getBlockOrder:i,getBlock:s,getBlockListSettings:c}=o(Hn),u=(0,a.castArray)(e),m=(0,a.first)(u),p=l(m),f=r(m,p),g=r((0,a.last)(u),p),h=i(p),b=s(m),v=0===f,k=g===h.length-1,{orientation:_}=c(p)||{};return{blockType:b?(0,d.getBlockType)(b.name):null,isDisabled:"up"===t?v:k,rootClientId:p,firstIndex:f,isFirst:v,isLast:k,orientation:n||_}}),[e,t]),{moveBlocksDown:C,moveBlocksUp:S}=(0,p.useDispatch)(Hn),w="up"===t?S:C,B=`block-editor-block-mover-button__description-${u}`;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.Button,r({ref:i,className:s()("block-editor-block-mover-button",`is-${t}-button`),icon:Oc(t,E),label:Fc(t,E),"aria-describedby":B},o,{onClick:b?null:t=>{w(e,v),o.onClick&&o.onClick(t)},"aria-disabled":b})),(0,l.createElement)("span",{id:B,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,g.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,g.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,g.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,g.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
28
  (0,g._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,g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
29
  (0,g._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,g.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
30
  (0,g.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
@@ -39,41 +42,41 @@ title:(0,g.__)("Reusable")};var cc=function({children:e,showPatterns:t=!1,showRe
39
  (0,g.__)("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,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
40
  (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
41
  (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
42
- (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(f,h&&h.title,y,k,_,"up"===t?-1:1,E)))})),Hc=(0,l.forwardRef)(((e,t)=>(0,l.createElement)(Vc,r({direction:"up",ref:t},e)))),zc=(0,l.forwardRef)(((e,t)=>(0,l.createElement)(Vc,r({direction:"down",ref:t},e))));var Uc=(0,p.withSelect)(((e,{clientIds:t})=>{var n;const{getBlock:o,getBlockIndex:r,getBlockListSettings:l,getTemplateLock:i,getBlockOrder:s,getBlockRootClientId:c}=e(Hn),u=(0,a.castArray)(t),m=(0,a.first)(u),p=o(m),f=c((0,a.first)(u)),g=r(m,f),h=0===g,b=r((0,a.last)(u),f)===s(f).length-1;return{blockType:p?(0,d.getBlockType)(p.name):null,isLocked:"all"===i(f),rootClientId:f,firstIndex:g,isFirst:h,isLast:b,orientation:null===(n=l(f))||void 0===n?void 0:n.orientation}}))((function({isFirst:e,isLast:t,clientIds:n,isLocked:o,isHidden:i,rootClientId:a,orientation:c,hideDragHandle:u}){const[d,p]=(0,l.useState)(!1),f=()=>p(!0),h=()=>p(!1);if(o||e&&t&&!a)return null;const b=(0,g.__)("Drag");return(0,l.createElement)("div",{className:s()("block-editor-block-mover",{"is-visible":d||!i,"is-horizontal":"horizontal"===c})},!u&&(0,l.createElement)(Tc,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,l.createElement)(m.Button,r({icon:va,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,l.createElement)(m.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,l.createElement)(m.ToolbarItem,{onFocus:f,onBlur:h},(e=>(0,l.createElement)(Hc,r({clientIds:n},e)))),(0,l.createElement)(m.ToolbarItem,{onFocus:f,onBlur:h},(e=>(0,l.createElement)(zc,r({clientIds:n},e))))))}));const{clearTimeout:Gc,setTimeout:Wc}=window;function Kc({ref:e,isFocused:t,debounceTimeout:n=200,onChange:o=a.noop}){const[r,i]=(0,l.useState)(!1),s=(0,l.useRef)(),c=t=>{null!=e&&e.current&&i(t),o(t)},u=()=>{const e=s.current;e&&Gc&&Gc(e)};return(0,l.useEffect)((()=>()=>u()),[]),{showMovers:r,debouncedShowMovers:e=>{e&&e.stopPropagation(),u(),r||c(!0)},debouncedHideMovers:o=>{o&&o.stopPropagation(),u(),s.current=Wc((()=>{(()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n})()&&c(!1)}),n)}}}function jc({ref:e,debounceTimeout:t=200,onChange:n=a.noop}){const[o,r]=(0,l.useState)(!1),{showMovers:i,debouncedShowMovers:s,debouncedHideMovers:c}=Kc({ref:e,debounceTimeout:t,isFocused:o,onChange:n}),u=(0,l.useRef)(!1),d=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return(0,l.useEffect)((()=>{const t=e.current,n=()=>{d()&&(r(!0),s())},o=()=>{d()||(r(!1),c())};return t&&!u.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),u.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,u,r,s,c]),{showMovers:i,gestures:{onMouseMove:s,onMouseLeave:c}}}function $c(){const{selectBlock:e,toggleBlockHighlight:t}=(0,p.useDispatch)(Hn),{firstParentClientId:n,shouldHide:o,hasReducedUI:i}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:r}=e(Hn),{hasBlockSupport:l}=e(d.store),i=n(o()),s=i[i.length-1],a=t(s),c=(0,d.getBlockType)(a),u=r();return{firstParentClientId:s,shouldHide:!l(c,"__experimentalParentSelector",!0),hasReducedUI:u.hasReducedUI}}),[]),s=Ic(n),a=(0,l.useRef)(),{gestures:c}=jc({ref:a,onChange(e){e&&i||t(n,e)}});return o||void 0===n?null:(0,l.createElement)("div",r({className:"block-editor-block-parent-selector",key:n,ref:a},c),(0,l.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,g.sprintf)(
43
  /* translators: %s: Name of the block's parent. */
44
- (0,g.__)("Select %s"),s.title),showTooltip:!0,icon:(0,l.createElement)(ws,{icon:s.icon})}))}var qc=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 Yc({blocks:e}){return(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,l.createElement)(fa,{viewportWidth:500,blocks:e})))))}var Xc=({className:e,possibleBlockTransformations:t,onSelect:n,blocks:o})=>{const[r,i]=(0,l.useState)();return(0,l.createElement)(m.MenuGroup,{label:(0,g.__)("Transform to"),className:e},r&&(0,l.createElement)(Yc,{blocks:(0,d.switchToBlockType)(o,r)}),t.map((e=>{const{name:t,icon:o,title:r,isDisabled:s}=e;return(0,l.createElement)(m.MenuItem,{key:t,className:(0,d.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),n(t)},disabled:s,onMouseLeave:()=>i(null),onMouseEnter:()=>i(t)},(0,l.createElement)(ws,{icon:o,showColors:!0}),r)})))};const Qc={};function Zc({genericPreviewBlock:e,viewportWidth:t,style:n,isActive:o,onBlur:r,onHover:i,onSelect:a,styleClassName:c,itemRole:u}){const d=(0,l.useMemo)((()=>({...e,attributes:{...e.attributes,className:c}})),[e,c]);return(0,l.createElement)("div",{key:n.name,className:s()("block-editor-block-styles__item",{"is-active":o}),onClick:()=>a(),onKeyDown:e=>{kl.ENTER!==e.keyCode&&kl.SPACE!==e.keyCode||(e.preventDefault(),a())},onMouseEnter:i,onMouseLeave:r,role:u||"button",tabIndex:"0","aria-label":n.label||n.name},(0,l.createElement)("div",{className:"block-editor-block-styles__item-preview"},(0,l.createElement)(fa,{viewportWidth:t,blocks:d})),(0,l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var Jc=function({clientId:e,onSwitch:t=a.noop,onHoverClassName:n=a.noop,itemRole:o}){const{styles:r,block:i,type:s,className:c}=(0,p.useSelect)((t=>{const{getBlock:n}=t(Hn),o=n(e);if(!o)return Qc;const r=(0,d.getBlockType)(o.name),{getBlockStyles:l}=t(d.store);return{block:o,type:r,styles:l(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:u}=(0,p.useDispatch)(Hn),m=function(e,t){return(0,l.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,d.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,d.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(i,s);if(!r||0===r.length)return null;const f=(0,a.find)(r,"isDefault")?r:[{name:"default",label:(0,g._x)("Default","block style"),isDefault:!0},...r],h=function(e,t){for(const n of new(Fl())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=(0,a.find)(e,{name:t});if(o)return o}return(0,a.find)(e,"isDefault")}(f,c);return(0,l.createElement)("div",{className:"block-editor-block-styles"},f.map((r=>{var i,a;const d=function(e,t,n){const o=new(Fl())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}(c,h,r);return(0,l.createElement)(Zc,{genericPreviewBlock:m,viewportWidth:null!==(i=null===(a=s.example)||void 0===a?void 0:a.viewportWidth)&&void 0!==i?i:500,className:c,isActive:h===r,key:r.name,onSelect:()=>{u(e,{className:d}),n(null),t()},onBlur:()=>n(null),onHover:()=>n(d),style:r,styleClassName:d,itemRole:o})})))};function eu({hoveredBlock:e,onSwitch:t}){const{name:n,clientId:o}=e,[r,i]=(0,l.useState)(),s=(0,p.useSelect)((e=>e(d.store).getBlockType(n)),[n]);return(0,l.createElement)(m.MenuGroup,{label:(0,g.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},r&&(0,l.createElement)(Yc,{blocks:s.example?(0,d.getBlockFromExample)(s.name,{attributes:{...s.example.attributes,className:r},innerBlocks:s.example.innerBlocks}):(0,d.cloneBlock)(e,{className:r})}),(0,l.createElement)(Jc,{clientId:o,onSwitch:t,onHoverClassName:i,itemRole:"menuitem"}))}const tu=(e,t,n=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=tu(e,t,n);if(o)return o}}},nu=(e,t)=>{const n=((e,t)=>{const n=(0,d.__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 ou({patterns:e,onSelect:t}){return(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,l.createElement)(ru,{patterns:e,onSelect:t})))))}function ru({patterns:e,onSelect:t}){const n=(0,m.__unstableUseCompositeState)();return(0,l.createElement)(m.__unstableComposite,r({},n,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,g.__)("Patterns list")}),e.map((e=>(0,l.createElement)(lu,{key:e.name,pattern:e,onSelect:t,composite:n}))))}function lu({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",i=(0,c.useInstanceId)(lu,`${o}-list__item-description`);return(0,l.createElement)("div",{className:`${o}-list__list-item`,"aria-label":e.title,"aria-describedby":e.description?i:void 0},(0,l.createElement)(m.__unstableCompositeItem,r({role:"option",as:"div"},n,{className:`${o}-list__item`,onClick:()=>t(e.transformedBlocks)}),(0,l.createElement)(fa,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,l.createElement)("div",{className:`${o}-list__item-title`},e.title)),!!e.description&&(0,l.createElement)(m.VisuallyHidden,{id:i},e.description))}var iu=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,l.useState)(!1),i=((e,t)=>(0,l.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,d.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=tu(r,t.name,o);if(n){e=!0,o.add(n.clientId),nu(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]))(t,e);return i.length?(0,l.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,l.createElement)(ou,{patterns:i,onSelect:n}),(0,l.createElement)(m.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Rc},(0,g.__)("Patterns"))):null};const su=({clientIds:e,blocks:t})=>{const{replaceBlocks:n}=(0,p.useDispatch)(Hn),o=Ic(t[0].clientId),{possibleBlockTransformations:r,hasBlockStyles:i,icon:s,blockTitle:c,patterns:u}=(0,p.useSelect)((n=>{const{getBlockRootClientId:r,getBlockTransformItems:l,__experimentalGetPatternTransformItems:i}=n(Hn),{getBlockStyles:s,getBlockType:c}=n(d.store),u=r((0,a.castArray)(e)[0]),[{name:m}]=t,p=1===t.length,f=p&&s(m);let g;var h;p?g=null==o?void 0:o.icon:g=1===(0,a.uniq)(t.map((({name:e})=>e))).length?null===(h=c(m))||void 0===h?void 0:h.icon:qc;return{possibleBlockTransformations:l(t,u),hasBlockStyles:!(null==f||!f.length),icon:g,blockTitle:c(m).title,patterns:i(t,u)}}),[e,t,null==o?void 0:o.icon]),f=1===t.length&&(0,d.isReusableBlock)(t[0]),h=1===t.length&&(0,d.isTemplatePart)(t[0]),b=!!r.length,v=!(null==u||!u.length);if(!i&&!b)return(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:c,icon:(0,l.createElement)(ws,{icon:s,showColors:!0})}));const k=c,_=1===t.length?(0,g.sprintf)(
45
  /* translators: %s: block title. */
46
  (0,g.__)("%s: Change block type or style"),c):(0,g.sprintf)(
47
  /* translators: %d: number of blocks. */
48
- (0,g._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),y=i||b||v;return(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(m.ToolbarItem,null,(o=>(0,l.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:k,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ws,{icon:s,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||h)&&(0,l.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,l.createElement)(xc,{clientId:e}))),toggleProps:{describedBy:_,...o},menuProps:{orientation:"both"}},(({onClose:o})=>y&&(0,l.createElement)("div",{className:"block-editor-block-switcher__container"},v&&(0,l.createElement)(iu,{blocks:t,patterns:u,onSelect:t=>{(t=>{n(e,t)})(t),o()}}),b&&(0,l.createElement)(Xc,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:r,blocks:t,onSelect:r=>{(o=>{n(e,(0,d.switchToBlockType)(t,o))})(r),o()}}),i&&(0,l.createElement)(eu,{hoveredBlock:t[0],onSwitch:o})))))))};var au=({clientIds:e})=>{const t=(0,p.useSelect)((t=>t(Hn).getBlocksByClientId(e)),[e]);return!t.length||t.some((e=>!e))?null:(0,l.createElement)(su,{clientIds:e,blocks:t})},cu=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),uu=window.wp.blob;function du(){const{getBlockName:e}=(0,p.useSelect)(Hn),{getBlockType:t}=(0,p.useSelect)(d.store),{createSuccessNotice:n}=(0,p.useDispatch)(Pa.store);return(0,l.useCallback)(((o,r)=>{let l="";if(1===r.length){const n=r[0],{title:i}=t(e(n));l="copy"===o?(0,g.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
49
  (0,g.__)('Copied "%s" to clipboard.'),i):(0,g.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
50
  (0,g.__)('Moved "%s" to clipboard.'),i)}else l="copy"===o?(0,g.sprintf)(// Translators: %d: Number of blocks being copied.
51
  (0,g._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,g.sprintf)(// Translators: %d: Number of blocks being cut.
52
- (0,g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function mu(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,p.useSelect)(Hn),{flashBlock:r,removeBlocks:l,replaceBlocks:i}=(0,p.useDispatch)(Hn),s=du();return(0,c.useRefEffect)((a=>{function c(c){const u=t();if(0!==u.length){if(!n()){const{target:e}=c,{ownerDocument:t}=e;if("copy"===c.type||"cut"===c.type?(0,wi.documentHasUncollapsedSelection)(t):(0,wi.documentHasSelection)(t))return}if(a.contains(c.target.ownerDocument.activeElement)){if(c.preventDefault(),"copy"===c.type||"cut"===c.type){1===u.length&&r(u[0]),s(c.type,u);const t=e(u),n=(0,d.serialize)(t);c.clipboardData.setData("text/plain",n),c.clipboardData.setData("text/html",n)}if("cut"===c.type)l(u);else if("paste"===c.type){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}const o=(0,wi.getFilesFromDataTransfer)(e).filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e)));return o.length&&!n&&(n=o.map((e=>`<img src="${(0,uu.createBlobURL)(e)}">`)).join(""),t=""),{html:n,plainText:t}}(c),r=(0,d.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});i(u,r,r.length-1,-1)}}}}return a.ownerDocument.addEventListener("copy",c),a.ownerDocument.addEventListener("cut",c),a.ownerDocument.addEventListener("paste",c),()=>{a.ownerDocument.removeEventListener("copy",c),a.ownerDocument.removeEventListener("cut",c),a.ownerDocument.removeEventListener("paste",c)}}),[])}var pu=function({children:e}){return(0,l.createElement)("div",{ref:mu()},e)};function fu({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:l,getTemplateLock:i}=(0,p.useSelect)((e=>e(Hn)),[]),{getDefaultBlockName:s,getGroupingBlockName:c}=(0,p.useSelect)((e=>e(d.store)),[]),u=l(e),m=r(e[0]),f=(0,a.every)(u,(e=>!!e&&(0,d.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,m))),g=o(s(),m),{removeBlocks:h,replaceBlocks:b,duplicateBlocks:v,insertAfterBlock:k,insertBeforeBlock:_,flashBlock:y,setBlockMovingClientId:E,setNavigationMode:C,selectBlock:S}=(0,p.useDispatch)(Hn),w=du();return t({canDuplicate:f,canInsertDefaultBlock:g,isLocked:!!i(m),rootClientId:m,blocks:u,onDuplicate:()=>v(e,n),onRemove:()=>h(e,n),onInsertBefore(){_((0,a.first)((0,a.castArray)(e)))},onInsertAfter(){k((0,a.last)((0,a.castArray)(e)))},onMoveTo(){C(!0),S(e[0]),E(e[0])},onGroup(){if(!u.length)return;const t=c(),n=(0,d.switchToBlockType)(u,t);n&&b(e,n)},onUngroup(){if(!u.length)return;const t=u[0].innerBlocks;t.length&&b(e,t)},onCopy(){const e=u.map((({clientId:e})=>e));1===u.length&&y(e[0]),w("copy",e)}})}var gu=(0,c.compose)([(0,p.withSelect)(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:r}=e(Hn),l=n(t),i=r().codeEditingEnabled;return{mode:o(t),blockType:l?(0,d.getBlockType)(l.name):null,isCodeEditingEnabled:i}})),(0,p.withDispatch)(((e,{onToggle:t=a.noop,clientId:n})=>({onToggleMode(){e(Hn).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:r=!0}){if(!(0,d.hasBlockSupport)(e,"html",!0)||!r)return null;const i="visual"===t?(0,g.__)("Edit as HTML"):(0,g.__)("Edit visually");return(0,l.createElement)(m.MenuItem,{onClick:n},!o&&i)})),hu=(0,c.compose)((0,p.withSelect)(((e,{clientId:t})=>{const n=e(Hn).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}})),(0,p.withDispatch)(((e,{block:t})=>({onClick:()=>e(Hn).replaceBlocks(t.clientId,(0,d.rawHandler)({HTML:(0,d.getBlockContent)(t)}))}))))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const o=(0,g.__)("Convert to Blocks");return(0,l.createElement)(m.MenuItem,{onClick:t},!n&&o)}));const{Fill:bu,Slot:vu}=(0,m.createSlotFill)("__unstableBlockSettingsMenuFirstItem");bu.Slot=vu;var ku=bu;function _u({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r,onClose:i=(()=>{})}){const{replaceBlocks:s}=(0,p.useDispatch)(Hn);return t||n?(0,l.createElement)(l.Fragment,null,t&&(0,l.createElement)(m.MenuItem,{onClick:()=>{(()=>{const t=(0,d.switchToBlockType)(o,r);t&&s(e,t)})(),i()}},(0,g._x)("Group","verb")),n&&(0,l.createElement)(m.MenuItem,{onClick:()=>{(()=>{const t=o[0].innerBlocks;t.length&&s(e,t)})(),i()}},(0,g._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:yu,Slot:Eu}=(0,m.createSlotFill)("BlockSettingsMenuControls");function Cu({...e}){return(0,l.createElement)(m.__experimentalStyleProvider,{document:document},(0,l.createElement)(yu,e))}Cu.Slot=({fillProps:e,clientIds:t=null})=>{const n=(0,p.useSelect)((e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o}=e(Hn),r=null!==t?t:o();return(0,a.map)((0,a.compact)(n(r)),(e=>e.name))}),[t]),o=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}=(0,p.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:r,getSelectedBlockClientIds:l}=e(Hn),{getGroupingBlockName:i}=e(d.store),s=l(),a=i(),c=r(a,null!=s&&s.length?n(s[0]):void 0),u=o(s),m=1===u.length&&(null===(t=u[0])||void 0===t?void 0:t.name)===a;return{clientIds:s,isGroupable:c&&u.length&&!m,isUngroupable:m&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:a}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:r}}(),{isGroupable:i,isUngroupable:s}=o,c=i||s;return(0,l.createElement)(Eu,{fillProps:{...e,selectedBlocks:n}},(t=>{if((null==t?void 0:t.length)>0||c)return(0,l.createElement)(m.MenuGroup,null,t,(0,l.createElement)(_u,r({},o,{onClose:null==e?void 0:e.onClose})))}))};var Su=Cu;const wu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Bu({blocks:e,onCopy:t}){const n=(0,c.useCopyToClipboard)((()=>(0,d.serialize)(e)),t);return(0,l.createElement)(m.MenuItem,{ref:n},(0,g.__)("Copy"))}var Iu=function({clientIds:e,__experimentalSelectBlock:t,children:n,...o}){const i=(0,a.castArray)(e),s=i.length,c=i[0],u=(0,p.useSelect)((e=>1===e(Hn).getBlockCount()),[]),d=(0,p.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Fs.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")}}),[]),f=(0,l.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:a.noop,[t]),h=1===s?(0,g.__)("Remove block"):(0,g.__)("Remove blocks");return(0,l.createElement)(fu,{clientIds:e,__experimentalUpdateSelection:!t},(({canDuplicate:t,canInsertDefaultBlock:i,isLocked:p,onDuplicate:b,onInsertAfter:v,onInsertBefore:k,onRemove:_,onCopy:y,onMoveTo:E,blocks:C})=>(0,l.createElement)(m.DropdownMenu,r({icon:cu,label:(0,g.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:wu,noIcons:!0},o),(({onClose:o})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.MenuGroup,null,(0,l.createElement)(ku.Slot,{fillProps:{onClose:o}}),1===s&&(0,l.createElement)(hu,{clientId:c}),(0,l.createElement)(Bu,{blocks:C,onCopy:y}),t&&(0,l.createElement)(m.MenuItem,{onClick:(0,a.flow)(o,b,f),shortcut:d.duplicate},(0,g.__)("Duplicate")),i&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.MenuItem,{onClick:(0,a.flow)(o,k),shortcut:d.insertBefore},(0,g.__)("Insert before")),(0,l.createElement)(m.MenuItem,{onClick:(0,a.flow)(o,v),shortcut:d.insertAfter},(0,g.__)("Insert after"))),!p&&!u&&(0,l.createElement)(m.MenuItem,{onClick:(0,a.flow)(o,E)},(0,g.__)("Move to")),1===s&&(0,l.createElement)(gu,{clientId:c,onToggle:o})),(0,l.createElement)(Su.Slot,{fillProps:{onClose:o},clientIds:e}),"function"==typeof n?n({onClose:o}):l.Children.map((e=>(0,l.cloneElement)(e,{onClose:o}))),(0,l.createElement)(m.MenuGroup,null,!p&&(0,l.createElement)(m.MenuItem,{onClick:(0,a.flow)(o,_,f),shortcut:d.remove},h)))))))},xu=function({clientIds:e,...t}){return(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(m.ToolbarItem,null,(n=>(0,l.createElement)(Iu,r({clientIds:e,toggleProps:n},t)))))};function Tu({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:o,hasFixedToolbar:i,hasReducedUI:a,isValid:u,isVisual:f}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:r,getBlockRootClientId:l,getSettings:i}=e(Hn),s=o(),a=s[0],c=l(a),u=i();return{blockClientIds:s,blockClientId:a,blockType:a&&(0,d.getBlockType)(t(a)),hasFixedToolbar:u.hasFixedToolbar,hasReducedUI:u.hasReducedUI,rootClientId:c,isValid:s.every((e=>r(e))),isVisual:s.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,p.useDispatch)(Hn),h=(0,l.useRef)(),{showMovers:b,gestures:v}=jc({ref:h,onChange(e){e&&a||g(n,e)}}),k=(0,c.useViewportMatch)("medium","<")||i;if(o&&!(0,d.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const _=k||b;if(0===t.length)return null;const y=u&&f,E=t.length>1,C=s()("block-editor-block-toolbar",_&&"is-showing-movers");return(0,l.createElement)("div",{className:C},!E&&!k&&(0,l.createElement)($c,{clientIds:t}),(0,l.createElement)("div",r({ref:h},v),(y||E)&&(0,l.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,l.createElement)(au,{clientIds:t}),(0,l.createElement)(Uc,{clientIds:t,hideDragHandle:e||a}))),y&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(Xn.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,l.createElement)(Xn.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,l.createElement)(Xn.Slot,{className:"block-editor-block-toolbar__slot"}),(0,l.createElement)(Xn.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,l.createElement)(Xn.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),(0,l.createElement)(xu,{clientIds:t}))}var Nu=function({focusOnMount:e,isFixed:t,...n}){const{blockType:o,hasParents:i,showParentSelector:a}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Hn),{getBlockType:r}=e(d.store),l=o(),i=l[0],s=n(i),a=r(t(s[s.length-1]));return{blockType:i&&r(t(i)),hasParents:s.length,showParentSelector:(0,d.hasBlockSupport)(a,"__experimentalParentSelector",!0)&&l.length<=1}}),[]);if(o&&!(0,d.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const c=s()("block-editor-block-contextual-toolbar",{"has-parent":i&&a,"is-fixed":t});return(0,l.createElement)(Pc,r({focusOnMount:e,className:c
53
- /* translators: accessibility text for the block toolbar */,"aria-label":(0,g.__)("Block tools")},n),(0,l.createElement)(Tu,{hideDragHandle:t}))};function Lu(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(Hn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function Pu({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:i,__unstableContentRef:a}){const{isNavigationMode:u,isMultiSelecting:d,isTyping:f,isCaretWithinFormattedText:g,hasMultiSelection:h,hasFixedToolbar:b,lastClientId:v}=(0,p.useSelect)(Lu,[]),k=(0,p.useSelect)((t=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=t(Hn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===e}),[e]),_=(0,c.useViewportMatch)("medium"),[y,E]=(0,l.useState)(!1),[C,S]=(0,l.useState)(!1),{stopTyping:w}=(0,p.useDispatch)(Hn),B=!f&&!u&&o&&n,I=u,x=!u&&!b&&_&&!B&&!d&&(!f||g),T=!(u||x||b||o);(0,Fs.useShortcut)("core/block-editor/focus-toolbar",(0,l.useCallback)((()=>{E(!0),w(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!T}),(0,l.useEffect)((()=>{x||E(!1)}),[x]);const N=(0,l.useRef)(),L=Kr(e),P=Kr(v),R=Kr(r),A=_c(a);if(!(I||x||y||B))return null;let M=L;if(!M)return null;r&&(M=R);let D=M;if(h){if(!P)return null;D={top:M,bottom:P}}const O=B?"top left right":"top right left",{ownerDocument:F}=M,V=B?void 0:F.defaultView.frameElement||(0,wi.getScrollContainer)(M)||F.body;return(0,l.createElement)(m.Popover,{ref:A,noArrow:!0,animate:!1,position:O,focusOnMount:!1,anchorRef:D,className:s()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:M,shouldAnchorIncludePadding:!0},(x||y)&&(0,l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:s()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},(0,l.createElement)(fc,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(x||y)&&(0,l.createElement)(Nu,{focusOnMount:y,__experimentalInitialIndex:N.current,__experimentalOnIndexChange:e=>{N.current=e},key:e}),I&&(0,l.createElement)(Nc,{clientId:e,rootClientId:t,blockElement:M}),B&&(0,l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,l.createElement)(fc,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function Ru(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,__unstableGetBlockWithoutInnerBlocks:r,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:i}=e(Hn),s=t()||n();if(!s)return;const{name:c,attributes:u={},isValid:m}=r(s)||{},p=l(s),f=i(p),g=(0,a.find)(p,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:o(s),name:c,isValid:m,isEmptyDefaultBlock:c&&(0,d.isUnmodifiedDefaultBlock)({name:c,attributes:u}),capturingClientId:g}}function Au({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=(0,p.useSelect)(Ru,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:i,isValid:s,isEmptyDefaultBlock:a,capturingClientId:c}=n;return i?(0,l.createElement)(Pu,{clientId:o,rootClientId:r,isValid:s,isEmptyDefaultBlock:a,capturingClientId:c,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function Mu({children:e}){const t=(0,l.useContext)(yc),n=(0,l.useContext)(m.Disabled.Context);return t||n?e:(Lt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,l.createElement)(Cc,{__unstablePopoverSlot:"block-toolbar"},(0,l.createElement)(Au,{__unstablePopoverSlot:"block-toolbar"}),e))}var Du=(0,c.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Wn();return(0,l.createElement)(e,r({},t,{clientId:n}))}),"withClientId"),Ou=Du((({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o})=>(0,l.createElement)(vc,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o}))),Fu=(0,c.compose)([Du,(0,p.withSelect)(((e,{clientId:t})=>{const{getBlockOrder:n}=e(Hn),o=n(t);return{lastBlockClientId:(0,a.last)(o)}}))])((({clientId:e,lastBlockClientId:t})=>(0,l.createElement)(gc,{rootClientId:e,lastBlockClientId:t}))),Vu=window.wp.isShallowEqual,Hu=n.n(Vu);const zu=new WeakMap;function Uu(e,t){const n=(0,p.useSelect)((e=>e(Hn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:r,getClientIdsOfDescendants:l}=(0,p.useSelect)(Hn),{insertBlocks:i,moveBlocksToPosition:s,updateBlockAttributes:a,clearSelectedBlock:c}=(0,p.useDispatch)(Hn),u=function(e,t,n,o,r,l,i){return s=>{const{srcRootClientId:a,srcClientIds:c,type:u,blocks:d}=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}(s);if("inserter"===u&&(i(),l(d,t,e,!0,null)),"block"===u){const l=n(c[0],a);if(a===e&&l===t)return;if(c.includes(e)||o(c).some((t=>t===e)))return;const i=a===e,s=c.length;r(c,a,e,i&&l<t?t-s:t)}}}(e,t,r,l,s,i,c),m=function(e,t,n,o,r,l){return i=>{if(!n)return;const s=(0,d.findTransform)((0,d.getBlockTransforms)("from"),(t=>"files"===t.type&&r(t.blockName,e)&&t.isMatch(i)));if(s){const n=s.transform(i,o);l(n,t,e)}}}(e,t,n,a,o,i),f=function(e,t,n){return o=>{const r=(0,d.pasteHandler)({HTML:o,mode:"BLOCKS"});r.length&&n(r,t,e)}}(e,t,i);return e=>{const t=(0,wi.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?m(t):n?f(n):u(e)}}function Gu(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const l=function(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)}(e,t,n);(void 0===o||l<o)&&(o=l,r=n)})),[o,r]}function Wu({rootClientId:e=""}={}){const[t,n]=(0,l.useState)(null),o=(0,p.useSelect)((t=>{const{getTemplateLock:n}=t(Hn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,p.useSelect)(Hn),{showInsertionPoint:i,hideInsertionPoint:s}=(0,p.useDispatch)(Hn),a=Uu(e,t),u=(0,c.useThrottle)((0,l.useCallback)(((t,o)=>{var l;const s=function(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,g.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=Gu(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(l=r(e))||void 0===l?void 0:l.orientation);n(void 0===s?0:s),null!==s&&i(e,s)}),[]),200);return(0,c.__experimentalUseDropZone)({isDisabled:o,onDrop:a,onDragOver(e){u(e,e.currentTarget)},onDragLeave(){u.cancel(),s(),n(null)},onDragEnd(){u.cancel(),s(),n(null)}})}function Ku(e){const{clientId:t,allowedBlocks:n,template:o,templateLock:r,wrapperRef:i,templateInsertUpdatesSelection:s,__experimentalCaptureToolbars:c,__experimentalAppenderTagName:u,renderAppender:m,orientation:f,placeholder:g,__experimentalLayout:h}=e;!function(e,t,n,o,r,i){const{updateBlockListSettings:s}=(0,p.useDispatch)(Hn),{blockListSettings:a,parentLock:c}=(0,p.useSelect)((t=>{const n=t(Hn).getBlockRootClientId(e);return{blockListSettings:t(Hn).getBlockListSettings(e),parentLock:t(Hn).getTemplateLock(n)}}),[e]),u=(0,l.useMemo)((()=>t),t);(0,l.useLayoutEffect)((()=>{const t={allowedBlocks:u,templateLock:void 0===n?c:n};if(void 0!==o&&(t.__experimentalCaptureToolbars=o),void 0!==r)t.orientation=r;else{const e=co(null==i?void 0:i.type);t.orientation=e.getOrientation(i)}Hu()(a,t)||s(e,t)}),[e,a,u,n,c,o,r,s,i])}(t,n,r,c,f,h),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:r}=(0,p.useSelect)(Hn),{replaceInnerBlocks:i}=(0,p.useDispatch)(Hn),s=(0,p.useSelect)((t=>t(Hn).getBlocks(e)),[e]),c=(0,l.useRef)(null);(0,l.useLayoutEffect)((()=>{if((0===s.length||"all"===n)&&!(0,a.isEqual)(t,c.current)){c.current=t;const n=(0,d.synchronizeBlocksWithTemplate)(s,t);(0,a.isEqual)(n,s)||i(e,n,0===s.length&&o&&0!==n.length,r())}}),[s,t,n,e])}(t,o,r,s);const b=(0,p.useSelect)((e=>{const n=e(Hn).getBlock(t),o=(0,d.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){zu.has(t)||zu.set(t,new WeakMap);const n=zu.get(t);if(!n.has(e)){const o=(0,a.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,l.createElement)(Ii,{value:b},(0,l.createElement)(td,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:u,__experimentalLayout:h,wrapperRef:i,placeholder:g}))}function ju(e){return Is(e),(0,l.createElement)(Ku,e)}const $u=(0,l.forwardRef)(((e,t)=>{const n=qu({ref:t},e);return(0,l.createElement)("div",{className:"block-editor-inner-blocks"},(0,l.createElement)("div",n))}));function qu(e={},t={}){const{clientId:n}=Wn(),o=(0,c.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:i,hasOverlay:a}=(0,p.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:r,hasSelectedInnerBlock:l,isNavigationMode:i}=e(Hn),s=t(n),a=i()||o;return{__experimentalCaptureToolbars:e(d.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!r(n)&&!l(n,!0)&&a}}),[n,o]),u=(0,c.useMergeRefs)([e.ref,Wu({rootClientId:n})]),m={__experimentalCaptureToolbars:i,...t},f=m.value&&m.onChange?ju:Ku;return{...e,ref:u,className:s()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,l.createElement)(f,r({},m,{clientId:n})):(0,l.createElement)(td,t)}}$u.DefaultBlockAppender=Fu,$u.ButtonBlockAppender=Ou,$u.Content=(0,d.withBlockContentContext)((({BlockContent:e})=>(0,l.createElement)(e,null)));var Yu=$u;const Xu=(0,l.createContext)(),Qu=(0,l.createContext)();function Zu({className:e,...t}){const[n,o]=(0,l.useState)(),r=(0,c.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:a,isNavigationMode:u}=(0,p.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(Hn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),d=qu({ref:(0,c.useMergeRefs)([Ns(),Sc(),o]),className:s()("is-root-container",e,{"is-outline-mode":i,"is-focus-mode":a&&r,"is-navigate-mode":u})},t);return(0,l.createElement)(Xu.Provider,{value:n},(0,l.createElement)("div",d))}function Ju(e){return function(){const e=(0,p.useSelect)((e=>e(Hn).getSettings().__experimentalBlockPatterns),[]);(0,l.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,p.select)(Hn).__experimentalGetParsedPattern(e[n].name),t=wc(o))};return t=wc(o),()=>Bc(t)}),[e])}(),(0,l.createElement)(Mu,null,(0,l.createElement)(Gn,{value:zn},(0,l.createElement)(Zu,e)))}function ed({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,__experimentalLayout:r=uo}){const[i,s]=(0,l.useState)(new Set),a=(0,l.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{s((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}))}))}),[s]),{order:c,selectedBlocks:u}=(0,p.useSelect)((e=>{const{getBlockOrder:n,getSelectedBlockClientIds:o}=e(Hn);return{order:n(t),selectedBlocks:o()}}),[t]);return(0,l.createElement)(po,{value:r},(0,l.createElement)(Qu.Provider,{value:a},c.map((e=>(0,l.createElement)(p.AsyncModeProvider,{key:e,value:!i.has(e)&&!u.includes(e)},(0,l.createElement)(ks,{rootClientId:t,clientId:e}))))),c.length<1&&e,(0,l.createElement)(kc,{tagName:o,rootClientId:t,renderAppender:n}))}function td(e){return(0,l.createElement)(p.AsyncModeProvider,{value:!1},(0,l.createElement)(ed,e))}Ju.__unstableElementContext=Xu;const nd=[];function od(e=[]){const t={r:[],g:[],b:[]};return e.forEach((e=>{const n=Fo()(e);t.r.push(n._r/255),t.g.push(n._g/255),t.b.push(n._b/255)})),t}function rd({selector:e,id:t,values:n}){const o=`\n${e} {\n\tfilter: url( #${t} );\n}\n`;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.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,l.createElement)("defs",null,(0,l.createElement)("filter",{id:t},(0,l.createElement)("feColorMatrix",{type:"matrix",values:".299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 0 0 0 1 0"}),(0,l.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,l.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,l.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,l.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}))))),(0,l.createElement)("style",{dangerouslySetInnerHTML:{__html:o}}))}function ld({attributes:e,setAttributes:t}){var n;const o=null==e?void 0:e.style,r=null==o||null===(n=o.color)||void 0===n?void 0:n.duotone,i=so("color.duotone")||nd,s=so("color.palette")||nd,a=!so("color.custom"),c=!so("color.customDuotone")||0===(null==s?void 0:s.length)&&a;return 0===(null==i?void 0:i.length)&&c?null:(0,l.createElement)(Xn,{group:"block",__experimentalExposeToChildren:!0},(0,l.createElement)(Si,{duotonePalette:i,colorPalette:s,disableCustomDuotone:c,disableCustomColors:a,value:r,onChange:e=>{const n={...o,color:{...null==o?void 0:o.color,duotone:e}};t({style:n})}}))}const id=(0,c.createHigherOrderComponent)((e=>t=>{const n=(0,d.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(e,t),n&&(0,l.createElement)(ld,t))}),"withDuotoneControls"),sd=(0,c.createHigherOrderComponent)((e=>t=>{var n,o,i;const a=(0,d.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.duotone;if(!a||!u)return(0,l.createElement)(e,t);const m=`wp-duotone-filter-${(0,c.useInstanceId)(e)}`,p=a.split(",").map((e=>`.${m} ${e.trim()}`)).join(", "),f=s()(null==t?void 0:t.className,m),g=(0,l.useContext)(Ju.__unstableElementContext);return(0,l.createElement)(l.Fragment,null,g&&(0,l.createPortal)((0,l.createElement)(rd,{selector:p,id:m,values:od(u)}),g),(0,l.createElement)(e,r({},t,{className:f})))}),"withDuotoneStyles");(0,u.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,d.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,u.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",id),(0,u.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",sd);const ad="__experimentalLayout";function cd({setAttributes:e,attributes:t,name:n}){const{layout:o}=t,r=so("layout");if(!(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn);return t().supportsLayout}),[]))return null;const{allowSwitching:i,allowEditing:s=!0,allowInheriting:a=!0,default:c}=(0,d.getBlockSupport)(n,ad)||{};if(!s)return null;const u=o||c||{},{inherit:f=!1,type:h="default"}=u,b=co(h);return(0,l.createElement)(Ro,null,(0,l.createElement)(m.PanelBody,{title:(0,g.__)("Layout")},a&&!!r&&(0,l.createElement)(m.ToggleControl,{label:(0,g.__)("Inherit default layout"),checked:!!f,onChange:()=>e({layout:{inherit:!f}})}),!f&&i&&(0,l.createElement)(ud,{type:h,onChange:t=>e({layout:{type:t}})}),!f&&b&&(0,l.createElement)(b.edit,{layout:u,onChange:t=>e({layout:t})})))}function ud({type:e,onChange:t}){return(0,l.createElement)(m.ButtonGroup,null,ao.map((({name:n,label:o})=>(0,l.createElement)(m.Button,{key:n,isPressed:e===n,onClick:()=>t(n)},o))))}const dd=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,d.hasBlockSupport)(n,ad)&&(0,l.createElement)(cd,r({key:"layout"},t)),(0,l.createElement)(e,r({key:"edit"},t))]}),"withInspectorControls"),md=(0,c.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,i=(0,d.hasBlockSupport)(n,ad),a=(0,c.useInstanceId)(e),u=so("layout")||{},m=(0,l.useContext)(Ju.__unstableElementContext),{layout:p}=o,{default:f}=(0,d.getBlockSupport)(n,ad)||{},g=null!=p&&p.inherit?u:p||f||{},h=s()(null==t?void 0:t.className,{[`wp-container-${a}`]:i});return(0,l.createElement)(l.Fragment,null,i&&m&&(0,l.createPortal)((0,l.createElement)(fo,{selector:`.wp-container-${a}`,layout:g}),m),(0,l.createElement)(e,r({},t,{className:h})))}));(0,u.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,a.has)(e.attributes,["layout","type"])||(0,d.hasBlockSupport)(e,ad)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,u.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",md),(0,u.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",dd);const pd=[];function fd({borderColor:e,style:t}){var n;const o=(null==t?void 0:t.border)||{},r=zo("border-color",e);return{className:s()({[r]:!!r,"has-border-color":e||(null==t||null===(n=t.border)||void 0===n?void 0:n.color)})||void 0,style:vi({border:o})}}function gd(e){const t=so("color.palette")||pd,n=fd(e);if(e.borderColor){const o=Vo(t,e.borderColor);n.style.borderColor=o.color}return n}const hd=[];function bd(e){var t,n,o,r,l,i;const{backgroundColor:a,textColor:c,gradient:u,style:d}=e,m=zo("background-color",a),p=zo("color",c),f=Go(u),g=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:s()(p,f,{[m]:!g&&!!m,"has-text-color":c||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":a||(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:vi({color:(null==d?void 0:d.color)||{}})}}function vd(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=so("color.palette")||hd,l=so("color.gradients")||hd,i=bd(e);if(t){const e=Vo(r,t);i.style.backgroundColor=e.color}if(o&&(i.style.background=Wo(l,o)),n){const e=Vo(r,n);i.style.color=e.color}return i}function kd(e){const{style:t}=e;return{style:vi({spacing:(null==t?void 0:t.spacing)||{}})}}const _d=[];function yd(e,t){const n=(0,a.reduce)(e,((e,t)=>({...e,...(0,a.isString)(t)?{[t]:(0,a.kebabCase)(t)}:t})),{});return(0,c.compose)([t,e=>class extends l.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){return Fo().mostReadable(t,(0,a.map)(e,"color")).toHexString()}(t,e)}createSetters(){return(0,a.reduce)(n,((e,t,n)=>{const o=(0,a.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=Ho(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return(0,a.reduce)(n,((n,r,l)=>{const i=Vo(t,e[l],e[`custom${(0,a.upperFirst)(l)}`]),s=o[l];return(null==s?void 0:s.color)===i.color&&s?n[l]=s:n[l]={...i,class:zo(r,i.slug)},n}),{})}render(){return(0,l.createElement)(e,r({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Ed(e){return(...t)=>{const n=(e=>(0,c.createHigherOrderComponent)((t=>n=>(0,l.createElement)(t,r({},n,{colors:e}))),"withCustomColorPalette"))(e);return(0,c.createHigherOrderComponent)(yd(t,n),"withCustomColors")}}function Cd(...e){const t=(0,c.createHigherOrderComponent)((e=>t=>{const n=so("color.palette")||_d;return(0,l.createElement)(e,r({},t,{colors:n}))}),"withEditorColorPalette");return(0,c.createHigherOrderComponent)(yd(e,t),"withColors")}const Sd=[];var wd=(...e)=>{const t=(0,a.reduce)(e,((e,t)=>(e[t]=`custom${(0,a.upperFirst)(t)}`,e)),{});return(0,c.createHigherOrderComponent)((0,c.compose)([(0,c.createHigherOrderComponent)((e=>t=>{const n=so("typography.fontSizes")||Sd;return(0,l.createElement)(e,r({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends l.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,a.reduce)(t,((e,t,n)=>(e[`set${(0,a.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,a.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({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!(0,a.some)(t,r))return null;const l=(0,a.reduce)((0,a.pickBy)(t,r),((t,o,r)=>{const l=e[r],i=Vl(n,l,e[o]);return t[r]={...i,class:zl(l)},t}),{});return{...o,...l}}render(){return(0,l.createElement)(e,r({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},Bd=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),Id=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),xd=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 Td=[{icon:Bd,title:(0,g.__)("Align text left"),align:"left"},{icon:Id,title:(0,g.__)("Align text center"),align:"center"},{icon:xd,title:(0,g.__)("Align text right"),align:"right"}],Nd={position:"bottom right",isAlternate:!0};var Ld=function({value:e,onChange:t,alignmentControls:n=Td,label:o=(0,g.__)("Align"),describedBy:i=(0,g.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}){function u(n){return()=>t(e===n?void 0:n)}const d=(0,a.find)(n,(t=>t.align===e)),p=c?m.ToolbarGroup:m.ToolbarDropdownMenu,f=c?{isCollapsed:s}:{};return(0,l.createElement)(p,r({icon:d?d.icon:(0,g.isRTL)()?xd:Bd,label:o,toggleProps:{describedBy:i},popoverProps:Nd,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:s?"menuitemradio":void 0,onClick:u(n)}}))},f))};function Pd(e){return(0,l.createElement)(Ld,r({},e,{isToolbar:!1}))}function Rd(e){return(0,l.createElement)(Ld,r({},e,{isToolbar:!0}))}var Ad={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(Hn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,i]=Ia(t,a.noop),s=(0,l.useMemo)((()=>(e.trim()?tc(o,r,i,e):(0,a.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,i]);return[(0,l.useMemo)((()=>s.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ws,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[s])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,d.createBlock)(t,n,(0,d.createBlocksFromInnerBlocksTemplate)(o))}}};const Md=[];function Dd({completers:e=Md}){const{name:t}=Wn();return(0,l.useMemo)((()=>{let n=e;return t===(0,d.getDefaultBlockName)()&&(n=n.concat([Ad])),(0,u.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map(a.clone)),n=(0,u.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}var Od=function(e){return(0,l.createElement)(m.Autocomplete,r({},e,{completers:Dd(e)}))},Fd=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),Vd=function({isActive:e,label:t=(0,g.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,l.createElement)(m.ToolbarButton,{isActive:e,icon:Fd,label:t,onClick:()=>n(!e),disabled:o})},Hd=function(e){const{label:t=(0,g.__)("Change matrix alignment"),onChange:n=a.noop,value:o="center",isDisabled:r}=e,i=(0,l.createElement)(m.__experimentalAlignmentMatrixControl.Icon,{value:o}),s="block-editor-block-alignment-matrix-control",c=`${s}__popover`;return(0,l.createElement)(m.Dropdown,{position:"bottom right",className:s,popoverProps:{className:c,isAlternate:!0},renderToggle:({onToggle:e,isOpen:n})=>(0,l.createElement)(m.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==kl.DOWN||(t.preventDefault(),e())},label:t,icon:i,showTooltip:!0,disabled:r}),renderContent:()=>(0,l.createElement)(m.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},zd=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),Ud=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,p.useDispatch)(Hn),{clientId:o,parents:r,hasSelection:i}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(Hn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=e||(0,g.__)("Document");return(0,l.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,g.__)("Block breadcrumb")},(0,l.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,l.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:n},s),!i&&s,!!o&&(0,l.createElement)(ro,{icon:zd,className:"block-editor-block-breadcrumb__separator"})),r.map((e=>(0,l.createElement)("li",{key:e},(0,l.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>t(e)},(0,l.createElement)(xc,{clientId:e})),(0,l.createElement)(ro,{icon:zd,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,l.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,l.createElement)(xc,{clientId:o})))};function Gd({clientId:e,tagName:t="div",wrapperProps:n,className:o}){const[i,a]=(0,l.useState)(!0),[c,u]=(0,l.useState)(!1),{isParentSelected:d,hasChildSelected:m,isDraggingBlocks:f,isParentHighlighted:g}=(0,p.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=t(Hn);return{isParentSelected:n(e),hasChildSelected:o(e,!0),isDraggingBlocks:r(),isParentHighlighted:l(e)}}),[e]),h=s()("block-editor-block-content-overlay",null==n?void 0:n.className,o,{"overlay-active":i,"parent-highlighted":g,"is-dragging-blocks":f});return(0,l.useEffect)((()=>{d||m||i||a(!0),d&&!c&&i&&a(!1),m&&i&&a(!1)}),[d,m,i,c]),(0,l.createElement)(t,r({},n,{className:h,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onMouseUp:i?()=>a(!1):void 0}),null==n?void 0:n.children)}const Wd=()=>(0,l.createElement)(m.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,l.createElement)(m.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"})),Kd=({style:e,className:t})=>(0,l.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,l.createElement)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e},(0,l.createElement)(Wd,null))),jd=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(m.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,g.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==kl.DOWN||(e.preventDefault(),n())},icon:(0,l.createElement)(t,null,(0,l.createElement)(e,null,(0,l.createElement)(Kd,null)))}));var $d=({children:e,...t})=>(0,l.createElement)(m.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:jd(t),renderContent:()=>e}),qd=(0,l.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.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 Yd=(0,Ki.q)(m.__experimentalTreeGridRow);function Xd({isSelected:e,position:t,level:n,rowCount:o,children:i,className:a,path:c,...u}){const d=qi({isSelected:e,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:c.join("_")});return(0,l.createElement)(Yd,r({ref:d,className:s()("block-editor-list-view-leaf",a),level:n,positionInSet:t,setSize:o},u),i)}const Qd=(0,l.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),Zd=()=>(0,l.useContext)(Qd),Jd=(e,t,n)=>(0,g.sprintf)(
54
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
55
- (0,g.__)("Block %1$d of %2$d, Level %3$d"),e,t,n),em=(e,t)=>(0,a.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e;function tm({onClick:e}){return(0,l.createElement)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true"},(0,l.createElement)(ro,{icon:zd}))}var nm=(0,l.forwardRef)((function e({className:t,block:{clientId:n},isSelected:o,onClick:r,onToggleExpanded:i,position:a,siblingBlockCount:u,level:d,tabIndex:p,onFocus:f,onDragStart:h,onDragEnd:b,draggable:v},k){const _=Ic(n),y=`list-view-block-select-button__${(0,c.useInstanceId)(e)}`,E=Jd(a,u,d);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.Button,{className:s()("block-editor-list-view-block-select-button",t),onClick:r,"aria-describedby":y,ref:k,tabIndex:p,onFocus:f,onDragStart:h,onDragEnd:b,draggable:v},(0,l.createElement)(tm,{onClick:i}),(0,l.createElement)(ws,{icon:null==_?void 0:_.icon,showColors:!0}),(0,l.createElement)(xc,{clientId:n}),(null==_?void 0:_.anchor)&&(0,l.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},_.anchor),o&&(0,l.createElement)(m.VisuallyHidden,null,(0,g.__)("(selected block)"))),(0,l.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:y},E))}));const om=e=>`ListViewBlock-${e}`;var rm=(0,l.forwardRef)((function e(t,n){const{clientId:o}=t.block,{name:i}=(0,p.useSelect)((e=>e(Hn).getBlockName(o)),[o]),a=(0,c.useInstanceId)(e);return(0,l.createElement)(m.Slot,{name:om(o)},(e=>{if(!e.length)return(0,l.createElement)(nm,r({ref:n},t));const{className:o,isSelected:c,position:u,siblingBlockCount:p,level:f,tabIndex:h,onFocus:b,onToggleExpanded:v}=t,k=(0,d.getBlockType)(i),_=`list-view-block-slot__${a}`,y=Jd(u,p,f),E={tabIndex:h,onFocus:b,ref:n,"aria-describedby":_};return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:s()("block-editor-list-view-block-slot",o)},(0,l.createElement)(tm,{onClick:v}),(0,l.createElement)(ws,{icon:k.icon,showColors:!0}),l.Children.map(e,(e=>(0,l.cloneElement)(e,{...e.props,...E}))),c&&(0,l.createElement)(m.VisuallyHidden,null,(0,g.__)("(selected block)")),(0,l.createElement)("div",{className:"block-editor-list-view-block-slot__description",id:_},y)))}))}));const lm=e=>{const{clientId:t}=(0,l.useContext)(gs);return(0,l.createElement)(m.Fill,r({},e,{name:om(t)}))};var im=(0,l.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:i,siblingBlockCount:a,level:c,...u},d)=>{const{__experimentalFeatures:m}=Zd(),{clientId:f}=n,{blockMovingClientId:g,selectedBlockInBlockEditor:h}=(0,p.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Hn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),b=g&&h===f,v=s()("block-editor-list-view-block-contents",{"is-dropping-before":b});return(0,l.createElement)(Tc,{clientIds:[n.clientId]},(({draggable:s,onDragStart:p,onDragEnd:f})=>m?(0,l.createElement)(rm,r({ref:d,className:v,block:n,onToggleExpanded:t,isSelected:o,position:i,siblingBlockCount:a,level:c,draggable:s&&m,onDragStart:p,onDragEnd:f},u)):(0,l.createElement)(nm,r({ref:d,className:v,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:i,siblingBlockCount:a,level:c,draggable:s,onDragStart:p,onDragEnd:f},u))))}));function sm({block:e,isSelected:t,isBranchSelected:n,isLastOfSelectedBranch:o,onClick:r,onToggleExpanded:i,position:a,level:c,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:b}){const v=(0,l.useRef)(null),[k,_]=(0,l.useState)(!1),{clientId:y}=e,{isDragging:E,blockParents:C}=(0,p.useSelect)((e=>{const{isBlockBeingDragged:t,isAncestorBeingDragged:n,getBlockParents:o}=e(Hn);return{isDragging:t(y)||n(y),blockParents:o(y)}}),[y]),{selectBlock:S,toggleBlockHighlight:w}=(0,p.useDispatch)(Hn),B=f&&d>0,I=s()("block-editor-list-view-block__mover-cell",{"is-visible":k}),{__experimentalFeatures:x,__experimentalPersistentListViewFeatures:T,isTreeGridMounted:N}=Zd(),L=s()("block-editor-list-view-block__menu-cell",{"is-visible":k});(0,l.useEffect)((()=>{T&&!N&&t&&v.current.focus()}),[]),(0,l.useEffect)((()=>{x&&t&&v.current.focus()}),[x,t]);const P=T?w:()=>{},R=()=>{_(!0),P(y,!0)},A=()=>{_(!1),P(y,!1)},M=s()({"is-selected":t,"is-branch-selected":T&&n,"is-last-of-selected-branch":T&&o,"is-dragging":E});return(0,l.createElement)(Xd,{className:M,onMouseEnter:R,onMouseLeave:A,onFocus:R,onBlur:A,level:c,position:a,rowCount:u,path:h,id:`list-view-block-${y}`,"data-block":y,isExpanded:b},(0,l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:B?void 0:2,ref:v},(({ref:n,tabIndex:o,onFocus:s})=>(0,l.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,l.createElement)(im,{block:e,onClick:r,onToggleExpanded:i,isSelected:t,position:a,siblingBlockCount:d,level:c,ref:n,tabIndex:o,onFocus:s})))),B&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.__experimentalTreeGridCell,{className:I,withoutGridItem:!0},(0,l.createElement)(m.__experimentalTreeGridItem,null,(({ref:e,tabIndex:t,onFocus:n})=>(0,l.createElement)(Hc,{orientation:"vertical",clientIds:[y],ref:e,tabIndex:t,onFocus:n}))),(0,l.createElement)(m.__experimentalTreeGridItem,null,(({ref:e,tabIndex:t,onFocus:n})=>(0,l.createElement)(zc,{orientation:"vertical",clientIds:[y],ref:e,tabIndex:t,onFocus:n}))))),x&&(0,l.createElement)(m.__experimentalTreeGridCell,{className:L},(({ref:e,tabIndex:t,onFocus:n})=>(0,l.createElement)(Iu,{clientIds:[y],icon:cu,toggleProps:{ref:e,tabIndex:t,onFocus:n},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(({onClose:e})=>(0,l.createElement)(m.MenuGroup,null,(0,l.createElement)(m.MenuItem,{onClick:async()=>{if(C.length)for(const e of C)await S(e);else await S(null);await S(y),e()}},(0,g.__)("Go to block"))))))))}function am({parentBlockClientId:e,position:t,level:n,rowCount:o,path:r}){const i=(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isAncestorBeingDragged:o}=t(Hn);return n(e)||o(e)}),[e]),a=`list-view-appender-row__description_${(0,c.useInstanceId)(am)}`,u=(0,g.sprintf)(
56
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
57
- (0,g.__)("Add block at position %1$d, Level %2$d"),t,n);return(0,l.createElement)(Xd,{className:s()({"is-dragging":i}),level:n,position:t,rowCount:o,path:r},(0,l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-list-view-appender__cell",colSpan:"3"},(({ref:t,tabIndex:n,onFocus:o})=>(0,l.createElement)("div",{className:"block-editor-list-view-appender__container"},(0,l.createElement)(fc,{rootClientId:e,__experimentalIsQuick:!0,"aria-describedby":a,toggleProps:{ref:t,tabIndex:n,onFocus:o}}),(0,l.createElement)("div",{className:"block-editor-list-view-appender__description",id:a},u)))))}function cm(e){const{blocks:t,selectBlock:n,selectedBlockClientIds:o,showAppender:r,showBlockMovers:i,showNestedBlocks:s,parentBlockClientId:c,level:u=1,terminatedLevels:d=[],path:m=[],isBranchSelected:p=!1,isLastOfBranch:f=!1}=e,g=!c,h=(0,a.compact)(t),b=e=>r&&!g&&em(e,o),v=b(c),k=h.length,_=v?k+1:k,y=_,{expandedState:E,expand:C,collapse:S}=Zd();return(0,l.createElement)(l.Fragment,null,(0,a.map)(h,((e,t)=>{var a;const{clientId:c,innerBlocks:g}=e,h=t+1,v=_===h?[...d,u]:d,y=[...m,h],w=s&&!!g&&!!g.length,B=b(c),I=w||B,x=em(c,o),T=p||x&&I,N=t===k-1,L=x||f&&N,P=f&&!I&&N,R=I?null===(a=E[c])||void 0===a||a:void 0;return(0,l.createElement)(l.Fragment,{key:c},(0,l.createElement)(sm,{block:e,onClick:e=>{e.stopPropagation(),n(c)},onToggleExpanded:e=>{e.stopPropagation(),!0===R?S(c):!1===R&&C(c)},isSelected:x,isBranchSelected:T,isLastOfSelectedBranch:P,level:u,position:h,rowCount:_,siblingBlockCount:k,showBlockMovers:i,terminatedLevels:d,path:y,isExpanded:R}),I&&R&&(0,l.createElement)(cm,{blocks:g,selectedBlockClientIds:o,selectBlock:n,isBranchSelected:T,isLastOfBranch:L,showAppender:r,showBlockMovers:i,showNestedBlocks:s,parentBlockClientId:c,level:u+1,terminatedLevels:v,path:y}))})),v&&(0,l.createElement)(am,{parentBlockClientId:c,position:_,rowCount:y,level:u,terminatedLevels:d,path:[...m,y]}))}function um({listViewRef:e,blockDropTarget:t}){const{rootClientId:n,clientId:o,dropPosition:r}=t||{},[i,s]=(0,l.useMemo)((()=>e.current?[n?e.current.querySelector(`[data-block="${n}"]`):void 0,o?e.current.querySelector(`[data-block="${o}"]`):void 0]:[]),[n,o]),a=s||i,c=(0,l.useCallback)((()=>{if(!i)return 0;const e=a.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,a]),u=(0,l.useMemo)((()=>{if(!a)return{};const e=c();return{width:a.offsetWidth-e}}),[c,a]),d=(0,l.useCallback)((()=>{if(!a)return{};const e=a.ownerDocument,t=a.getBoundingClientRect(),n=c(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===r?{...o,top:t.top,bottom:t.top}:"bottom"===r||"inside"===r?{...o,top:t.bottom,bottom:t.bottom}:{}}),[a,r,c]);return a?(0,l.createElement)(m.Popover,{noArrow:!0,animate:!1,getAnchorRect:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,l.createElement)("div",{style:u,className:"block-editor-list-view-drop-indicator__line"})):null}function dm(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}cm.defaultProps={selectBlock:()=>{}};const mm=["top","bottom"];const pm=()=>{},fm=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};function gm({blocks:e,showOnlyCurrentHierarchy:t,onSelect:n=pm,__experimentalFeatures:o,__experimentalPersistentListViewFeatures:i,...s}){const{clientIdsTree:a,selectedClientIds:u}=function(e,t,n){const o=(e=>(0,p.useSelect)((t=>{const{getSelectedBlockClientId:n,getSelectedBlockClientIds:o}=t(Hn);return e?o():n()}),[e]))(n);return{clientIdsTree:((e,t,n)=>(0,p.useSelect)((o=>{const{getBlockHierarchyRootClientId:r,__unstableGetClientIdsTree:l,__unstableGetClientIdWithClientIdsTree:i}=o(Hn);if(e)return e;const s=t&&!Array.isArray(t);if(!n||!s)return l();const a=i(r(t));return a&&(!em(a.clientId,t)||a.innerBlocks&&0!==a.innerBlocks.length)?[a]:l()}),[e,t,n]))(e,o,t),selectedClientIds:o}}(e,t,i),{selectBlock:d}=(0,p.useDispatch)(Hn),f=(0,l.useCallback)((e=>{d(e),n(e)}),[d,n]),[h,b]=(0,l.useReducer)(fm,{}),{ref:v,target:k}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,p.useSelect)(Hn),[i,s]=(0,l.useState)(),{rootClientId:a,blockIndex:u}=i||{},d=Uu(a,u),m=o(),f=(0,c.useThrottle)((0,l.useCallback)(((o,l)=>{const i={x:o.clientX,y:o.clientY},a=!(null==m||!m.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]=Gu(t,s,mm),u=dm(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&&m.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(m,i),canInsertDraggedBlocksAsChild:!a||r(m,l)}})),i);c&&s(c)}),[m]),200);return{ref:(0,c.__experimentalUseDropZone)({onDrop:d,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),s(null)}}),target:i}}(),_=(0,l.useRef)(),y=(0,c.useMergeRefs)([_,v]),E=(0,l.useRef)(!1);(0,l.useEffect)((()=>{E.current=!0}),[]);const C=e=>{e&&b({type:"expand",clientId:e})},S=e=>{e&&b({type:"collapse",clientId:e})},w=(0,l.useMemo)((()=>({__experimentalFeatures:o,__experimentalPersistentListViewFeatures:i,isTreeGridMounted:E.current,expandedState:h,expand:C,collapse:S})),[o,i,E.current,h,C,S]);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(um,{listViewRef:_,blockDropTarget:k}),(0,l.createElement)(m.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,g.__)("Block navigation structure"),ref:y,onCollapseRow:e=>{var t;S(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)},onExpandRow:e=>{var t;C(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}},(0,l.createElement)(Qd.Provider,{value:w},(0,l.createElement)(cm,r({blocks:a,selectBlock:f,selectedBlockClientIds:u},s)))))}function hm({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...i}){return(0,l.createElement)(m.Button,r({},i,{ref:o,icon:qd,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0
58
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e}))}var bm=(0,l.forwardRef)((function({isDisabled:e,__experimentalFeatures:t,...n},o){const i=(0,p.useSelect)((e=>!!e(Hn).getBlockCount()),[])&&!e;return(0,l.createElement)(m.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:({isOpen:e,onToggle:t})=>(0,l.createElement)(hm,r({},n,{innerRef:o,isOpen:e,onToggle:t,isEnabled:i})),renderContent:()=>(0,l.createElement)("div",{className:"block-editor-block-navigation__container"},(0,l.createElement)("p",{className:"block-editor-block-navigation__label"},(0,g.__)("List view")),(0,l.createElement)(gm,{showNestedBlocks:!0,showOnlyCurrentHierarchy:!0,__experimentalFeatures:t}))})})),vm=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),km=function({icon:e=vm,label:t=(0,g.__)("Choose variation"),instructions:n=(0,g.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:i}){const a=s()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,l.createElement)(m.Placeholder,{icon:e,label:t,instructions:n,className:a},(0,l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,g.__)("Block variations")},o.map((e=>(0,l.createElement)("li",{key:e.name},(0,l.createElement)(m.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,l.createElement)(m.Button,{variant:"link",onClick:()=>r()},(0,g.__)("Skip"))))},_m=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 ym="carousel",Em="grid",Cm=({onStartBlank:e,onBlockPatternSelect:t})=>(0,l.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,l.createElement)(m.Button,{onClick:e},(0,g.__)("Start blank")),(0,l.createElement)(m.Button,{variant:"primary",onClick:t},(0,g.__)("Choose"))),Sm=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,l.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,l.createElement)(m.Button,{icon:Ac,label:(0,g.__)("Previous pattern"),onClick:e,disabled:0===n}),(0,l.createElement)(m.Button,{icon:Rc,label:(0,g.__)("Next pattern"),onClick:t,disabled:n===o-1}));var wm=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i,onBlockPatternSelect:s,onStartBlank:a})=>{const c=e===ym,u=(0,l.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,l.createElement)(m.Button,{icon:to,label:(0,g.__)("Carousel view"),onClick:()=>t(ym),isPressed:c}),(0,l.createElement)(m.Button,{icon:_m,label:(0,g.__)("Grid view"),onClick:()=>t(Em),isPressed:e===Em}));return(0,l.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},c&&(0,l.createElement)(Sm,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i}),u,c&&(0,l.createElement)(Cm,{onBlockPatternSelect:s,onStartBlank:a}))};const Bm=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o})=>{const i=(0,m.__unstableUseCompositeState)(),s="block-editor-block-pattern-setup__container";if(e===ym){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,l.createElement)("div",{className:s},(0,l.createElement)("ul",{className:"carousel-container"},n.map(((t,n)=>(0,l.createElement)(xm,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,l.createElement)(m.__unstableComposite,r({},i,{role:"listbox",className:s,"aria-label":(0,g.__)("Patterns list")}),n.map((e=>(0,l.createElement)(Im,{key:e.name,pattern:e,onSelect:o,composite:i}))))};function Im({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-pattern-setup-list",{blocks:i,title:s,description:a,viewportWidth:u=700}=e,d=(0,c.useInstanceId)(Im,`${o}__item-description`);return(0,l.createElement)("div",{className:`${o}__list-item`,"aria-label":e.title,"aria-describedby":e.description?d:void 0},(0,l.createElement)(m.__unstableCompositeItem,r({role:"option",as:"div"},n,{className:`${o}__item`,onClick:()=>t(i)}),(0,l.createElement)(fa,{blocks:i,viewportWidth:u}),(0,l.createElement)("div",{className:`${o}__item-title`},s)),!!a&&(0,l.createElement)(m.VisuallyHidden,{id:d},a))}function xm({className:e,pattern:t}){const{blocks:n,title:o,description:r}=t,i=(0,c.useInstanceId)(xm,"block-editor-block-pattern-setup-list__item-description");return(0,l.createElement)("li",{className:`pattern-slide ${e}`,"aria-label":o,"aria-describedby":r?i:void 0},(0,l.createElement)(fa,{blocks:n,__experimentalLive:!0}),!!r&&(0,l.createElement)(m.VisuallyHidden,{id:i},r))}var Tm=({clientId:e,blockName:t,filterPatternsFn:n,startBlankComponent:o,onBlockPatternSelect:r})=>{const[i,s]=(0,l.useState)(ym),[a,c]=(0,l.useState)(0),[u,m]=(0,l.useState)(!1),{replaceBlock:f}=(0,p.useDispatch)(Hn),g=function(e,t,n){return(0,p.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Hn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(e,t,n);if(null==g||!g.length||u)return o;const h=r||(t=>{const n=t.map((e=>(0,d.cloneBlock)(e)));f(e,n)});return(0,l.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${i}`},(0,l.createElement)(wm,{viewMode:i,setViewMode:s,activeSlide:a,totalSlides:g.length,handleNext:()=>{c((e=>e+1))},handlePrevious:()=>{c((e=>e-1))},onBlockPatternSelect:()=>{h(g[a].blocks)},onStartBlank:()=>{m(!0)}}),(0,l.createElement)(Bm,{viewMode:i,activeSlide:a,patterns:g,onBlockPatternSelect:h}))};const Nm=(e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&&(0,a.isMatch)(e,t)));return 1===n.length?n[0]:void 0};var Lm=function({blockClientId:e}){const[t,n]=(0,l.useState)(),{updateBlockAttributes:o}=(0,p.useDispatch)(Hn),{variations:r,blockAttributes:i}=(0,p.useSelect)((t=>{const{getBlockVariations:n}=t(d.store),{getBlockName:o,getBlockAttributes:r}=t(Hn),l=e&&o(e);return{variations:l&&n(l,"transform"),blockAttributes:r(e)}}),[e]);if((0,l.useEffect)((()=>{var e;n(null===(e=Nm(i,r))||void 0===e?void 0:e.name)}),[i,r]),null==r||!r.length)return null;const s=r.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n}))),a=t=>{o(e,{...r.find((({name:e})=>e===t)).attributes})},c="block-editor-block-variation-transforms";return(0,l.createElement)(m.DropdownMenu,{className:c,label:(0,g.__)("Transform to variation"),text:(0,g.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${c}__popover`},icon:Dc,toggleProps:{iconPosition:"right"}},(()=>(0,l.createElement)("div",{className:`${c}__container`},(0,l.createElement)(m.MenuGroup,null,(0,l.createElement)(m.MenuItemsChoice,{choices:s,value:t,onSelect:a})))))};const Pm=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Rm=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Am={top:{icon:(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,g._x)("Align top","Block vertical alignment setting")},center:{icon:Rm,title:(0,g._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Pm,title:(0,g._x)("Align bottom","Block vertical alignment setting")}},Mm=["top","center","bottom"],Dm={isAlternate:!0};var Om=function({value:e,onChange:t,controls:n=Mm,isCollapsed:o=!0,isToolbar:i}){const s=Am[e],a=Am.top,c=i?m.ToolbarGroup:m.ToolbarDropdownMenu,u=i?{isCollapsed:o}:{};return(0,l.createElement)(c,r({popoverProps:Dm,icon:s?s.icon:a.icon,label:(0,g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...Am[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r}))},u))};function Fm(e){return(0,l.createElement)(Om,r({},e,{isToolbar:!1}))}function Vm(e){return(0,l.createElement)(Om,r({},e,{isToolbar:!0}))}var Hm=(0,c.createHigherOrderComponent)((e=>t=>{const n=so("color.palette"),o=!so("color.custom"),i=void 0===t.colors?n:t.colors,s=void 0===t.disableCustomColors?o:t.disableCustomColors,c=!(0,a.isEmpty)(i)||!s;return(0,l.createElement)(e,r({},t,{colors:i,disableCustomColors:s,hasColorsToChoose:c}))}),"withColorContext"),zm=Hm(m.ColorPalette);function Um({onChange:e,value:t,...n}){return(0,l.createElement)(er,r({},n,{onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0}))}const Gm=[25,50,75,100];function Wm({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:o=!0,slug:r,width:i,height:s,onChange:c,onChangeImage:u=a.noop}){const{currentHeight:d,currentWidth:p,updateDimension:f,updateDimensions:h}=function(e,t,n,o,r){var i,s;const[a,c]=(0,l.useState)(null!==(i=null!=t?t:o)&&void 0!==i?i:""),[u,d]=(0,l.useState)(null!==(s=null!=e?e:n)&&void 0!==s?s:"");return(0,l.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),{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})}}}(s,i,t,e,c);return(0,l.createElement)(l.Fragment,null,!(0,a.isEmpty)(n)&&(0,l.createElement)(m.SelectControl,{label:(0,g.__)("Image size"),value:r,options:n,onChange:u}),o&&(0,l.createElement)("div",{className:"block-editor-image-size-control"},(0,l.createElement)("p",{className:"block-editor-image-size-control__row"},(0,g.__)("Image dimensions")),(0,l.createElement)("div",{className:"block-editor-image-size-control__row"},(0,l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,g.__)("Width"),value:p,min:1,onChange:e=>f("width",e)}),(0,l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,g.__)("Height"),value:d,min:1,onChange:e=>f("height",e)})),(0,l.createElement)("div",{className:"block-editor-image-size-control__row"},(0,l.createElement)(m.ButtonGroup,{"aria-label":(0,g.__)("Image size presets")},Gm.map((n=>{const o=Math.round(e*(n/100)),r=Math.round(t*(n/100)),i=p===o&&d===r;return(0,l.createElement)(m.Button,{key:n,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>h(r,o)},n,"%")}))),(0,l.createElement)(m.Button,{isSmall:!0,onClick:()=>h()},(0,g.__)("Reset")))))}var Km=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),jm=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),$m=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),qm=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));const Ym={left:Km,center:jm,right:$m,"space-between":qm};var Xm=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:i,isToolbar:s}){const a=e=>{n(e===o?void 0:e)},c=o?Ym[o]:Ym.left,u=[{name:"left",icon:Km,title:(0,g.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:jm,title:(0,g.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:$m,title:(0,g.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:qm,title:(0,g.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")}],d=s?m.ToolbarGroup:m.ToolbarDropdownMenu,p=s?{isCollapsed:t}:{};return(0,l.createElement)(d,r({icon:c,popoverProps:i,label:(0,g.__)("Change items justification"),controls:u.filter((t=>e.includes(t.name)))},p))};function Qm(e){return(0,l.createElement)(Xm,r({},e,{isToolbar:!1}))}function Zm(e){return(0,l.createElement)(Xm,r({},e,{isToolbar:!0}))}var Jm=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.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"})),ep=({value:e,onChange:t=a.noop,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,l.createElement)(m.ToggleControl,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id]})));return(0,l.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,l.createElement)(m.VisuallyHidden,{as:"legend"},(0,g.__)("Currently selected link settings")),r)};class tp extends l.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,l.createRef)(),this.inputRef=(0,l.createRef)(),this.updateSuggestions=(0,a.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}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,cs()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value!==o&&this.shouldShowInitialSuggestions()&&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(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!(e&&e.length);if(!o&&(e.length<2||!n&&(0,Va.isURL)(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((e=>{this.suggestionsRequest===r&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,g.sprintf)(
59
  /* translators: %s: number of results. */
60
- (0,g._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,g.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===r&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=r}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case kl.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case kl.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case kl.ENTER:this.props.onSubmit&&this.props.onSubmit()}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case kl.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case kl.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case kl.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,g.__)("Link selected.")));break;case kl.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l)):this.props.onSubmit&&this.props.onSubmit()}}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({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let l=r;const i=e&&e.length;return o||i||(l=!1),!0===n&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,g.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:a=""}=this.props,{loading:c,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:p,suggestionOptionIdPrefix:f}=this.state,h={id:`url-input-control-${o}`,label:e,className:s()("block-editor-url-input",t,{"is-full-width":n})},b={value:a,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,g.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":p,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return i?i(h,b,c):(0,l.createElement)(m.BaseControl,h,(0,l.createElement)("input",b),c&&(0,l.createElement)(m.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:i,suggestions:c,selectedSuggestion:u,suggestionsListboxId:d,suggestionOptionIdPrefix:p,loading:f}=this.state,g={id:d,ref:this.autocompleteRef,role:"listbox"},h=(e,t)=>({role:"option",tabIndex:"-1",id:`${p}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===u});return(0,a.isFunction)(t)&&i&&c.length?t({suggestions:c,selectedSuggestion:u,suggestionsListProps:g,buildSuggestionItemProps:h,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,a.isFunction)(t)&&i&&c.length?(0,l.createElement)(m.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,l.createElement)("div",r({},g,{className:s()("block-editor-url-input__suggestions",`${e}__suggestions`)}),c.map(((e,t)=>(0,l.createElement)(m.Button,r({},h(0,t),{key:e.id,className:s()("block-editor-url-input__suggestion",{"is-selected":t===u}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var np=(0,c.compose)(c.withSafeTimeout,m.withSpokenMessages,c.withInstanceId,(0,p.withSelect)(((e,t)=>{if((0,a.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Hn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(tp),op=({searchTerm:e,onClick:t,itemProps:n,isSelected:o,buttonText:i})=>{if(!e)return null;let c;return c=i?(0,a.isFunction)(i)?i(e):i:(0,l.createInterpolateElement)((0,g.sprintf)(
61
  /* translators: %s: search term. */
62
- (0,g.__)("Create: <mark>%s</mark>"),e),{mark:(0,l.createElement)("mark",null)}),(0,l.createElement)(m.Button,r({},n,{className:s()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:t}),(0,l.createElement)(ro,{className:"block-editor-link-control__search-item-icon",icon:ys}),(0,l.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,l.createElement)("span",{className:"block-editor-link-control__search-item-title"},c)))},rp=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(O.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),lp=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:o,isURL:i=!1,searchTerm:a="",shouldShowType:c=!1})=>(0,l.createElement)(m.Button,r({},e,{onClick:o,className:s()("block-editor-link-control__search-item",{"is-selected":n,"is-url":i,"is-entity":!i})}),i&&(0,l.createElement)(ro,{className:"block-editor-link-control__search-item-icon",icon:rp}),(0,l.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,l.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,l.createElement)(m.TextHighlight,{text:t.title,highlight:a})),(0,l.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,Va.filterURLForDisplay)((0,Va.safeDecodeURI)(t.url))||""),i&&(0,g.__)("Press ENTER to add this link"))),c&&t.type&&(0,l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type));const ip="__CREATE__",sp=[{id:"opensInNewTab",title:(0,g.__)("Open in new tab")}];function ap({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:a,suggestions:c,selectedSuggestion:u,isLoading:d,isInitialSuggestions:p,createSuggestionButtonText:f,suggestionsQuery:h}){const b=s()("block-editor-link-control__search-results",{"is-loading":d}),v=["url","mailto","tel","internal"],k=1===c.length&&v.includes(c[0].type.toLowerCase()),_=t&&!k&&!p,y=!(null!=h&&h.type),E=`block-editor-link-control-search-results-label-${e}`,C=p?(0,g.__)("Recently updated"):(0,g.sprintf)(
63
  /* translators: %s: search term. */
64
- (0,g.__)('Search results for "%s"'),n),S=(0,l.createElement)(p?l.Fragment:m.VisuallyHidden,{},(0,l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},C));return(0,l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,l.createElement)("div",r({},i,{className:b,"aria-labelledby":E}),c.map(((e,t)=>_&&ip===e.type?(0,l.createElement)(op,{searchTerm:n,buttonText:f,onClick:()=>o(e),key:e.type,itemProps:a(e,t),isSelected:t===u}):ip===e.type?null:(0,l.createElement)(lp,{key:`${e.id}-${e.type}`,itemProps:a(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:v.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:y})))))}function cp(e){const t=(0,a.startsWith)(e,"#");return(0,Va.isURL)(e)||e&&e.includes("www.")||t}const up=()=>Promise.resolve([]),dp=e=>{let t="URL";const n=(0,Va.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,a.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Va.prependHTTP)(e):e,type:t}])};const mp=()=>Promise.resolve([]),pp=(0,l.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=a.noop,onChange:u=a.noop,onSelect:d=a.noop,showSuggestions:m=!0,renderSuggestions:f=(e=>(0,l.createElement)(ap,e)),fetchSuggestions:h=null,allowDirectEntry:b=!0,showInitialSuggestions:v=!1,suggestionsQuery:k={},withURLSuggestion:_=!0,createSuggestionButtonText:y},E)=>{const C=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?dp:up;return(0,l.useCallback)(((t,{isInitialSuggestions:l})=>cp(t)?i(t,{isInitialSuggestions:l}):(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||cp(e)||!r?s:s.concat({title:e,url:e,type:ip})})(t,{...e,isInitialSuggestions:l},r,i,n,o)),[i,r,n])}(k,b,i,_),S=m?h||C:mp,w=(0,c.useInstanceId)(pp),[B,I]=(0,l.useState)(),x=async e=>{let t=e;if(ip!==e.type)(b||t&&Object.keys(t).length>=1)&&d({...(0,a.omit)(n,"id","url"),...t},t);else try{var o;t=await s(e.title),null!==(o=t)&&void 0!==o&&o.url&&d(t)}catch(e){}};return(0,l.createElement)("div",null,(0,l.createElement)(np,{className:o,value:e,onChange:(e,t)=>{u(e),I(t)},placeholder:null!=r?r:(0,g.__)("Search or type url"),__experimentalRenderSuggestions:m?t=>f({...t,instanceId:w,withCreateSuggestion:i,currentInputValue:e,createSuggestionButtonText:y,suggestionsQuery:k,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),x(e)}}):null,__experimentalFetchLinkSuggestions:S,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:t=>{x(t||B||{url:e})},ref:E}),t)}));var fp=pp;const{Slot:gp,Fill:hp}=(0,m.createSlotFill)("BlockEditorLinkControlViewer");function bp(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 vp({value:e,onEditClick:t,hasRichPreviews:n=!1}){const o=n?null==e?void 0:e.url:null,{richData:r,isFetching:i}=function(e){const[t,n]=(0,l.useReducer)(bp,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,l.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}(o),a=r&&Object.keys(r).length,c=e&&(0,Va.filterURLForDisplay)((0,Va.safeDecodeURI)(e.url),16)||"";return(0,l.createElement)("div",{"aria-label":(0,g.__)("Currently selected"),"aria-selected":"true",className:s()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":a,"is-fetching":!!i,"is-preview":!0})},(0,l.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,l.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,l.createElement)("span",{className:s()("block-editor-link-control__search-item-icon",{"is-image":null==r?void 0:r.icon})},null!=r&&r.icon?(0,l.createElement)("img",{src:null==r?void 0:r.icon,alt:""}):(0,l.createElement)(ro,{icon:rp})),(0,l.createElement)("span",{className:"block-editor-link-control__search-item-details"},(0,l.createElement)(m.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},(null==r?void 0:r.title)||(null==e?void 0:e.title)||c),(null==e?void 0:e.url)&&(0,l.createElement)("span",{className:"block-editor-link-control__search-item-info"},c))),(0,l.createElement)(m.Button,{variant:"secondary",onClick:()=>t(),className:"block-editor-link-control__search-item-action"},(0,g.__)("Edit")),(0,l.createElement)(gp,{fillProps:e})),(a&&((null==r?void 0:r.image)||(null==r?void 0:r.description))||i)&&(0,l.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==r?void 0:r.image)||i)&&(0,l.createElement)("div",{"aria-hidden":!(null!=r&&r.image),className:s()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=r&&r.image)})},(null==r?void 0:r.image)&&(0,l.createElement)("img",{src:null==r?void 0:r.image,alt:""})),((null==r?void 0:r.description)||i)&&(0,l.createElement)("div",{"aria-hidden":!(null!=r&&r.description),className:s()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=r&&r.description)})},(null==r?void 0:r.description)&&(0,l.createElement)(m.__experimentalText,{truncate:!0,numberOfLines:"2"},r.description))))}function kp({searchInputPlaceholder:e,value:t,settings:n=sp,onChange:o=a.noop,onRemove:r,noDirectEntry:i=!1,showSuggestions:s=!0,showInitialSuggestions:c,forceIsEditingLink:u,createSuggestion:d,withCreateSuggestion:p,inputValue:f="",suggestionsQuery:h={},noURLSuggestion:b=!1,createSuggestionButtonText:v,hasRichPreviews:k=!1}){void 0===p&&d&&(p=!0);const _=(0,l.useRef)(!0),y=(0,l.useRef)(),[E,C]=(0,l.useState)(t&&t.url||""),S=f||E,[w,B]=(0,l.useState)(void 0!==u?u:!t||!t.url),I=(0,l.useRef)(!1);function x(){var e;I.current=!(null===(e=y.current)||void 0===e||!e.contains(y.current.ownerDocument.activeElement)),B(!1)}(0,l.useEffect)((()=>{void 0!==u&&u!==w&&B(u)}),[u]),(0,l.useEffect)((()=>{_.current?_.current=!1:((wi.focus.focusable.find(y.current)[0]||y.current).focus(),I.current=!1)}),[w]);const{createPage:T,isCreatingPage:N,errorMessage:L}=function(e){const t=(0,l.useRef)(),[n,o]=(0,l.useState)(!1),[r,i]=(0,l.useState)(null);return(0,l.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(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 i(e.message||(0,g.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(d),P=()=>{S!==(null==t?void 0:t.url)&&o({url:S}),x()},R=r&&t&&!w&&!N,A=!(null==n||!n.length);return(0,l.createElement)("div",{tabIndex:-1,ref:y,className:"block-editor-link-control"},N&&(0,l.createElement)("div",{className:"block-editor-link-control__loading"},(0,l.createElement)(m.Spinner,null)," ",(0,g.__)("Creating"),"…"),(w||!t)&&!N&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},(0,l.createElement)(fp,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:S,withCreateSuggestion:p,onCreateSuggestion:T,onChange:C,onSelect:e=>{o(e),x()},showInitialSuggestions:c,allowDirectEntry:!i,showSuggestions:s,suggestionsQuery:h,withURLSuggestion:!b,createSuggestionButtonText:v},(0,l.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,l.createElement)(m.Button,{onClick:()=>P(),onKeyDown:e=>{const{keyCode:t}=e;t===kl.ENTER&&(e.preventDefault(),P())},label:(0,g.__)("Submit"),icon:Jm,className:"block-editor-link-control__search-submit"})))),L&&(0,l.createElement)(m.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},L)),t&&!w&&!N&&(0,l.createElement)(vp,{key:null==t?void 0:t.url,value:t,onEditClick:()=>B(!0),hasRichPreviews:k}),(A||R)&&(0,l.createElement)("div",{className:"block-editor-link-control__tools"},(0,l.createElement)(ep,{value:t,settings:n,onChange:o}),R&&(0,l.createElement)(m.Button,{className:"block-editor-link-control__unlink",isDestructive:!0,variant:"link",onClick:r},(0,g.__)("Unlink"))))}kp.ViewerFill=hp;var _p=kp;const yp={position:"bottom right",isAlternate:!0};var Ep=()=>(0,l.createElement)(l.Fragment,null,["bold","italic","link","text-color"].map((e=>(0,l.createElement)(m.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,l.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(e=>0!==e.length&&(0,l.createElement)(m.ToolbarItem,null,(t=>(0,l.createElement)(m.DropdownMenu,{icon:Dc
65
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("More"),toggleProps:t,controls:(0,a.orderBy)(e.map((([{props:e}])=>e)),"title"),popoverProps:yp})))))),Cp=({inline:e,anchorRef:t})=>e?(0,l.createElement)(m.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,l.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,l.createElement)(m.ToolbarGroup,null,(0,l.createElement)(Ep,null)))):(0,l.createElement)(Xn,{group:"inline"},(0,l.createElement)(Ep,null));function Sp(){const{didAutomaticChange:e,getSettings:t}=(0,p.useSelect)(Hn);return(0,c.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==kl.DELETE&&o!==kl.BACKSPACE&&o!==kl.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function wp(e){return e.filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e))).map((e=>`<img src="${(0,uu.createBlobURL)(e)}">`)).join("")}var Bp=window.wp.shortcode;function Ip(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function xp(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Tp({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?Tp.EMPTY_ARRAY:e||t?e||(Lt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map((e=>`core/${e}`))):void 0}function Np({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o,onSplitMiddle:r,multilineTag:l}){if(!n||!o)return;const i=[],[s,a]=(0,Tt.split)(e),c=t.length>0;let u=-1;const d=(0,Tt.isEmpty)(s)&&!(0,Tt.isEmpty)(a);c&&(0,Tt.isEmpty)(s)||(i.push(o((0,Tt.toHTMLString)({value:s,multilineTag:l}),!d)),u+=1),c?(i.push(...t),u+=t.length):r&&i.push(r()),(c||r)&&(0,Tt.isEmpty)(a)||i.push(o((0,Tt.toHTMLString)({value:a,multilineTag:l}),d)),n(i,c?u:1,c?-1:0)}function Lp(e){const t=(0,l.useRef)(e);return t.current=e,(0,c.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:r,value:l,formatTypes:i,tagName:s,onReplace:a,onSplit:c,onSplitMiddle:u,__unstableEmbedURLOnPaste:m,multilineTag:p,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let b="",v="";try{b=h.getData("text/plain"),v=h.getData("text/html")}catch(e){try{v=h.getData("Text")}catch(e){return}}if(v=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",b),o)return void r((0,Tt.insert)(l,b));const k=i.reduce(((e,{__unstablePasteRule:t})=>(t&&e===l&&(e=t(l,{html:v,plainText:b})),e)),l);if(k!==l)return void r(k);const _=[...(0,wi.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=(0,Tt.create)({html:v,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:f});return Ip(e,l.activeFormats),void r((0,Tt.insert)(l,e))}if(g)return void r((0,Tt.insert)(l,(0,Tt.create)({text:b})));if(_&&_.length&&!v){const e=(0,d.pasteHandler)({HTML:wp(_),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(a&&(0,Tt.isEmpty)(l)?a(e):Np({value:l,pastedBlocks:e,onReplace:a,onSplit:c,onSplitMiddle:u,multilineTag:p}))}let y=a&&c?"AUTO":"INLINE";var E;"AUTO"===y&&(0,Tt.isEmpty)(l)&&(E=b,(0,Bp.regexp)(".*").test(E))&&(y="BLOCKS"),m&&(0,Tt.isEmpty)(l)&&(0,Va.isURL)(b.trim())&&(y="BLOCKS");const C=(0,d.pasteHandler)({HTML:v,plainText:b,mode:y,tagName:s,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,Tt.create)({html:C});Ip(e,l.activeFormats),p&&(e=(0,Tt.replace)(e,/\n+/g,Tt.__UNSTABLE_LINE_SEPARATOR)),r((0,Tt.insert)(l,e))}else C.length>0&&(a&&(0,Tt.isEmpty)(l)?a(C,C.length-1,-1):Np({value:l,pastedBlocks:C,onReplace:a,onSplit:c,onSplitMiddle:u,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function Pp(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,p.useDispatch)(Hn),o=(0,l.useRef)(e);return o.current=e,(0,c.useRefEffect)((e=>{function r(){const{value:e,onReplace:t}=o.current;if(!t)return;const{start:r,text:l}=e;if(" "!==l.slice(r-1,r))return;const i=l.slice(0,r).trim(),s=(0,d.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),a=(0,d.findTransform)(s,(({prefix:e})=>i===e));if(!a)return;const c=(0,Tt.toHTMLString)({value:(0,Tt.slice)(e,r,l.length)});t([a.transform(c)]),n()}function l(e){const{inputType:l,type:i}=e,{value:s,onChange:a,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==l&&"compositionend"!==i)return;c&&r&&r();const d=u.reduce(((e,{__unstableInputRule:t})=>(t&&(e=t(e)),e)),s);d!==s&&(t(),a({...d,activeFormats:s.activeFormats}),n())}return e.addEventListener("input",l),e.addEventListener("compositionend",l),()=>{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function Rp(e){const{__unstableMarkAutomaticChange:t}=(0,p.useDispatch)(Hn),n=(0,l.useRef)(e);return n.current=e,(0,c.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:r,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a,onChange:c,disableLineBreaks:u,onSplitAtEnd:m}=n.current;if(e.keyCode!==kl.ENTER)return;e.preventDefault();const p={...r};p.formats=o(r);const f=l&&i;if(l){const e=(0,d.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),n=(0,d.findTransform)(e,(e=>e.regExp.test(p.text)));n&&(l([n.transform({content:p.text})]),t())}if(a)e.shiftKey?u||c((0,Tt.insert)(p,"\n")):f&&(0,Tt.__unstableIsEmptyLine)(p)?Np({value:p,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a}):c((0,Tt.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:o}=p,r=m&&n===o&&o===t.length;e.shiftKey||!f&&!r?u||c((0,Tt.insert)(p,"\n")):!f&&r?m():f&&Np({value:p,onReplace:l,onSplit:i,onSplitMiddle:s,multilineTag:a})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function Ap(e){return e(Tt.store).getFormatTypes()}Tp.EMPTY_ARRAY=[];const Mp=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Dp({formatTypes:e,onChange:t,onFocus:n,value:o,forwardedRef:r}){return e.map((e=>{const{name:i,edit:s}=e;if(!s)return null;const a=(0,Tt.getActiveFormat)(o,i),c=void 0!==a,u=(0,Tt.getActiveObject)(o),d=void 0!==u&&u.type===i;return(0,l.createElement)(s,{key:i,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:d,activeObjectAttributes:d&&u.attributes||{},value:o,onChange:t,onFocus:n,contentRef:r})}))}const Op=(0,l.forwardRef)((function e({children:t,tagName:n="div",value:o="",onChange:i,isSelected:u,multiline:f,inlineToolbar:g,wrapperClassName:h,autocompleters:b,onReplace:v,placeholder:k,allowedFormats:_,formattingControls:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:N,__unstableEmbedURLOnPaste:L,__unstableDisableFormats:P,disableLineBreaks:R,unstableOnFocus:A,__unstableAllowPrefixTransformations:M,...D},O){const F=(0,c.useInstanceId)(e);x=x||F,D=function(e){return(0,a.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(D);const V=(0,l.useRef)(),{clientId:H}=Wn(),{selectionStart:z,selectionEnd:U,isSelected:G,disabled:W}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Hn),l=t(),i=n();let s;return void 0===u?s=l.clientId===H&&l.attributeKey===x:u&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:K}=(0,p.useDispatch)(Hn),j=xp(f),$=Tp({allowedFormats:_,formattingControls:y,disableFormats:P}),q=!$||$.length>0;let Y=o,X=i;Array.isArray(o)&&(Y=d.children.toHTML(o),X=e=>i(d.children.fromDOM((0,Tt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,l.useCallback)(((e,t)=>{K(H,x,e,t)}),[H,x]),{formatTypes:Z,prepareHandlers:J,valueHandlers:ee,changeHandlers:te,dependencies:ne}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,p.useSelect)(Ap,[]),i=(0,l.useMemo)((()=>r.filter((({name:e,tagName:t})=>!(o&&!o.includes(e)||n&&Mp.has(t))))),[r,o,Mp]),s=(0,p.useSelect)((n=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),o)),{})),[i,e,t]),a=(0,p.useDispatch)(),c=[],u=[],d=[],m=[];return i.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=s[n.name],r=n.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(r):c.push(r);for(const e in o)m.push(o[e])}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e})),d.push(n.__experimentalCreateOnChangeEditableValue({...s[n.name]||{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:i,prepareHandlers:c,valueHandlers:u,changeHandlers:d,dependencies:m}}({clientId:H,identifier:x,withoutInteractiveFormatting:E,allowedFormats:$});function oe(e){return Z.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,Tt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:re,onChange:le,onFocus:ie,ref:se}=(0,Tt.__unstableUseRichText)({value:Y,onChange(e,{__unstableFormats:t,__unstableText:n}){X(e),Object.values(te).forEach((e=>{e(t,n)}))},selectionStart:z,selectionEnd:U,onSelectionChange:Q,placeholder:k,__unstableIsSelected:G,__unstableMultilineTag:j,__unstableDisableFormats:P,preserveWhiteSpace:T,__unstableDependencies:[...ne,n],__unstableAfterParse:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:oe,__unstableAddInvisibleFormats:function(e){return J.reduce(((t,n)=>n(t,e.text)),e.formats)}}),ae=function(e){return(0,m.__unstableUseAutocompleteProps)({...e,completers:Dd(e)})}({onReplace:v,completers:b,record:re,onChange:le});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=(0,p.useSelect)(Hn),{enterFormattedText:o,exitFormattedText:r}=(0,p.useDispatch)(Hn);(0,l.useEffect)((()=>{t?n()||o():n()&&r()}),[t])}({value:re}),function({html:e,value:t}){const n=(0,l.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=(0,p.useDispatch)(Hn);(0,l.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:Y,value:re});const ce=n,ue=(0,l.createElement)(l.Fragment,null,G&&t&&t({value:re,onChange:le,onFocus:ie}),G&&(0,l.createElement)(Dp,{value:re,onChange:le,onFocus:ie,formatTypes:Z,forwardedRef:V}),G&&q&&(0,l.createElement)(Cp,{inline:g,anchorRef:V.current}),(0,l.createElement)(ce,r({role:"textbox","aria-multiline":!0,"aria-label":k},D,ae,{ref:(0,c.useMergeRefs)([ae.ref,D.ref,se,Pp({value:re,onChange:le,__unstableAllowPrefixTransformations:M,formatTypes:Z,onReplace:v}),(0,c.useRefEffect)((e=>{function t(e){(kl.isKeyboardEvent.primary(e,"z")||kl.isKeyboardEvent.primary(e,"y")||kl.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),Sp(),Lp({isSelected:G,disableFormats:P,onChange:le,value:re,formatTypes:Z,tagName:n,onReplace:v,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:L,multilineTag:j,preserveWhiteSpace:T,pastePlainText:N}),Rp({removeEditorOnlyFormats:oe,value:re,onReplace:v,onSplit:w,onSplitMiddle:I,multilineTag:j,onChange:le,disableLineBreaks:R,onSplitAtEnd:B}),V,O]),contentEditable:!W||void 0,suppressContentEditableWarning:!W,className:s()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:A,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===kl.DELETE||t===kl.BACKSPACE)){const{start:n,end:o,text:r}=re,l=t===kl.BACKSPACE,i=re.activeFormats&&!!re.activeFormats.length;if(!(0,Tt.isCollapsed)(re)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&(0,Tt.isEmpty)(re)&&l&&C(!l),e.preventDefault()}}})));if(!h)return ue;Lt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const de=s()("block-editor-rich-text",h);return(0,l.createElement)("div",{className:de},ue)}));Op.Content=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&(e=d.children.toHTML(e));const r=xp(n);!e&&r&&(e=`<${r}></${r}>`);const i=(0,l.createElement)(l.RawHTML,null,e);return t?(0,l.createElement)(t,(0,a.omit)(o,["format"]),i):i},Op.isEmpty=e=>!e||0===e.length;var Fp=Op;function Vp({value:e,onChange:t}){return(0,l.createElement)(lm,null,(0,l.createElement)(Fp,{value:e,onChange:t,placeholder:(0,g.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Hp=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),zp=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"})),Up=(0,m.withFilters)("editor.MediaUpload")((()=>null)),Gp=function({fallback:e=null,children:t}){return(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn);return!!t().mediaUpload}),[])?t:e},Wp=(0,c.compose)([(0,p.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(Pa.store);return{createNotice:t,removeNotice:n}})),(0,m.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,allowedTypes:n,accept:o,onSelect:r,onSelectURL:i,onFilesUpload:s=a.noop,name:c=(0,g.__)("Replace"),createNotice:u,removeNotice:d})=>{const[f,h]=(0,l.useState)(e),b=(0,p.useSelect)((e=>e(Hn).getSettings().mediaUpload),[]),v=(0,l.createRef)(),k=(0,a.uniqueId)("block-editor/media-replace-flow/error-notice/"),_=e=>{const t=document.createElement("div");t.innerHTML=(0,l.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{u("error",n,{speak:!0,id:k,isDismissible:!0})}),1e3)},y=e=>{r(e),h(e.url),(0,xt.speak)((0,g.__)("The media file has been replaced")),d(k)},E=e=>{e.keyCode===kl.DOWN&&(e.preventDefault(),e.target.click())};return(0,l.createElement)(m.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,l.createElement)(m.ToolbarButton,{ref:v,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:E},c),renderContent:({onClose:e})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,l.createElement)(Up,{value:t,onSelect:e=>y(e),allowedTypes:n,render:({open:e})=>(0,l.createElement)(m.MenuItem,{icon:Hp,onClick:e},(0,g.__)("Open Media Library"))}),(0,l.createElement)(Gp,null,(0,l.createElement)(m.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;s(t),b({allowedTypes:n,filesList:t,onFileChange:([e])=>{y(e)},onError:_})})(e)},accept:o,render:({openFileDialog:e})=>(0,l.createElement)(m.MenuItem,{icon:zp,onClick:()=>{e()}},(0,g.__)("Upload"))}))),i&&(0,l.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,g.__)("Current media URL:")),(0,l.createElement)(_p,{value:{url:f},settings:[],showSuggestions:!1,onChange:({url:e})=>{h(e),i(e),v.current.focus()}})))})})),Kp=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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"}));function jp({url:e,urlLabel:t,className:n}){const o=s()(n,"block-editor-url-popover__link-viewer-url");return e?(0,l.createElement)(m.ExternalLink,{className:o,href:e},t||(0,Va.filterURLForDisplay)((0,Va.safeDecodeURI)(e))):(0,l.createElement)("span",{className:o})}function $p({additionalControls:e,children:t,renderSettings:n,position:o="bottom center",focusOnMount:i="firstElement",...s}){const[a,c]=(0,l.useState)(!1),u=!!n&&a;return(0,l.createElement)(m.Popover,r({className:"block-editor-url-popover",focusOnMount:i,position:o},s),(0,l.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,l.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,l.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:Dc,label:(0,g.__)("Link settings"),onClick:()=>{c(!a)},"aria-expanded":a})),u&&(0,l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!u&&(0,l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}$p.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...i}){return(0,l.createElement)("form",r({className:s()("block-editor-url-popover__link-editor",t)},i),(0,l.createElement)(np,{value:o,onChange:n,autocompleteRef:e}),(0,l.createElement)(m.Button,{icon:Jm,label:(0,g.__)("Apply"),type:"submit"}))},$p.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:i,...a}){return(0,l.createElement)("div",r({className:s()("block-editor-url-popover__link-viewer",e)},a),(0,l.createElement)(jp,{url:o,urlLabel:i,className:t}),n&&(0,l.createElement)(m.Button,{icon:Kp,label:(0,g.__)("Edit"),onClick:n}))};var qp=$p;const Yp=({src:e,onChange:t,onSubmit:n,onClose:o})=>(0,l.createElement)(qp,{onClose:o},(0,l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":(0,g.__)("URL"),placeholder:(0,g.__)("Paste or type URL"),onChange:t,value:e}),(0,l.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Jm,label:(0,g.__)("Apply"),type:"submit"})));var Xp=(0,m.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:i,notices:c,isAppender:u,accept:d,addToGallery:f,multiple:h=!1,handleUpload:b=!0,dropZoneUIOnly:v,disableDropZone:k,disableMediaButtons:_,onError:y,onSelect:E,onCancel:C,onSelectURL:S,onDoubleClick:w,onFilesPreUpload:B=a.noop,onHTMLDrop:I=a.noop,children:x}){const T=(0,p.useSelect)((e=>{const{getSettings:t}=e(Hn);return t().mediaUpload}),[]),[N,L]=(0,l.useState)(""),[P,R]=(0,l.useState)(!1);(0,l.useEffect)((()=>{var t;L(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")}),[null==e?void 0:e.src]);const A=e=>{L(e.target.value)},M=()=>{R(!0)},D=()=>{R(!1)},O=e=>{e.preventDefault(),N&&S&&(S(N),D())},F=n=>{if(!b)return E(n);let o;if(B(n),h)if(f){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));E(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=E;else o=([e])=>E(e);T({allowedTypes:t,filesList:n,onFileChange:o,onError:y})},V=e=>{F(e.target.files)},H=(e,a)=>{let{instructions:d,title:p}=r;if(T||S||(d=(0,g.__)("To edit this block, you need permission to upload media.")),void 0===d||void 0===p){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===d&&T&&(d=(0,g.__)("Upload a media file or pick one from your media library."),r?d=(0,g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?d=(0,g.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(d=(0,g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===p&&(p=(0,g.__)("Media"),r?p=(0,g.__)("Audio"):l?p=(0,g.__)("Image"):i&&(p=(0,g.__)("Video")))}const f=s()("block-editor-media-placeholder",n,{"is-appender":u});return(0,l.createElement)(m.Placeholder,{icon:o,label:p,instructions:d,className:f,notices:c,onClick:a,onDoubleClick:w,preview:i},e,x)},z=()=>k?null:(0,l.createElement)(m.DropZone,{onFilesDrop:F,onHTMLDrop:I}),U=()=>C&&(0,l.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,g.__)("Cancel"),variant:"link",onClick:C},(0,g.__)("Cancel")),G=()=>S&&(0,l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,l.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:M,isPressed:P,variant:"tertiary"},(0,g.__)("Insert from URL")),P&&(0,l.createElement)(Yp,{src:N,onChange:A,onSubmit:O,onClose:D}));return v||_?(v&&Lt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,l.createElement)(Gp,null,z())):(0,l.createElement)(Gp,{fallback:H(G())},(()=>{const n=(0,l.createElement)(Up,{addToGallery:f,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:E,allowedTypes:t,value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:({open:e})=>(0,l.createElement)(m.Button,{variant:"tertiary",onClick:()=>{e()}},(0,g.__)("Media Library"))});if(T&&u)return(0,l.createElement)(l.Fragment,null,z(),(0,l.createElement)(m.FormFileUpload,{onChange:V,accept:d,multiple:h,render:({openFileDialog:e})=>{const t=(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.Button,{variant:"primary",className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},(0,g.__)("Upload")),n,G(),U());return H(t,e)}}));if(T){const e=(0,l.createElement)(l.Fragment,null,z(),(0,l.createElement)(m.FormFileUpload,{variant:"primary",className:s()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:d,multiple:h},(0,g.__)("Upload")),n,G(),U());return H(e)}return H(n)})())})),Qp=({colorSettings:e,...t})=>{const n=e.map((({value:e,onChange:t,...n})=>({...n,colorValue:e,onColorChange:t})));return(0,l.createElement)(Fr,r({settings:n,gradients:[],disableCustomGradients:!0},t))};const Zp=(0,l.forwardRef)(((e,t)=>(0,l.createElement)(Fp,r({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));Zp.Content=({value:e="",tagName:t="div",...n})=>(0,l.createElement)(t,n,e);var Jp=Zp,ef=(0,l.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,l.createElement)(Jp,r({ref:n},t));const{className:o,onChange:i,...a}=t;return(0,l.createElement)(Gi.Z,r({ref:n,className:s()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},a))}));function tf({property:e,viewport:t,desc:n}){const o=(0,c.useInstanceId)(tf),r=n||(0,g.sprintf)(
66
  /* translators: 1: property name. 2: viewport name. */
67
- (0,g._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."),e,t.label);return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,l.createElement)(m.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}var nf=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:i,renderResponsiveControls:a,isResponsive:c=!1,defaultLabel:u={id:"all",
68
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
69
- label:(0,g.__)("All")},viewports:d=[{id:"small",label:(0,g.__)("Small screens")},{id:"medium",label:(0,g.__)("Medium screens")},{id:"large",label:(0,g.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const p=o||(0,g.sprintf)(
70
  /* 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) */
71
- (0,g.__)("Use the same %s on all screensizes."),n),f=(0,g.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=i((0,l.createElement)(tf,{property:n,viewport:u}),u);
72
- /* translators: 'Help text for the responsive mode toggle control.' */return(0,l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,l.createElement)(m.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:p,checked:!c,onChange:r,help:f}),(0,l.createElement)("div",{className:s()("block-editor-responsive-block-control__group",{"is-responsive":c})},!c&&h,c&&(a?a(d):d.map((e=>(0,l.createElement)(l.Fragment,{key:e.id},i((0,l.createElement)(tf,{property:n,viewport:e}),e))))))))};function of({character:e,type:t,onUse:n}){return(0,c.useKeyboardShortcut)(kl.rawShortcut[t](e),(()=>(n(),!1)),{bindGlobal:!0}),null}function rf({name:e,shortcutType:t,shortcutCharacter:n,...o}){let i,s="RichText.ToolbarControls";return e&&(s+=`.${e}`),t&&n&&(i=kl.displayShortcut[t](n)),(0,l.createElement)(m.Fill,{name:s},(0,l.createElement)(m.ToolbarButton,r({},o,{shortcut:i})))}class lf extends l.Component{constructor(){super(...arguments),this.onInput=this.onInput.bind(this)}onInput(e){e.inputType===this.props.inputType&&this.props.onInput()}componentDidMount(){document.addEventListener("input",this.onInput,!0)}componentWillUnmount(){document.removeEventListener("input",this.onInput,!0)}render(){return null}}const sf=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,l.createElement)(m.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 af=(0,l.forwardRef)((function(e,t){const n=(0,p.useSelect)((e=>e(Hn).isNavigationMode()),[]),{setNavigationMode:o}=(0,p.useDispatch)(Hn),i=e=>{o("edit"!==e)};return(0,l.createElement)(m.Dropdown,{renderToggle:({isOpen:o,onToggle:i})=>(0,l.createElement)(m.Button,r({},e,{ref:t,icon:n?sf:Kp,"aria-expanded":o,"aria-haspopup":"true",onClick:i
73
- /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("Tools")})),position:"bottom right",renderContent:()=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.NavigableMenu,{role:"menu","aria-label":(0,g.__)("Tools")},(0,l.createElement)(m.MenuItemsChoice,{value:n?"select":"edit",onSelect:i,choices:[{value:"edit",label:(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ro,{icon:Kp}),(0,g.__)("Edit"))},{value:"select",label:(0,l.createElement)(l.Fragment,null,sf,(0,g.__)("Select"))}]})),(0,l.createElement)("div",{className:"block-editor-tool-selector__help"},(0,g.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function cf({units:e,...t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"],units:e});return(0,l.createElement)(m.__experimentalUnitControl,r({units:n},t))}var uf=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 df extends l.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,g.__)("Edit link"):(0,g.__)("Insert link");return(0,l.createElement)("div",{className:"block-editor-url-input__button"},(0,l.createElement)(m.Button,{icon:pr,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,l.createElement)(m.Button,{className:"block-editor-url-input__back",icon:uf,label:(0,g.__)("Close"),onClick:this.toggle}),(0,l.createElement)(np,{value:e||"",onChange:t}),(0,l.createElement)(m.Button,{icon:Jm,label:(0,g.__)("Submit"),type:"submit"}))))}}var mf=df,pf=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.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 ff="none",gf="custom",hf="media",bf="attachment",vf=["noreferrer","noopener"],kf=(0,l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,l.createElement)(m.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,l.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),_f=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:i,linkTarget:s,linkClass:c,rel:u})=>{const[d,p]=(0,l.useState)(!1),f=(0,l.useCallback)((()=>{p(!0)})),[h,b]=(0,l.useState)(!1),[v,k]=(0,l.useState)(null),_=(0,l.useRef)(null),y=(0,l.useCallback)((()=>{e!==hf&&e!==bf||k(""),b(!0)})),E=(0,l.useCallback)((()=>{b(!1)})),C=(0,l.useCallback)((()=>{k(null),E(),p(!1)})),S=e=>{let t=e;return void 0===e||(0,a.isEmpty)(t)||(0,a.isEmpty)(t)||((0,a.each)(vf,(e=>{const n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),(0,a.isEmpty)(t)&&(t=void 0)),t},w=(0,l.useCallback)((()=>e=>{const t=_.current;t&&t.contains(e.target)||(p(!1),k(null),E())})),B=(0,l.useCallback)((()=>e=>{if(v){var n;const e=(null===(n=x().find((e=>e.url===v)))||void 0===n?void 0:n.linkDestination)||gf;t({href:v,linkDestination:e})}E(),k(null),e.preventDefault()})),I=(0,l.useCallback)((()=>{t({linkDestination:ff,href:""})})),x=()=>{const e=[{linkDestination:hf,title:(0,g.__)("Media File"),url:"image"===o?r:void 0,icon:kf}];return"image"===o&&i&&e.push({linkDestination:bf,title:(0,g.__)("Attachment Page"),url:"image"===o?i:void 0,icon:(0,l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,l.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,l.createElement)(m.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},T=(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.ToggleControl,{label:(0,g.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||u?S(u):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===s}),(0,l.createElement)(m.TextControl,{label:(0,g.__)("Link Rel"),value:S(u)||"",onChange:e=>{t({rel:e})}}),(0,l.createElement)(m.TextControl,{label:(0,g.__)("Link CSS Class"),value:c||"",onChange:e=>{t({linkClass:e})}})),N=null!==v?v:n,L=((0,a.find)(x(),["linkDestination",e])||{}).title;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.ToolbarButton,{icon:pr,className:"components-toolbar__control",label:n?(0,g.__)("Edit link"):(0,g.__)("Insert link"),"aria-expanded":d,onClick:f}),d&&(0,l.createElement)(qp,{onFocusOutside:w(),onClose:C,renderSettings:()=>T,additionalControls:!N&&(0,l.createElement)(m.NavigableMenu,null,(0,a.map)(x(),(e=>(0,l.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{k(null),(e=>{const n=x();let o;o=e?((0,a.find)(n,(t=>t.url===e))||{linkDestination:gf}).linkDestination:ff,t({linkDestination:o,href:e})})(e.url),E()}},e.title))))},(!n||h)&&(0,l.createElement)(qp.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:N,onChangeInputValue:k,onSubmit:B(),autocompleteRef:_}),n&&!h&&(0,l.createElement)(l.Fragment,null,(0,l.createElement)(qp.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:y,urlLabel:L}),(0,l.createElement)(m.Button,{icon:pf,label:(0,g.__)("Remove link"),onClick:I}))))};var yf=(0,l.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(O.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function Ef({children:e,className:t,isEnabled:n=!0,deviceType:o,setDeviceType:r}){if((0,c.useViewportMatch)("small","<"))return null;const i={className:s()(t,"block-editor-post-preview__dropdown-content"),position:"bottom left"},a={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!n,
74
  /* translators: button label text should, if possible, be under 16 characters. */
75
- children:(0,g.__)("Preview")};return(0,l.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:a,icon:null},(()=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(m.MenuGroup,null,(0,l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Desktop"),icon:"Desktop"===o&&yf},(0,g.__)("Desktop")),(0,l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Tablet"),icon:"Tablet"===o&&yf},(0,g.__)("Tablet")),(0,l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Mobile"),icon:"Mobile"===o&&yf},(0,g.__)("Mobile"))),e)))}function Cf(e){const[t,n]=(0,l.useState)(window.innerWidth);(0,l.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 Sf=(0,p.withSelect)((e=>({selectedBlockClientId:e(Hn).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=Wr(e);return e?(0,l.createElement)(m.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,g.__)("Skip to the selected block")):null})),wf=window.wp.wordcount,Bf=(0,p.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Hn);return{blocks:t()}}))((function({blocks:e}){const t=(0,wf.count)((0,d.serialize)(e),"words");return(0,l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,l.createElement)(ws,{icon:qc,showColors:!0}),(0,l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,g.sprintf)(
76
  /* translators: %d: number of blocks */
77
- (0,g._n)("%d block","%d blocks",e.length),e.length)),(0,l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,g.sprintf)(
78
  /* translators: %d: number of words */
79
- (0,g._n)("%d word","%d words",t),t))))}));function If({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,p.useSelect)((t=>{var n,o;const r=t(Hn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==r||null===(n=r.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(o=null==r?void 0:r.onChange)&&void 0!==o?o:null,styles:t(d.store).getBlockStyles(e)}}),[e]),r=(0,l.useMemo)((()=>[{label:(0,g.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),i=(0,l.useCallback)((t=>{n(e,t)}),[e,n]);return n&&(0,l.createElement)(m.SelectControl,{options:r,value:t||"",label:(0,g.__)("Default Style"),onChange:i})}const xf=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:o})=>{const r=Ic(e);return(0,l.createElement)("div",{className:"block-editor-block-inspector"},(0,l.createElement)(Bs,r),(0,l.createElement)(Lm,{blockClientId:e}),n&&(0,l.createElement)("div",null,(0,l.createElement)(m.PanelBody,{title:(0,g.__)("Styles")},(0,l.createElement)(Jc,{clientId:e}),(0,d.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,l.createElement)(If,{blockName:t}))),(0,l.createElement)(Ro.Slot,{bubblesVirtually:o}),(0,l.createElement)("div",null,(0,l.createElement)(Tf,{bubblesVirtually:o})),(0,l.createElement)(Sf,{key:"back"}))},Tf=({bubblesVirtually:e})=>{const t=(0,m.__experimentalUseSlot)(Po.slotName);return Boolean(t.fills&&t.fills.length)?(0,l.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,g.__)("Advanced"),initialOpen:!1},(0,l.createElement)(Ro.Slot,{__experimentalGroup:"advanced",bubblesVirtually:e})):null};var Nf=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:o,selectedBlockName:r,selectedBlockClientId:i,blockType:s}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Hn),{getBlockStyles:r}=e(d.store),l=t(),i=l&&o(l),s=i&&(0,d.getBlockType)(i),a=i&&r(i);return{count:n(),selectedBlockClientId:l,selectedBlockName:i,blockType:s,hasBlockStyles:a&&a.length>0}}),[]);if(n>1)return(0,l.createElement)("div",{className:"block-editor-block-inspector"},(0,l.createElement)(Bf,null),(0,l.createElement)(Ro.Slot,{bubblesVirtually:t}));const a=r===(0,d.getUnregisteredTypeHandlerName)();return s&&i&&!a?(0,l.createElement)(xf,{clientId:i,blockName:s.name,hasBlockStyles:o,bubblesVirtually:t}):e?(0,l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,g.__)("No block selected.")):null};function Lf({children:e,__unstableContentRef:t,...n}){const o=(0,c.useViewportMatch)("medium"),i=(0,p.useSelect)((e=>e(Hn).getSettings().hasFixedToolbar),[]),s=(0,Fs.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:u,getBlockRootClientId:d}=(0,p.useSelect)(Hn),{duplicateBlocks:f,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,moveBlocksUp:k,moveBlocksDown:_}=(0,p.useDispatch)(Hn);return(0,l.createElement)("div",r({},n,{onKeyDown:function(e){if(s("core/block-editor/move-up",e)){const t=u();if(t.length){e.preventDefault();const n=d((0,a.first)(t));k(t,n)}}else if(s("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=d((0,a.first)(t));_(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),f(t))}else if(s("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),g(t))}else if(s("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),h((0,a.last)(t)))}else if(s("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),b((0,a.first)(t)))}else if(s("core/block-editor/delete-multi-selection",e)){const t=u();t.length>1&&(e.preventDefault(),g(t))}else s("core/block-editor/unselect",e)&&u().length>1&&(e.preventDefault(),v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,l.createElement)(Cc,{__unstableContentRef:t},(i||!o)&&(0,l.createElement)(Nu,{isFixed:!0}),(0,l.createElement)(Au,{__unstableContentRef:t}),(0,l.createElement)(m.Popover.Slot,{name:"block-toolbar",ref:_c(t)}),e))}var Pf=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:i,onSelect:s=a.noop,shouldFocusBlock:c=!1}){const u=(0,p.useSelect)((n=>{const{getBlockRootClientId:o}=n(Hn);return e||o(t)||void 0}),[t,e]);return(0,l.createElement)(uc,{onSelect:s,rootClientId:u,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:i,shouldFocusBlock:c})};function Rf(){return null}Rf.Register=function(){const{registerShortcut:e}=(0,p.useDispatch)(Fs.store);return(0,l.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,g.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,g.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,g.__)("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,g.__)("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,g.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,g.__)("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,g.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,g.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,g.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,g.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Af=Rf;function Mf(){return Lt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const Df=new Set([kl.UP,kl.RIGHT,kl.DOWN,kl.LEFT,kl.ENTER,kl.BACKSPACE]);function Of(){const e=(0,p.useSelect)((e=>e(Hn).isTyping())),{stopTyping:t}=(0,p.useDispatch)(Hn);return(0,c.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 Ff(){const e=(0,p.useSelect)((e=>e(Hn).isTyping())),{startTyping:t,stopTyping:n}=(0,p.useDispatch)(Hn),o=Of(),r=(0,c.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let e;function t(t){const{target:o}=t;e=l.setTimeout((()=>{(0,wi.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==kl.ESCAPE&&t!==kl.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,wi.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Df.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,c.useMergeRefs)([o,r])}var Vf=function({children:e}){return(0,l.createElement)("div",{ref:Ff()},e)};function Hf(){return Lt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const zf=-1!==window.navigator.userAgent.indexOf("Trident"),Uf=new Set([kl.UP,kl.DOWN,kl.LEFT,kl.RIGHT]);function Gf(){const e=(0,p.useSelect)((e=>e(Hn).hasSelectedBlock()));return(0,c.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function s(){r||(r=o.requestAnimationFrame((()=>{m(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!p())return;const r=(0,wi.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(Uf.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const s=(0,wi.getScrollContainer)(t);if(!s)return;const a=s===n.body,c=a?o.scrollY:s.scrollTop,u=a?0:s.getBoundingClientRect().top,d=a?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=r);const m=a?o.innerHeight:s.clientHeight;i.top+i.height>u+m||i.top<u?i=r:a?o.scrollBy(0,l):s.scrollTop+=l}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),m()}function m(){p()&&(i=(0,wi.computeCaretRect)(o))}function p(){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 Wf=zf?e=>e.children:function({children:e}){return(0,l.createElement)("div",{ref:Gf(),className:"block-editor__typewriter"},e)};const Kf=(0,a.overEvery)([wi.isTextField,wi.focus.tabbable.isTabbableIndex]);function jf(){return(0,c.useRefEffect)((e=>{function t(t){if(t.target!==e)return;const n=wi.focus.focusable.find(e),o=(0,a.findLast)(n,Kf);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||((0,wi.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}}),[])}const $f=(0,l.createContext)({});function qf(e,t=""){var n;const o=(0,l.useContext)($f),{name:r}=Wn();t=t||r;const i=Boolean(null===(n=o[t])||void 0===n?void 0:n.has(e)),s=(0,l.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,t,e)),[o,t,e]);return[i,(0,l.useCallback)((({children:e})=>(0,l.createElement)($f.Provider,{value:s},e)),[s])]}function Yf(e){if(void 0===e)e=b.colors;else{const t=e.filter((e=>e.color));0===t.length?e=b.colors:t.length<e.length&&(e=t)}return e}function Xf(e){if(void 0===e)e=b.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=b.gradients:t.length<e.length&&(e=t)}return e}}(),(window.wp=window.wp||{}).blockEditor=o}();
1
+ !function(){var e={1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},7154:function(e){function t(){return e.exports=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},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},5354:function(e,t,n){var o=n(9489);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},7316:function(e){e.exports=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.exports.default=e.exports,e.exports.__esModule=!0},9489:function(e){function t(n,o){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,o)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},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 m=t[i-1];return i>1&&"string"==typeof m.value&&(m.added||m.removed)&&e.equals("",m.value)&&(t[i-2].value+=m.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,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],t,e,0);if(m[0].newPos+1>=a&&p+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=m[n-1],p=m[n+1],f=(p?p.newPos:0)-n;d&&(m[n-1]=void 0);var g=d&&d.newPos+1<a,h=p&&0<=f&&f<c;if(g||h){if(!g||h&&d.newPos<p.newPos?(l=r(p),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));m[n]=l}else m[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var g=f();if(g)return g}},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 m=o.isWindow(t),p=!(!m||!t.frameElement),f=o.offset(e),g=o.outerHeight(e),h=o.outerWidth(e),b=void 0,v=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;p&&(t=t.document.scrollingElement||t.document.body),m||p?(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+h-(S.left+w)+d,top:f.top+g-(S.top+B)+u},_=S):(b=o.offset(t),v=t.clientHeight,k=t.clientWidth,_={left:t.scrollLeft,top:t.scrollTop},y={left:f.left-(b.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:f.top-(b.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:f.left+h-(b.left+k+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:f.top+g-(b.top+v+(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 m=["margin","border","padding"];function p(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 g(e){return null!=e&&e==e.window}var h={};function b(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.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,m.slice(n),o)}u(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["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 v={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=b.apply(void 0,n):p(e,v,(function(){t=b.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);h["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[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:g,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(g(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(g(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},h)},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(3804),a=n(5697),c=n(9367),u=n(8303),d="autosize:resized",m=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(m,l({},e,{innerRef:t}))}))},4042:function(e,t,n){"use strict";var o=n(4857);t.Z=o.TextareaAutosize},8088:function(e,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=o(n(7154)),l=o(n(7316)),i=n(3804),s=o(i),a=o(n(5354)),c=o(n(1506)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(e,t){return u.und(e)||u.nul(e)?t:e}function m(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return u.fun(e)?e.apply(void 0,n):e}function f(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,l(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return r({to:t},e);var n=Object.keys(e).reduce((function(n,o){var l;return u.und(t[o])?r({},n,((l={})[o]=e[o],l)):n}),{});return r({to:t},n)}var g,h,b=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),v=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof b&&e.addChild(c(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof b&&e.removeChild(c(t))}))},t}return a(t,e),t}(b),k=function(e){function t(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(t=e.call.apply(e,[this].concat(o))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof b&&e.addChild(c(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof b&&e.removeChild(c(t))}))},t}a(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var o=this.payload[n];(!e||o instanceof b)&&(t[n]=o instanceof b?o[e?"getAnimatedValue":"getValue"]():o)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(b);function _(e,t){g={fn:e,transform:t}}function y(e){h=e}var E,C=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1};function S(e){E=e}var w=function(){return Date.now()};function B(e){e}var I,x,T=function(e){return e.current};function N(e){I=e}var L=function(e){function t(t,n){var o;return(o=e.call(this)||this).update=void 0,o.payload=t.style?r({},t,{style:I(t.style)}):t,o.update=n,o.attach(),o}return a(t,e),t}(k),P=!1,R=new Set,A=function e(){if(!P)return!1;var t=w(),n=R,o=Array.isArray(n),r=0;for(n=o?n:n[Symbol.iterator]();;){var l;if(o){if(r>=n.length)break;l=n[r++]}else{if((r=n.next()).done)break;l=r.value}for(var i=l,s=!1,a=0;a<i.configs.length;a++){for(var c=i.configs[a],u=void 0,d=void 0,m=0;m<c.animatedValues.length;m++){var p=c.animatedValues[m];if(!p.done){var f=c.fromValues[m],g=c.toValues[m],h=p.lastPosition,v=g instanceof b,k=Array.isArray(c.initialVelocity)?c.initialVelocity[m]:c.initialVelocity;if(v&&(g=g.getValue()),c.immediate)p.setValue(g),p.done=!0;else if("string"!=typeof f&&"string"!=typeof g){if(void 0!==c.duration)h=f+c.easing((t-p.startTime)/c.duration)*(g-f),u=t>=p.startTime+c.duration;else if(c.decay)h=f+k/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(u=Math.abs(p.lastPosition-h)<.1)&&(g=h);else{d=void 0!==p.lastTime?p.lastTime:t,k=void 0!==p.lastVelocity?p.lastVelocity:c.initialVelocity,t>d+64&&(d=t);for(var _=Math.floor(t-d),y=0;y<_;++y)h+=1*(k+=(-c.tension*(h-g)+-c.friction*k)/c.mass*1/1e3)/1e3;var E=!(!c.clamp||0===c.tension)&&(f<g?h>g:h<g),S=Math.abs(k)<=c.precision,B=0===c.tension||Math.abs(g-h)<=c.precision;u=E||S&&B,p.lastVelocity=k,p.lastTime=t}v&&!c.toValues[m].done&&(u=!1),u?(p.value!==g&&(h=g),p.done=!0):s=!0,p.setValue(h),p.lastPosition=h}else p.setValue(g),p.done=!0}}i.props.onFrame&&(i.values[c.name]=c.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),s||(R.delete(i),i.stop(!0))}return R.size?x?x():C(e):P=!1,P};function M(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return M({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var 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||function(e){return e};return function(e){var 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){var 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)}}var D=function(e){function t(n,o,r){var l;return(l=e.call(this)||this).calc=void 0,l.payload=n instanceof v&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],l.calc=M(o,r),l}a(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=M(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(v);function O(e,t){"update"in e?t.add(e):e.getChildren().forEach((function(e){return O(e,t)}))}var F=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}a(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&O(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new D(this,e,t)},t}(b),V=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new F(e)})),n}a(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,o){return n.payload[o].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new D(this,e,t)},t}(v),H=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=f(e),n=t.delay,o=void 0===n?0:n,i=t.to,s=l(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(r({},s,{delay:o,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t,n=e[0],l=e[1],i=r({to:(t={},t[n]=l,t),delay:p(o,n)},s),c=a[i.delay]&&a[i.delay].to;a[i.delay]=r({},a[i.delay],i,{to:r({},c,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,o=void 0===n?{}:n,l=e.to,i=void 0===l?{}:l;u.obj(o)&&(t.merged=r({},o,t.merged)),u.obj(i)&&(t.merged=r({},t.merged,i))}));var n=this.local=++this.guid,o=this.localQueue=this.queue;this.queue=[],o.forEach((function(r,i){var s=r.delay,a=l(r,["delay"]),c=function(r){i===o.length-1&&n===t.guid&&r&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);s?setTimeout((function(){n===t.guid&&(d?t.runAsync(a,c):t.diff(a).start(c))}),s):d?t.runAsync(a,c):t.diff(a).start(c)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,R.has(this)||R.add(this),P||(P=!0,C(x||A));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,R.has(this)&&R.delete(this)),this},t.runAsync=function(e,t){var n=this,o=(e.delay,l(e,["delay"])),i=this.local,s=Promise.resolve(void 0);if(u.arr(o.to))for(var a=function(e){var t=e,l=r({},o,f(o.to[t]));u.arr(l.config)&&(l.config=l.config[t]),s=s.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(l).start(e)}))}))},c=0;c<o.to.length;c++)a(c);else if(u.fun(o.to)){var d,m=0;s=s.then((function(){return o.to((function(e){var t=r({},o,f(e));if(u.arr(t.config)&&(t.config=t.config[m]),m++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=r({},this.props,e);var n=this.props,o=n.from,l=void 0===o?{}:o,i=n.to,s=void 0===i?{}:i,a=n.config,c=void 0===a?{}:a,f=n.reverse,g=n.attach,b=n.reset,v=n.immediate;if(f){var k=[s,l];l=k[0],s=k[1]}this.merged=r({},l,this.merged,s),this.hasChanged=!1;var _=g&&g(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var o=n[0],i=n[1],s=e[o]||{},a=u.num(i),f=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!h[i],g=u.arr(i),k=!a&&!g&&!f,y=u.und(l[o])?i:l[o],C=a||g||f?i:1,S=p(c,o);_&&(C=_.animations[o].parent);var B,I=s.parent,x=s.interpolation,T=m(_?C.getPayload():C),N=i;k&&(N=E({range:[0,1],output:[i,i]})(1));var L,P=x&&x.getValue(),R=!u.und(I)&&s.animatedValues.some((function(e){return!e.done})),A=!u.equ(N,P),M=!u.equ(N,s.previous),D=!u.equ(S,s.config);if(b||M&&A||D){var O;if(a||f)I=x=s.parent||new F(y);else if(g)I=x=s.parent||new V(y);else if(k){var H=s.interpolation&&s.interpolation.calc(s.parent.value);H=void 0===H||b?y:H,s.parent?(I=s.parent).setValue(0,!1):I=new F(0);var z={output:[H,i]};s.interpolation?(x=s.interpolation,s.interpolation.updateConfig(z)):x=I.interpolate(z)}return T=m(_?C.getPayload():C),B=m(I.getPayload()),b&&!k&&I.setValue(y,!1),t.hasChanged=!0,B.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=R?e.lastVelocity:void 0,e.lastTime=R?e.lastTime:void 0,e.startTime=w(),e.done=!1,e.animatedStyles.clear()})),p(v,o)&&I.setValue(k?C:i,!1),r({},e,((O={})[o]=r({},s,{name:o,parent:I,interpolation:x,animatedValues:B,toValues:T,previous:N,config:S,fromValues:m(I.getValue()),immediate:p(v,o),initialVelocity:d(S.velocity,0),clamp:d(S.clamp,!1),precision:d(S.precision,.01),tension:d(S.tension,170),friction:d(S.friction,26),mass:d(S.mass,1),duration:S.duration,easing:d(S.easing,(function(e){return e})),decay:S.decay}),O))}return A?e:(k&&(I.setValue(1,!1),x.updateConfig({output:[N,N]})),I.done=!0,t.hasChanged=!0,r({},e,((L={})[o]=r({},e[o],{previous:N}),L)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}();var G=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof b||(t=g.transform(t)),n.payload=t,n}return a(t,e),t}(k),U={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},W="[-+]?\\d*\\.?\\d+",j=W+"%";function $(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var K=new RegExp("rgb"+$(W,W,W)),q=new RegExp("rgba"+$(W,W,W,W)),Y=new RegExp("hsl"+$(W,j,j)),X=new RegExp("hsla"+$(W,j,j,W)),Q=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Z=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,J=/^#([0-9a-fA-F]{6})$/,ee=/^#([0-9a-fA-F]{8})$/;function te(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 ne(e,t,n){var o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=te(r,o,e+1/3),i=te(r,o,e),s=te(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function oe(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function re(e){return(parseFloat(e)%360+360)%360/360}function le(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ie(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function se(e){var t,n,o="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=J.exec(t))?parseInt(n[1]+"ff",16)>>>0:U.hasOwnProperty(t)?U[t]:(n=K.exec(t))?(oe(n[1])<<24|oe(n[2])<<16|oe(n[3])<<8|255)>>>0:(n=q.exec(t))?(oe(n[1])<<24|oe(n[2])<<16|oe(n[3])<<8|le(n[4]))>>>0:(n=Q.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ee.exec(t))?parseInt(n[1],16)>>>0:(n=Z.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=Y.exec(t))?(255|ne(re(n[1]),ie(n[2]),ie(n[3])))>>>0:(n=X.exec(t))?(ne(re(n[1]),ie(n[2]),ie(n[3]))|le(n[4]))>>>0:null;return null===o?e:"rgba("+((4278190080&(o=o||0))>>>24)+", "+((16711680&o)>>>16)+", "+((65280&o)>>>8)+", "+(255&o)/255+")"}var ae=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ce=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ue=new RegExp("("+Object.keys(U).join("|")+")","g"),de={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},me=["Webkit","Ms","Moz","O"];function pe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}de=Object.keys(de).reduce((function(e,t){return me.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),de);var fe={};N((function(e){return new G(e)})),B("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ce,se)})).map((function(e){return e.replace(ue,se)})),n=t[0].match(ae).map((function(){return[]}));t.forEach((function(e){e.match(ae).forEach((function(e,t){return n[t].push(+e)}))}));var o=t[0].match(ae).map((function(t,o){return M(r({},e,{output:n[o]}))}));return function(e){var n=0;return t[0].replace(ae,(function(){return o[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,o,r){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(o)+", "+r+")"}))}})),y(U),_((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,o=t.children,r=t.scrollTop,i=t.scrollLeft,s=l(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var c in void 0!==r&&(e.scrollTop=r),void 0!==i&&(e.scrollLeft=i),void 0!==o&&(e.textContent=o),n)if(n.hasOwnProperty(c)){var u=0===c.indexOf("--"),d=pe(c,n[c],u);"float"===c&&(c="cssFloat"),u?e.style.setProperty(c,d):e.style[c]=d}for(var m in s){var p=a?m:fe[m]||(fe[m]=m.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,s[m])}}),(function(e){return e}));var ge,he,be=(ge=function(e){return i.forwardRef((function(t,n){var o,a=(o=i.useState(!1)[1],i.useCallback((function(){return o((function(e){return!e}))}),[])),c=i.useRef(!0),d=i.useRef(null),m=i.useRef(null),p=i.useCallback((function(e){var t=d.current;d.current=new L(e,(function(){m.current&&!1===g.fn(m.current,d.current.getAnimatedValue())&&a()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){c.current=!1,d.current&&d.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(m,c,a)})),p(t);var f=d.current.getValue(),h=(f.scrollTop,f.scrollLeft,l(f,["scrollTop","scrollLeft"]));return s.createElement(e,r({},h,{ref:function(e){return m.current=(t=e,(o=n)&&(u.fun(o)?o(t):u.obj(o)&&(o.current=t)),t);var t,o}}))}))},void 0===(he=!1)&&(he=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=he?t[0].toLowerCase()+t.substring(1):t;return e[n]=ge(n),e}),ge)})(["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"]);t.q=be,t.q_=function(e){var t=u.fun(e),n=function(e,t){var n=i.useRef(!1),o=i.useRef(),r=u.fun(t),l=i.useMemo((function(){var n;return o.current&&(o.current.map((function(e){return e.destroy()})),o.current=void 0),[new Array(e).fill().map((function(e,o){var l=new z,i=r?p(t,o,l):t[o];return 0===o&&(n=i.ref),l.update(i),n||l.start(),l})),n]}),[e]),s=l[0],a=l[1];o.current=s,i.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(o.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return o.current.forEach((function(t){return t.stop(e)}))},get controllers(){return o.current}}}));var c=i.useMemo((function(){return function(e){return o.current.map((function(t,n){t.update(r?p(e,n,t):e[n]),a||t.start()}))}}),[e]);i.useEffect((function(){n.current?r||c(t):a||o.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return o.current.forEach((function(e){return e.destroy()}))}}),[]);var d=o.current.map((function(e){return e.getValues()}));return r?[d,c,function(e){return o.current.forEach((function(t){return t.pause(e)}))}]:d}(1,t?e:[e]),o=n[0],r=n[1],l=n[2];return t?[o[0],r,l]:o}},7621:function(e,t,n){var o;!function(r){var l=/^\s+/,i=/\s+$/,s=0,a=r.round,c=r.min,u=r.max,d=r.random;function m(e,t){if(t=t||{},(e=e||"")instanceof m)return e;if(!(this instanceof m))return new m(e,t);var n=function(e){var t,n,o,s={r:0,g:0,b:0},a=1,d=null,m=null,p=null,f=!1,g=!1;return"string"==typeof e&&(e=function(e){e=e.replace(l,"").replace(i,"").toLowerCase();var t,n=!1;if(N[e])e=N[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=U.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=U.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=U.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=U.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=U.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=U.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=U.hex8.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:V(t[4]),format:n?"name":"hex8"}:(t=U.hex6.exec(e))?{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"}:(t=U.hex4.exec(e))?{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:V(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=U.hex3.exec(e))&&{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(t=e.r,n=e.g,o=e.b,s={r:255*R(t,255),g:255*R(n,255),b:255*R(o,255)},f=!0,g="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(d=O(e.s),m=O(e.v),s=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var o=r.floor(e),l=e-o,i=n*(1-t),s=n*(1-l*t),a=n*(1-(1-l)*t),c=o%6;return{r:255*[n,s,i,i,a,n][c],g:255*[a,n,n,s,i,i][c],b:255*[i,i,a,n,n,s][c]}}(e.h,d,m),f=!0,g="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(d=O(e.s),p=O(e.l),s=function(e,t,n){var o,r,l;function i(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}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)o=r=l=n;else{var s=n<.5?n*(1+t):n+t-n*t,a=2*n-s;o=i(a,s,e+1/3),r=i(a,s,e),l=i(a,s,e-1/3)}return{r:255*o,g:255*r,b:255*l}}(e.h,d,p),f=!0,g="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=P(a),{ok:f,format:e.format||g,r:c(255,u(s.r,0)),g:c(255,u(s.g,0)),b:c(255,u(s.b,0)),a:a}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,r,l=u(e,t,n),i=c(e,t,n),s=(l+i)/2;if(l==i)o=r=0;else{var a=l-i;switch(r=s>.5?a/(2-l-i):a/(l+i),l){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,l:s}}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,r,l=u(e,t,n),i=c(e,t,n),s=l,a=l-i;if(r=0===l?0:a/l,l==i)o=0;else{switch(l){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4}o/=6}return{h:o,s:r,v:s}}function g(e,t,n,o){var r=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function h(e,t,n,o){return[D(F(o)),D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16))].join("")}function b(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s-=t/100,n.s=A(n.s),m(n)}function v(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.s+=t/100,n.s=A(n.s),m(n)}function k(e){return m(e).desaturate(100)}function _(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l+=t/100,n.l=A(n.l),m(n)}function y(e,t){t=0===t?0:t||10;var n=m(e).toRgb();return n.r=u(0,c(255,n.r-a(-t/100*255))),n.g=u(0,c(255,n.g-a(-t/100*255))),n.b=u(0,c(255,n.b-a(-t/100*255))),m(n)}function E(e,t){t=0===t?0:t||10;var n=m(e).toHsl();return n.l-=t/100,n.l=A(n.l),m(n)}function C(e,t){var n=m(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,m(n)}function S(e){var t=m(e).toHsl();return t.h=(t.h+180)%360,m(t)}function w(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+120)%360,s:t.s,l:t.l}),m({h:(n+240)%360,s:t.s,l:t.l})]}function B(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+90)%360,s:t.s,l:t.l}),m({h:(n+180)%360,s:t.s,l:t.l}),m({h:(n+270)%360,s:t.s,l:t.l})]}function I(e){var t=m(e).toHsl(),n=t.h;return[m(e),m({h:(n+72)%360,s:t.s,l:t.l}),m({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var o=m(e).toHsl(),r=360/n,l=[m(e)];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,l.push(m(o));return l}function T(e,t){t=t||6;for(var n=m(e).toHsv(),o=n.h,r=n.s,l=n.v,i=[],s=1/t;t--;)i.push(m({h:o,s:r,v:l})),l=(l+s)%1;return i}m.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:r.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),o=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,r){var l=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16)),D(F(o))];return r&&l[0].charAt(0)==l[0].charAt(1)&&l[1].charAt(0)==l[1].charAt(1)&&l[2].charAt(0)==l[2].charAt(1)&&l[3].charAt(0)==l[3].charAt(1)?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*R(this._r,255))+"%",g:a(100*R(this._g,255))+"%",b:a(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%)":"rgba("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var r=m(e);n="#"+h(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return m(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(B,arguments)}},m.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:O(e[o]));e=n}return m(e,t)},m.equals=function(e,t){return!(!e||!t)&&m(e).toRgbString()==m(t).toRgbString()},m.random=function(){return m.fromRatio({r:d(),g:d(),b:d()})},m.mix=function(e,t,n){n=0===n?0:n||50;var o=m(e).toRgb(),r=m(t).toRgb(),l=n/100;return m({r:(r.r-o.r)*l+o.r,g:(r.g-o.g)*l+o.g,b:(r.b-o.b)*l+o.b,a:(r.a-o.a)*l+o.a})},m.readability=function(e,t){var n=m(e),o=m(t);return(r.max(n.getLuminance(),o.getLuminance())+.05)/(r.min(n.getLuminance(),o.getLuminance())+.05)},m.isReadable=function(e,t,n){var o,r,l,i,s,a=m.readability(e,t);switch(r=!1,(l=n,"AA"!==(i=((l=l||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(s=(l.size||"small").toLowerCase())&&"large"!==s&&(s="small"),o={level:i,size:s}).level+o.size){case"AAsmall":case"AAAlarge":r=a>=4.5;break;case"AAlarge":r=a>=3;break;case"AAAsmall":r=a>=7}return r},m.mostReadable=function(e,t,n){var o,r,l,i,s=null,a=0;r=(n=n||{}).includeFallbackColors,l=n.level,i=n.size;for(var c=0;c<t.length;c++)(o=m.readability(e,t[c]))>a&&(a=o,s=m(t[c]));return m.isReadable(e,s,{level:l,size:i})||!r?s:(n.includeFallbackColors=!1,m.mostReadable(e,["#fff","#000"],n))};var N=m.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=m.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(N);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),r.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function A(e){return c(1,u(0,e))}function M(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function F(e){return r.round(255*parseFloat(e)).toString(16)}function V(e){return M(e)/255}var H,z,G,U=(z="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",G="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=m:void 0===(o=function(){return m}.call(t,n,t,e))||(e.exports=o)}(Math)},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 m=n?r(d):d,p={},f=!0,g={node:m,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){g.isRoot||(g.parent.node[g.key]=e),g.node=e,t&&(f=!1)},delete:function(e){delete g.parent.node[g.key],e&&(f=!1)},remove:function(e){s(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],e&&(f=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){u=!1},block:function(){f=!1}};if(!u)return g;function h(){if("object"==typeof g.node&&null!==g.node){g.keys&&g.node_===g.node||(g.keys=l(g.node)),g.isLeaf=0==g.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){g.circular=i[e];break}}else g.isLeaf=!0,g.keys=null;g.notLeaf=!g.isLeaf,g.notRoot=!g.isRoot}h();var b=t.call(g,g.node);return void 0!==b&&g.update&&g.update(b),p.before&&p.before.call(g,g.node),f?("object"!=typeof g.node||null===g.node||g.circular||(i.push(g),h(),a(g.keys,(function(t,r){o.push(t),p.pre&&p.pre.call(g,g.node[t],t);var l=e(g.node[t]);n&&c.call(g.node,t)&&(g.node[t]=l.node),l.isLast=r==g.keys.length-1,l.isFirst=0==r,p.post&&p.post.call(g,l),o.pop()})),i.pop()),p.after&&p.after.call(g,g.node),g):g}(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}},3804: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 jd},AlignmentToolbar:function(){return $d},Autocomplete:function(){return Xd},BlockAlignmentControl:function(){return No},BlockAlignmentToolbar:function(){return Lo},BlockBreadcrumb:function(){return tm},BlockColorsStyleSelector:function(){return im},BlockContextProvider:function(){return Hi},BlockControls:function(){return Yn},BlockEdit:function(){return Wi},BlockEditorKeyboardShortcuts:function(){return Uf},BlockEditorProvider:function(){return zs},BlockFormatControls:function(){return qn},BlockIcon:function(){return Fs},BlockInspector:function(){return Vf},BlockList:function(){return md},BlockMover:function(){return tu},BlockNavigationDropdown:function(){return Nm},BlockPreview:function(){return Ia},BlockSelectionClearer:function(){return Ws},BlockSettingsMenu:function(){return zu},BlockSettingsMenuControls:function(){return Ou},BlockTitle:function(){return zc},BlockToolbar:function(){return Gu},BlockTools:function(){return Hf},BlockVerticalAlignmentControl:function(){return Qm},BlockVerticalAlignmentToolbar:function(){return Zm},ButtonBlockAppender:function(){return Lc},ButtonBlockerAppender:function(){return Nc},ColorPalette:function(){return ep},ColorPaletteControl:function(){return tp},ContrastChecker:function(){return Yr},CopyHandler:function(){return Bu},DefaultBlockAppender:function(){return xc},FontSizePicker:function(){return Ql},InnerBlocks:function(){return ad},Inserter:function(){return Ic},InspectorAdvancedControls:function(){return zo},InspectorControls:function(){return Go},JustifyContentControl:function(){return uo},JustifyToolbar:function(){return mo},LineHeightControl:function(){return Tl},MediaPlaceholder:function(){return lf},MediaReplaceFlow:function(){return Jp},MediaUpload:function(){return Qp},MediaUploadCheck:function(){return Zp},MultiSelectScrollIntoView:function(){return Wf},NavigableToolbar:function(){return jc},ObserveTyping:function(){return qf},PanelColorSettings:function(){return sf},PlainText:function(){return uf},PreserveScrollInReorder:function(){return Yf},RichText:function(){return Kp},RichTextShortcut:function(){return pf},RichTextToolbarButton:function(){return ff},SETTINGS_DEFAULTS:function(){return b},SkipToSelectedBlock:function(){return Rf},ToolSelector:function(){return bf},Typewriter:function(){return Jf},URLInput:function(){return sp},URLInputButton:function(){return yf},URLPopover:function(){return of},Warning:function(){return $i},WritingFlow:function(){return ea},__experimentalBlockAlignmentMatrixControl:function(){return Jd},__experimentalBlockContentOverlay:function(){return nm},__experimentalBlockFullHeightAligmentControl:function(){return Zd},__experimentalBlockPatternSetup:function(){return Gm},__experimentalBlockVariationPicker:function(){return Pm},__experimentalBlockVariationTransforms:function(){return Wm},__experimentalBorderRadiusControl:function(){return Ir},__experimentalBorderStyleControl:function(){return Rr},__experimentalColorGradientControl:function(){return cr},__experimentalDuotoneControl:function(){return Oi},__experimentalFontAppearanceControl:function(){return Ml},__experimentalFontFamilyControl:function(){return Gl},__experimentalGetBorderClassesAndStyles:function(){return Id},__experimentalGetColorClassesAndStyles:function(){return Nd},__experimentalGetGradientClass:function(){return Zo},__experimentalGetGradientObjectByGradientValue:function(){return er},__experimentalGetMatchingVariation:function(){return Um},__experimentalGetSpacingClassesAndStyles:function(){return Pd},__experimentalImageSizeControl:function(){return op},__experimentalImageURLInputUI:function(){return Tf},__experimentalLayoutStyle:function(){return Co},__experimentalLetterSpacingControl:function(){return oi},__experimentalLibrary:function(){return zf},__experimentalLinkControl:function(){return wp},__experimentalLinkControlSearchInput:function(){return kp},__experimentalLinkControlSearchItem:function(){return up},__experimentalLinkControlSearchResults:function(){return pp},__experimentalListView:function(){return xm},__experimentalListViewBlockFill:function(){return vm},__experimentalListViewEditor:function(){return qp},__experimentalPanelColorGradientSettings:function(){return Kr},__experimentalPreviewOptions:function(){return Lf},__experimentalResponsiveBlockControl:function(){return mf},__experimentalUnitControl:function(){return vf},__experimentalUseBorderProps:function(){return xd},__experimentalUseColorProps:function(){return Ld},__experimentalUseCustomSides:function(){return Si},__experimentalUseGradient:function(){return nr},__experimentalUseInnerBlocksProps:function(){return sd},__experimentalUseNoRecursiveRenders:function(){return og},__experimentalUseResizeCanvas:function(){return Pf},__unstableBlockSettingsMenuFirstItem:function(){return Pu},__unstableEditorStyles:function(){return Sa},__unstableIframe:function(){return oa},__unstableInserterMenuExtension:function(){return rc},__unstableRichTextInputEvent:function(){return gf},__unstableUseBlockSelectionClearer:function(){return Us},__unstableUseCanvasClickRedirect:function(){return tg},__unstableUseClipboardHandler:function(){return wu},__unstableUseMouseMoveTypingReset:function(){return $f},__unstableUseTypewriter:function(){return Zf},__unstableUseTypingObserver:function(){return Kf},createCustomColorsHOC:function(){return Md},getColorClassName:function(){return Xo},getColorObjectByAttributeValues:function(){return qo},getColorObjectByColorValue:function(){return Yo},getFontSize:function(){return ql},getFontSizeClass:function(){return Xl},getFontSizeObjectByValue:function(){return Yl},getGradientSlugByValue:function(){return tr},getGradientValueBySlug:function(){return Jo},store:function(){return Vn},storeConfig:function(){return Fn},transformStyles:function(){return ya},useBlockDisplayInformation:function(){return Hc},useBlockEditContext:function(){return Un},useBlockProps:function(){return Is},useSetting:function(){return so},validateThemeColors:function(){return rg},validateThemeGradients:function(){return lg},withColorContext:function(){return Jm},withColors:function(){return Dd},withFontSizes:function(){return Fd}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return wt},__experimentalGetAllowedBlocks:function(){return lt},__experimentalGetAllowedPatterns:function(){return at},__experimentalGetBlockListSettingsForBlocks:function(){return ft},__experimentalGetLastBlockAttributeChanges:function(){return vt},__experimentalGetParsedPattern:function(){return it},__experimentalGetParsedReusableBlock:function(){return gt},__experimentalGetPatternTransformItems:function(){return ut},__experimentalGetPatternsByBlockTypes:function(){return ct},__experimentalGetReusableBlockTitle:function(){return ht},__unstableGetBlockWithoutInnerBlocks:function(){return j},__unstableGetClientIdWithClientIdsTree:function(){return K},__unstableGetClientIdsTree:function(){return q},__unstableIsLastBlockChangeIgnored:function(){return bt},areInnerBlocksControlled:function(){return St},canInsertBlockType:function(){return Ye},canInsertBlocks:function(){return Xe},didAutomaticChange:function(){return Et},getAdjacentBlockClientId:function(){return pe},getBlock:function(){return W},getBlockAttributes:function(){return U},getBlockCount:function(){return J},getBlockHierarchyRootClientId:function(){return de},getBlockIndex:function(){return xe},getBlockInsertionPoint:function(){return Ge},getBlockListSettings:function(){return dt},getBlockMode:function(){return Me},getBlockName:function(){return z},getBlockOrder:function(){return Ie},getBlockParents:function(){return ce},getBlockParentsByBlockName:function(){return ue},getBlockRootClientId:function(){return ae},getBlockSelectionEnd:function(){return oe},getBlockSelectionStart:function(){return ne},getBlockTransformItems:function(){return ot},getBlocks:function(){return $},getBlocksByClientId:function(){return Z},getClientIdsOfDescendants:function(){return Y},getClientIdsWithDescendants:function(){return X},getDraggedBlockClientIds:function(){return Fe},getFirstMultiSelectedBlockClientId:function(){return _e},getGlobalBlockCount:function(){return Q},getInserterItems:function(){return nt},getLastMultiSelectedBlockClientId:function(){return ye},getLowestCommonAncestorWithSelectedBlock:function(){return me},getMultiSelectedBlockClientIds:function(){return ve},getMultiSelectedBlocks:function(){return ke},getMultiSelectedBlocksEndClientId:function(){return Be},getMultiSelectedBlocksStartClientId:function(){return we},getNextBlockClientId:function(){return ge},getPreviousBlockClientId:function(){return fe},getSelectedBlock:function(){return se},getSelectedBlockClientId:function(){return ie},getSelectedBlockClientIds:function(){return be},getSelectedBlockCount:function(){return re},getSelectedBlocksInitialCaretPosition:function(){return he},getSelectionEnd:function(){return te},getSelectionStart:function(){return ee},getSettings:function(){return mt},getTemplate:function(){return je},getTemplateLock:function(){return $e},hasBlockMovingClientId:function(){return yt},hasInserterItems:function(){return rt},hasMultiSelection:function(){return Pe},hasSelectedBlock:function(){return le},hasSelectedInnerBlock:function(){return Ne},isAncestorBeingDragged:function(){return He},isAncestorMultiSelected:function(){return Se},isBlockBeingDragged:function(){return Ve},isBlockHighlighted:function(){return Ct},isBlockInsertionPointVisible:function(){return Ue},isBlockMultiSelected:function(){return Ce},isBlockSelected:function(){return Te},isBlockValid:function(){return G},isBlockWithinSelection:function(){return Le},isCaretWithinFormattedText:function(){return ze},isDraggingBlocks:function(){return Oe},isFirstMultiSelectedBlock:function(){return Ee},isLastBlockChangePersistent:function(){return pt},isMultiSelecting:function(){return Re},isNavigationMode:function(){return _t},isSelectionEnabled:function(){return Ae},isTyping:function(){return De},isValidTemplate:function(){return We},wasBlockJustInserted:function(){return Bt}});var t={};n.r(t),n.d(t,{__unstableMarkAutomaticChange:function(){return xn},__unstableMarkAutomaticChangeFinal:function(){return Tn},__unstableMarkLastChangeAsPersistent:function(){return Bn},__unstableMarkNextChangeAsNotPersistent:function(){return In},__unstableSaveReusableBlock:function(){return wn},clearSelectedBlock:function(){return $t},duplicateBlocks:function(){return Pn},enterFormattedText:function(){return vn},exitFormattedText:function(){return kn},flashBlock:function(){return Dn},hideInsertionPoint:function(){return ln},insertAfterBlock:function(){return An},insertBeforeBlock:function(){return Rn},insertBlock:function(){return nn},insertBlocks:function(){return on},insertDefaultBlock:function(){return En},mergeBlocks:function(){return cn},moveBlockToPosition:function(){return tn},moveBlocksDown:function(){return Zt},moveBlocksToPosition:function(){return en},moveBlocksUp:function(){return Jt},multiSelect:function(){return jt},receiveBlocks:function(){return Ot},removeBlock:function(){return dn},removeBlocks:function(){return un},replaceBlock:function(){return Xt},replaceBlocks:function(){return Yt},replaceInnerBlocks:function(){return mn},resetBlocks:function(){return At},resetSelection:function(){return Dt},selectBlock:function(){return Ht},selectNextBlock:function(){return Gt},selectPreviousBlock:function(){return zt},selectionChange:function(){return yn},setBlockMovingClientId:function(){return Ln},setHasControlledInnerBlocks:function(){return On},setNavigationMode:function(){return Nn},setTemplateValidity:function(){return sn},showInsertionPoint:function(){return rn},startDraggingBlocks:function(){return hn},startMultiSelect:function(){return Ut},startTyping:function(){return fn},stopDraggingBlocks:function(){return bn},stopMultiSelect:function(){return Wt},stopTyping:function(){return gn},synchronizeTemplate:function(){return an},toggleBlockHighlight:function(){return Mn},toggleBlockMode:function(){return pn},toggleSelection:function(){return Kt},updateBlock:function(){return Vt},updateBlockAttributes:function(){return Ft},updateBlockListSettings:function(){return Cn},updateSettings:function(){return Sn},validateBlocksToTemplate:function(){return Mt}});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,m=window.wp.components,p=window.wp.data,f={default:(0,m.createSlotFill)("BlockControls"),block:(0,m.createSlotFill)("BlockControlsBlock"),inline:(0,m.createSlotFill)("BlockFormatControls"),other:(0,m.createSlotFill)("BlockControlsOther"),parent:(0,m.createSlotFill)("BlockControlsParent")},g=window.wp.i18n;const h={insertUsage:{}},b={alignWide:!1,supportsLayout:!0,colors:[{name:(0,g.__)("Black"),slug:"black",color:"#000000"},{name:(0,g.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,g.__)("White"),slug:"white",color:"#ffffff"},{name:(0,g.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,g.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,g.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,g.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,g.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,g.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,g.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,g.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,g.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,g._x)("Small","font size name"),size:13,slug:"small"},{name:(0,g._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,g._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,g._x)("Large","font size name"),size:36,slug:"large"},{name:(0,g._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,g.__)("Thumbnail")},{slug:"medium",name:(0,g.__)("Medium")},{slug:"large",name:(0,g.__)("Large")},{slug:"full",name:(0,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("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,g.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,g.__)("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,g.__)("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,g.__)("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,g.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,g.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function v(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function k(e,t,n,o=1){const r=[...e];return r.splice(t,o),v(r,e.slice(t,t+o),n)}function _(e,t=""){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,t=""){return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e,t=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="",n={}){return(0,u.reduce)(e[t],((t,o)=>n[o]?t:[...t,o,...w(e,o)]),[])}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,o=t.attributes,(0,u.isEqual)((0,u.keys)(n),(0,u.keys)(o)));var n,o}function I(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 x(e,t,n){const o=new Set([]),r=new Set;for(const t of n){let n=t;do{if(e.controlledInnerBlocks[n]){r.add(n);break}o.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of o)t[e]={...t[e]};for(const n of o)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of r)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,u.flow)(p.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=>(t={},n)=>{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=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""]);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId]);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)));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=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e);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=x(o,o.tree,e);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e);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=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e)}}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){var o,r,l;const e=w(null!==(o=null==t?void 0:t.order)&&void 0!==o?o:{},"",null!==(r=null==t?void 0:t.controlledInnerBlocks)&&void 0!==r?r:{}),i=Object.keys((0,u.pickBy)(null!==(l=null==t?void 0:t.controlledInnerBlocks)&&void 0!==l?l:{})),s={...t,byClientId:{...(0,u.omit)(null==t?void 0:t.byClientId,e),...C(n.blocks)},attributes:{...(0,u.omit)(null==t?void 0:t.attributes,e),...S(n.blocks)},order:{...(0,u.omit)(null==t?void 0:t.order,e),...(0,u.omit)(_(n.blocks),i)},parents:{...(0,u.omit)(null==t?void 0:t.parents,e),...y(n.blocks)},controlledInnerBlocks:(null==t?void 0:t.controlledInnerBlocks)||{}},a=I(s,n.blocks);return s.tree={...(0,u.omit)(null==t?void 0:t.tree,e),...a,"":{innerBlocks:n.blocks.map((e=>a[e.clientId]))}},s}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:!B(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(e={},t){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(e={},t){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(e={},t){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]:v(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]:v(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(e={},t){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:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function N(e={},t){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 L,P,R=(0,p.combineReducers)({blocks:T,isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(e=!1,t){switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(e={},t){var n,o;switch(t.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}};case"RESET_SELECTION":const{selectionStart:r,selectionEnd:l}=t;return{selectionStart:r,selectionEnd:l};case"MULTI_SELECT":const{start:i,end:s}=t;return{selectionStart:{clientId:i},selectionEnd:{clientId:s}};case"RESET_BLOCKS":const a=null==e||null===(n=e.selectionStart)||void 0===n?void 0:n.clientId,c=null==e||null===(o=e.selectionEnd)||void 0===o?void 0:o.clientId;if(!a&&!c)return e;if(!t.blocks.some((e=>e.clientId===a)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===c)))return{...e,selectionEnd:e.selectionStart}}return{selectionStart:N(e.selectionStart,t),selectionEnd:N(e.selectionEnd,t)}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(e=null,t){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(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{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(e=null,t){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(e={isValid:!0},t){switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(e=b,t){switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(e=h,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,p.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(e=!1,t){return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(e=null,t){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(e={},t){var n;switch(t.type){case"INSERT_BLOCKS":return t.blocks.length?{clientId:t.blocks[0].clientId,source:null===(n=t.meta)||void 0===n?void 0:n.source}:e;case"RESET_BLOCKS":return{}}return e}});function A(e){return[e]}function M(){var e={clear:function(){e.head=null}};return e}function D(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 O(e,t){var n,o;function r(){n=P?new WeakMap:M()}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&&!D(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),r=n.head;r;){if(D(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=A),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(L)||((l=M()).isUniqueByDependants=a,s.set(L,l)),s.get(L)}:function(){return n},l.getDependants=t,l.clear=r,r(),l}L={},P="undefined"!=typeof WeakMap;var F=window.wp.primitives,V=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 H=[];function z(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 G(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 W(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const j=O(((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&&St(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||H}const K=O(((e,t)=>({clientId:t,innerBlocks:q(e,t)})),(e=>[e.blocks.order])),q=O(((e,t="")=>(0,u.map)(Ie(e,t),(t=>K(e,t)))),(e=>[e.blocks.order])),Y=(e,t)=>(0,u.flatMap)(t,(t=>{const n=Ie(e,t);return[...n,...Y(e,n)]})),X=O((e=>{const t=Ie(e);return[...t,...Y(e,t)]}),(e=>[e.blocks.order])),Q=O(((e,t)=>{const n=X(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])),Z=O(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>W(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function J(e,t){return Ie(e,t).length}function ee(e){return e.selection.selectionStart}function te(e){return e.selection.selectionEnd}function ne(e){return e.selection.selectionStart.clientId}function oe(e){return e.selection.selectionEnd.clientId}function re(e){return ve(e).length||(e.selection.selectionStart.clientId?1:0)}function le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ie(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function se(e){const t=ie(e);return t?W(e,t):null}function ae(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const ce=O(((e,t,n=!1)=>{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])),ue=O(((e,t,n,o=!1)=>{const r=ce(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:z(e,t)}))),(({name:e})=>Array.isArray(n)?n.includes(e):e===n)),(({id:e})=>e))}),(e=>[e.blocks.parents]));function de(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function me(e,t){const n=ie(e),o=[...ce(e,t),t],r=[...ce(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,n=1){if(void 0===t&&(t=ie(e)),void 0===t&&(t=n<0?_e(e):ye(e)),!t)return null;const o=ae(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t)+1*n;return i<0||i===l.length?null:l[i]}function fe(e,t){return pe(e,t,-1)}function ge(e,t){return pe(e,t,1)}function he(e){return e.initialPosition}const be=O((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return H;if(t.clientId===n.clientId)return[t.clientId];const o=ae(e,t.clientId);if(null===o)return H;const r=Ie(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?H:be(e)}const ke=O((e=>{const t=ve(e);return t.length?t.map((t=>W(e,t))):H}),(e=>[...be.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function _e(e){return(0,u.first)(ve(e))||null}function ye(e){return(0,u.last)(ve(e))||null}function Ee(e,t){return _e(e)===t}function Ce(e,t){return-1!==ve(e).indexOf(t)}const Se=O(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ae(e,n),o=Ce(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function we(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Be(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ie(e,t){return e.blocks.order[t||""]||H}function xe(e,t,n){return Ie(e,n).indexOf(t)}function Te(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Ne(e,t,n=!1){return(0,u.some)(Ie(e,t),(t=>Te(e,t)||Ce(e,t)||n&&Ne(e,t,n)))}function Le(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 Re(e){return e.isMultiSelecting}function Ae(e){return e.isSelectionEnabled}function Me(e,t){return e.blocksMode[t]||"visual"}function De(e){return e.isTyping}function Oe(e){return!!e.draggedBlocks.length}function Fe(e){return e.draggedBlocks}function Ve(e,t){return e.draggedBlocks.includes(t)}function He(e,t){if(!Oe(e))return!1;const n=ce(e,t);return(0,u.some)(n,(t=>Ve(e,t)))}function ze(e){return e.isCaretWithinFormattedText}function Ge(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=ae(e,l)||void 0,n=xe(e,r.clientId,t)+1):n=Ie(e).length,{rootClientId:t,index:n}}function Ue(e){return null!==e.insertionPoint}function We(e){return e.template.isValid}function je(e){return e.settings.template}function $e(e,t){if(!t)return e.settings.templateLock;const n=dt(e,t);return n?n.templateLock:null}const Ke=(e,t,n=null)=>(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,qe=(e,t,n=null)=>{let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,r.getBlockType)(t),!o)return!1;const{allowedBlockTypes:l}=mt(e);if(!Ke(l,t,!0))return!1;if($e(e,n))return!1;const i=dt(e,n);if(n&&void 0===i)return!1;const s=null==i?void 0:i.allowedBlocks,a=Ke(s,t),c=o.parent,u=z(e,n),d=Ke(c,u);return null!==a&&null!==d?a||d:null!==a?a:null===d||d},Ye=O(qe,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function Xe(e,t,n=null){return t.every((t=>Ye(e,z(e,t),n)))}function Qe(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 Ze=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&qe(e,t.name,n),Je=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=Qe(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:et(r,l)}},et=(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}},tt=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let l=!1;(0,r.hasBlockSupport)(n.name,"multiple",!0)||(l=(0,u.some)(Z(e,X(e)),{name:n.name}));const{time:i,count:s=0}=Qe(e,o)||{},a={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:l,frecency:et(i,s)};if("transform"===t)return a;const c=n.variations.filter((({scope:e})=>!e||e.includes("inserter")));return{...a,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,variations:c,example:n.example,utility:1}},nt=O(((e,t=null)=>{const n=tt(e,{buildScope:"inserter"}),o=(0,r.getBlockTypes)().filter((n=>Ze(e,n,t))).map(n),l=qe(e,"core/block",t)?kt(e).map((t=>{const n=`core/block/${t.id}`,o=gt(e,t.id);let l;1===o.length&&(l=(0,r.getBlockType)(o[0].name));const{time:i,count:s=0}=Qe(e,n)||{},a=et(i,s);return{id:n,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:l?l.icon:V,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:a}})):[],i=o.filter((({variations:e=[]})=>!e.some((({isDefault:e})=>e)))),s=[];for(const t of o){const{variations:n=[]}=t;if(n.length){const o=Je(e,t);s.push(...n.map(o))}}const a=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},c=i.reduce(a,{core:[],noncore:[]}),u=s.reduce(a,{core:[],noncore:[]});return[...c.core,...u.core,...c.noncore,...u.noncore,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,kt(e),(0,r.getBlockTypes)()])),ot=O(((e,t,n=null)=>{const o=tt(e,{buildScope:"transform"}),l=(0,r.getBlockTypes)().filter((t=>Ze(e,t,n))).map(o),i=(0,u.mapKeys)(l,(({name:e})=>e)),s=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>(i[null==t?void 0:t.name]&&e.push(i[t.name]),e)),[]);return(0,u.orderBy)(s,(e=>i[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),rt=O(((e,t=null)=>!!(0,u.some)((0,r.getBlockTypes)(),(n=>Ze(e,n,t)))||qe(e,"core/block",t)&&kt(e).length>0),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,kt(e),(0,r.getBlockTypes)()])),lt=O(((e,t=null)=>{if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>Ze(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),it=O(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((({name:e})=>e===t));return n?{...n,blocks:(0,r.parse)(n.content)}:null}),(e=>[e.settings.__experimentalBlockPatterns])),st=O((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=mt(e);return t.map((({name:t})=>it(e,t))).filter((({blocks:e})=>((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Ke(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(e,n)))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),at=O(((e,t=null)=>{const n=st(e);return(0,u.filter)(n,(({blocks:n})=>n.every((({name:n})=>Ye(e,n,t)))))}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),ct=O(((e,t,n=null)=>{if(!t)return H;const o=at(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)=>[...at.getDependants(e,t)])),ut=O(((e,t,n=null)=>{if(!t)return H;if(t.some((({clientId:t,innerBlocks:n})=>n.length||St(e,t))))return H;const o=Array.from(new Set(t.map((({name:e})=>e))));return ct(e,o,n)}),((e,t)=>[...ct.getDependants(e,t)]));function dt(e,t){return e.blockListSettings[t]}function mt(e){return e.settings}function pt(e){return e.blocks.isPersistentChange}const ft=O(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),gt=O(((e,t)=>{const n=(0,u.find)(kt(e),(e=>e.id===t));return n?(0,r.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(e=>[kt(e)])),ht=O(((e,t)=>{var n;const o=(0,u.find)(kt(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[kt(e)]));function bt(e){return e.blocks.isIgnoredChange}function vt(e){return e.lastBlockAttributesChange}function kt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:H}function _t(e){return e.isNavigationMode}function yt(e){return e.hasBlockMovingClientId}function Et(e){return!!e.automaticChangeStatus}function Ct(e,t){return e.highlightedBlock===t}function St(e,t){return!!e.blocks.controlledInnerBlocks[t]}const wt=O(((e,t)=>{if(!t.length)return null;const n=ie(e);if(t.includes(z(e,n)))return n;const o=ve(e),r=ue(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Bt(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var It=window.wp.a11y,xt=window.wp.richText,Tt=window.wp.deprecated,Nt=n.n(Tt),Lt={SLEEP:({duration:e})=>new Promise((t=>{setTimeout(t,e)})),MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:(0,p.createRegistryControl)((e=>()=>{const{requestIdleCallback:t=(e=>setTimeout(e,100))}=window;t((()=>e.dispatch(Vn).__unstableMarkAutomaticChangeFinal()))}))};const Pt="core/block-editor";function*Rt(){if(0===(yield p.controls.select(Pt,"getBlockCount"))){const{__unstableHasCustomAppender:e}=yield p.controls.select(Pt,"getSettings");if(e)return;return yield En()}}function*At(e){return yield{type:"RESET_BLOCKS",blocks:e},yield*Mt(e)}function*Mt(e){const t=yield p.controls.select(Pt,"getTemplate"),n=yield p.controls.select(Pt,"getTemplateLock"),o=!t||"all"!==n||(0,r.doBlocksMatchTemplate)(e,t);if(o!==(yield p.controls.select(Pt,"isValidTemplate")))return yield sn(o),o}function Dt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ot(e){return Nt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Ft(e,t,n=!1){return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function Vt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Ht(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function*zt(e){const t=yield p.controls.select(Pt,"getPreviousBlockClientId",e);if(t)return yield Ht(t,-1),[t]}function*Gt(e){const t=yield p.controls.select(Pt,"getNextBlockClientId",e);if(t)return yield Ht(t),[t]}function Ut(){return{type:"START_MULTI_SELECT"}}function Wt(){return{type:"STOP_MULTI_SELECT"}}function*jt(e,t){if((yield p.controls.select(Pt,"getBlockRootClientId",e))!==(yield p.controls.select(Pt,"getBlockRootClientId",t)))return;yield{type:"MULTI_SELECT",start:e,end:t};const n=yield p.controls.select(Pt,"getSelectedBlockCount");(0,It.speak)((0,g.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
+ (0,g._n)("%s block selected.","%s blocks selected.",n),n),"assertive")}function $t(){return{type:"CLEAR_SELECTED_BLOCK"}}function Kt(e=!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()}}}))}function*Yt(e,t,n,o=0,r){e=(0,u.castArray)(e),t=qt((0,u.castArray)(t),yield p.controls.select(Pt,"getSettings"));const l=yield p.controls.select(Pt,"getBlockRootClientId",(0,u.first)(e));for(let e=0;e<t.length;e++){const n=t[e];if(!(yield p.controls.select(Pt,"canInsertBlockType",n.name,l)))return}yield{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r},yield*Rt()}function Xt(e,t){return Yt(e,t)}function Qt(e){return(t,n)=>({clientIds:(0,u.castArray)(t),type:e,rootClientId:n})}const Zt=Qt("MOVE_BLOCKS_DOWN"),Jt=Qt("MOVE_BLOCKS_UP");function*en(e,t="",n="",o){const r=yield p.controls.select(Pt,"getTemplateLock",t);if("all"===r)return;const l={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o};t!==n?"insert"!==r&&(yield p.controls.select(Pt,"canInsertBlocks",e,n))&&(yield l):yield l}function*tn(e,t="",n="",o){yield en([e],t,n,o)}function nn(e,t,n,o=!0,r){return on([e],t,n,o,0,r)}function*on(e,t,n,o=!0,r=0,l){(0,u.isObject)(r)&&(l=r,r=0,Nt()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),e=qt((0,u.castArray)(e),yield p.controls.select(Pt,"getSettings"));const i=[];for(const t of e)(yield p.controls.select(Pt,"canInsertBlockType",t.name,n))&&i.push(t);if(i.length)return{type:"INSERT_BLOCKS",blocks:i,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l}}function rn(e,t,n={}){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}}function*an(){yield{type:"SYNCHRONIZE_TEMPLATE"};const e=yield p.controls.select(Pt,"getBlocks"),t=yield p.controls.select(Pt,"getTemplate"),n=(0,r.synchronizeBlocksWithTemplate)(e,t);return yield At(n)}function*cn(e,t){const n=[e,t];yield{type:"MERGE_BLOCKS",blocks:n};const[o,l]=n,i=yield p.controls.select(Pt,"getBlock",o),s=(0,r.getBlockType)(i.name);if(!s.merge)return void(yield Ht(i.clientId));const a=yield p.controls.select(Pt,"getBlock",l),c=(0,r.getBlockType)(a.name),{clientId:d,attributeKey:m,offset:f}=yield p.controls.select(Pt,"getSelectionStart"),g=(d===o?s:c).attributes[m],h=(d===o||d===l)&&void 0!==m&&void 0!==f&&!!g;g||("number"==typeof m?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 m):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,r.cloneBlock)(i),v=(0,r.cloneBlock)(a);if(h){const e=d===o?b:v,t=e.attributes[m],{multiline:n,__unstableMultilineWrapperTags:r,__unstablePreserveWhiteSpace:l}=g,i=(0,xt.insert)((0,xt.create)({html:t,multilineTag:n,multilineWrapperTags:r,preserveWhiteSpace:l}),"†",f,f);e.attributes[m]=(0,xt.toHTMLString)({value:i,multilineTag:n,preserveWhiteSpace:l})}const k=i.name===a.name?[v]:(0,r.switchToBlockType)(v,i.name);if(!k||!k.length)return;const _=s.merge(b.attributes,k[0].attributes);if(h){const e=(0,u.findKey)(_,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=_[e],{multiline:n,__unstableMultilineWrapperTags:o,__unstablePreserveWhiteSpace:r}=s.attributes[e],l=(0,xt.create)({html:t,multilineTag:n,multilineWrapperTags:o,preserveWhiteSpace:r}),a=l.text.indexOf("†"),c=(0,xt.remove)(l,a,a+1),d=(0,xt.toHTMLString)({value:c,multilineTag:n,preserveWhiteSpace:r});_[e]=d,yield yn(i.clientId,e,a,a)}yield*Yt([i.clientId,a.clientId],[{...i,attributes:{...i.attributes,..._}},...k.slice(1)],0)}function*un(e,t=!0){if(!e||!e.length)return;e=(0,u.castArray)(e);const n=yield p.controls.select(Pt,"getBlockRootClientId",e[0]);if(yield p.controls.select(Pt,"getTemplateLock",n))return;let o;o=t?yield zt(e[0]):yield p.controls.select(Pt,"getPreviousBlockClientId",e[0]),yield{type:"REMOVE_BLOCKS",clientIds:e};const r=yield*Rt();return[o||r]}function dn(e,t){return un([e],t)}function mn(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function pn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function fn(){return{type:"START_TYPING"}}function gn(){return{type:"STOP_TYPING"}}function hn(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function bn(){return{type:"STOP_DRAGGING_BLOCKS"}}function vn(){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"}}function*xn(){yield{type:"MARK_AUTOMATIC_CHANGE"},yield{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"}}function Tn(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function*Nn(e=!0){yield{type:"SET_NAVIGATION_MODE",isNavigationMode:e},e?(0,It.speak)((0,g.__)("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,It.speak)((0,g.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}function*Ln(e=null){yield{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e},e&&(0,It.speak)((0,g.__)("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."))}function*Pn(e,t=!0){if(!e&&!e.length)return;const n=yield p.controls.select(Pt,"getBlocksByClientId",e),o=yield p.controls.select(Pt,"getBlockRootClientId",e[0]);if((0,u.some)(n,(e=>!e)))return;const l=n.map((e=>e.name));if((0,u.some)(l,(e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const i=yield p.controls.select(Pt,"getBlockIndex",(0,u.last)((0,u.castArray)(e)),o),s=n.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return yield on(s,i+1,o,t),s.length>1&&t&&(yield jt((0,u.first)(s).clientId,(0,u.last)(s).clientId)),s.map((e=>e.clientId))}function*Rn(e){if(!e)return;const t=yield p.controls.select(Pt,"getBlockRootClientId",e);if(yield p.controls.select(Pt,"getTemplateLock",t))return;const n=yield p.controls.select(Pt,"getBlockIndex",e,t);return yield En({},t,n)}function*An(e){if(!e)return;const t=yield p.controls.select(Pt,"getBlockRootClientId",e);if(yield p.controls.select(Pt,"getTemplateLock",t))return;const n=yield p.controls.select(Pt,"getBlockIndex",e,t);return yield En({},t,n+1)}function Mn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function*Dn(e){yield Mn(e,!0),yield{type:"SLEEP",duration:150},yield Mn(e,!1)}function On(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const Fn={reducer:R,selectors:e,actions:t,controls:Lt},Vn=(0,p.createReduxStore)(Pt,{...Fn,persist:["preferences"]});(0,p.registerStore)(Pt,{...Fn,persist:["preferences"]});const Hn={name:"",isSelected:!1},zn=(0,s.createContext)(Hn),{Provider:Gn}=zn;function Un(){return(0,s.useContext)(zn)}function Wn(){const{isSelected:e,clientId:t,name:n}=Un();return(0,p.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(Vn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function jn({group:e="default",controls:t,children:n,__experimentalExposeToChildren:o=!1}){const l=function(e,t){const n=Wn(),{clientId:o}=Un(),l=(0,p.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(Vn),{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}(e,o);return l?(0,s.createElement)(m.__experimentalStyleProvider,{document:document},(0,s.createElement)(l,null,(o=>{const r=(0,u.isEmpty)(o)?null:o;return(0,s.createElement)(m.__experimentalToolbarContext.Provider,{value:r},"default"===e&&(0,s.createElement)(m.ToolbarGroup,{controls:t}),n)}))):null}function $n({group:e="default",...t}){const n=(0,s.useContext)(m.__experimentalToolbarContext),o=f[e].Slot,r=(0,m.__experimentalUseSlot)(o.__unstableName);return Boolean(r.fills&&r.fills.length)?"default"===e?(0,s.createElement)(o,i({},t,{bubblesVirtually:!0,fillProps:n})):(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(o,i({},t,{bubblesVirtually:!0,fillProps:n}))):null}const Kn=jn;Kn.Slot=$n;const qn=e=>(0,s.createElement)(jn,i({group:"inline"},e));qn.Slot=e=>(0,s.createElement)($n,i({group:"inline"},e));var Yn=Kn,Xn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Qn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Zn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Jn=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),eo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),to=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),no=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),oo=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),ro=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));function lo(e,t=""){return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const io={"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.customLineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.customPadding":e=>e.enableCustomSpacing};function so(e){const{name:t}=Un();return(0,p.useSelect)((n=>{var o;const l=n(Vn).getSettings(),i=`__experimentalFeatures.${e}`,s=`__experimentalFeatures.blocks.${t}.${e}`,a=null!==(o=(0,u.get)(l,s))&&void 0!==o?o:(0,u.get)(l,i);var c,d;if(void 0!==a)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[e]?null!==(c=null!==(d=a.user)&&void 0!==d?d:a.theme)&&void 0!==c?c:a.core:a;const m=io[e]?io[e](l):void 0;return void 0!==m?m:"typography.dropCap"===e||void 0}),[t,e])}const ao={left:to,center:no,right:oo,"space-between":ro};var co=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:l}){const a=e=>{n(e===o?void 0:e)},c=o?ao[o]:ao.left,u=[{name:"left",icon:to,title:(0,g.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:no,title:(0,g.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:oo,title:(0,g.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:ro,title:(0,g.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")}],d=l?m.ToolbarGroup:m.ToolbarDropdownMenu,p=l?{isCollapsed:t}:{};return(0,s.createElement)(d,i({icon:c,popoverProps:r,label:(0,g.__)("Change items justification"),controls:u.filter((t=>e.includes(t.name)))},p))};function uo(e){return(0,s.createElement)(co,i({},e,{isToolbar:!1}))}function mo(e){return(0,s.createElement)(co,i({},e,{isToolbar:!0}))}const po={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"};var fo={name:"flex",label:(0,g.__)("Flex"),inspectorControls:function({layout:e={},onChange:t}){return(0,s.createElement)(ho,{layout:e,onChange:t})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){return null!=n&&n.allowSwitching?null:(0,s.createElement)(Yn,{group:"block",__experimentalExposeToChildren:!0},(0,s.createElement)(ho,{layout:e,onChange:t,isToolbar:!0}))},save:function({selector:e,layout:t}){const n=null!==so("spacing.blockGap"),o=po[t.justifyContent]||"flex-start";return(0,s.createElement)("style",null,`\n\t\t\t\t${lo(e)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tgap: ${n?"var( --wp--style--block-gap, 0.5em )":"0.5em"};\n\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tflex-direction: row;\n\t\t\t\t\tjustify-content: ${o};\n\t\t\t\t}\n\n\t\t\t\t${lo(e,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation:()=>"horizontal",getAlignments:()=>[]};const go=[{value:"left",icon:to,label:(0,g.__)("Justify items left")},{value:"center",icon:no,label:(0,g.__)("Justify items center")},{value:"right",icon:oo,label:(0,g.__)("Justify items right")},{value:"space-between",icon:ro,label:(0,g.__)("Space between items")}];function ho({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left"}=e,r=n=>{t({...e,justifyContent:n})};return n?(0,s.createElement)(uo,{allowedControls:["left","center","right","space-between"],value:o,onChange:r,popoverProps:{position:"bottom right",isAlternate:!0}}):(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,g.__)("Justification")),(0,s.createElement)("div",null,go.map((({value:e,icon:t,label:n})=>(0,s.createElement)(m.Button,{key:e,label:n,icon:t,isPressed:o===e,onClick:()=>r(e)})))))}var bo=function({icon:e,size:t=24,...n}){return(0,s.cloneElement)(e,{width:t,height:t,...n})};const vo=[{name:"default",label:(0,g.__)("Flow"),inspectorControls:function({layout:e,onChange:t}){const{wideSize:n,contentSize:o}=e,r=(0,m.__experimentalUseCustomUnits)({availableUnits:so("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)(m.__experimentalUnitControl,{label:(0,g.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||n||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:r}),(0,s.createElement)(bo,{icon:Qn})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:n||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:r}),(0,s.createElement)(bo,{icon:Jn}))),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,s.createElement)(m.Button,{variant:"secondary",isSmall:!0,disabled:!o&&!n,onClick:()=>t({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,g.__)("Reset"))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,g.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function({selector:e,layout:t={}}){const{contentSize:n,wideSize:o}=t,r=null!==so("spacing.blockGap");let l=n||o?`\n\t\t\t\t\t${lo(e,"> *")} {\n\t\t\t\t\t\tmax-width: ${null!=n?n:o};\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${lo(e,'> [data-align="wide"]')} {\n\t\t\t\t\t\tmax-width: ${null!=o?o:n};\n\t\t\t\t\t}\n\n\t\t\t\t\t${lo(e,'> [data-align="full"]')} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return l+=`\n\t\t\t${lo(e,'> [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${lo(e,'> [data-align="right"]')} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-left: 2em;\n\t\t\t}\n\n\t\t`,r&&(l+=`\n\t\t\t\t${lo(e,"> * + *")} {\n\t\t\t\t\tmargin-top: var( --wp--style--block-gap );\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t`),(0,s.createElement)("style",null,l)},getOrientation:()=>"vertical",getAlignments(e){if(void 0!==e.alignments)return e.alignments;const t=["left","center","right"];return e.contentSize&&t.unshift("full"),e.wideSize&&t.unshift("wide"),t}},fo];function ko(e="default"){return vo.find((t=>t.name===e))}const _o={type:"default"},yo=(0,s.createContext)(_o),Eo=yo.Provider;function Co({layout:e={},...t}){const n=ko(e.type);return n?(0,s.createElement)(n.save,i({layout:e},t)):null}const So=["left","center","right","wide","full"],wo=["wide","full"];function Bo(e=So){const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=(0,s.useContext)(yo),r=ko(null==o?void 0:o.type),l=r.getAlignments(o);if(n)return l.filter((t=>e.includes(t)));if("default"!==r.name)return[];const{alignments:i=So}=o;return e.filter((e=>(o.alignments||t||!wo.includes(e))&&i.includes(e)))}const Io={left:{icon:Xn,title:(0,g.__)("Align left")},center:{icon:Qn,title:(0,g.__)("Align center")},right:{icon:Zn,title:(0,g.__)("Align right")},wide:{icon:Jn,title:(0,g.__)("Wide width")},full:{icon:eo,title:(0,g.__)("Full width")}},xo={isAlternate:!0};var To=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const l=Bo(n);if(0===l.length)return null;const a=Io[e],c=Io.center,u=o?m.ToolbarGroup:m.ToolbarDropdownMenu,d=o?{isCollapsed:r}:{};return(0,s.createElement)(u,i({popoverProps:xo,icon:a?a.icon:c.icon,label:(0,g.__)("Align"),toggleProps:{describedBy:(0,g.__)("Change alignment")},controls:l.map((n=>{return{...Io[n],isActive:e===n,role:r?"menuitemradio":void 0,onClick:(o=n,()=>t(e===o?void 0:o))};var o}))},d))};function No(e){return(0,s.createElement)(To,i({},e,{isToolbar:!1}))}function Lo(e){return(0,s.createElement)(To,i({},e,{isToolbar:!0}))}const Po=["left","center","right","wide","full"],Ro=["wide","full"];function Ao(e,t=!0,n=!0){let o;return o=Array.isArray(e)?Po.filter((t=>e.includes(t))):!0===e?Po:[],!n||!0===e&&!t?(0,u.without)(o,...Ro):o}const Mo=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Ao((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0));return(0,s.createElement)(s.Fragment,null,o.length>0&&(0,s.createElement)(Yn,{group:"block",__experimentalExposeToChildren:!0},(0,s.createElement)(No,{value:t.attributes.align,onChange:e=>{var n,o;e||(null===(n=(0,r.getBlockType)(t.name).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"),Do=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=Bo(Ao((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.includes(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:[...Po,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Do),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Mo),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Ao((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),window.wp.warning;var Oo={default:(0,m.createSlotFill)("InspectorControls"),advanced:(0,m.createSlotFill)("InspectorAdvancedControls")};function Fo({__experimentalGroup:e="default",children:t}){var n;const o=Wn(),r=null===(n=Oo[e])||void 0===n?void 0:n.Fill;return r?o?(0,s.createElement)(m.__experimentalStyleProvider,{document:document},(0,s.createElement)(r,null,t)):null:("undefined"!=typeof process&&process.env,null)}function Vo({__experimentalGroup:e="default",bubblesVirtually:t=!0,...n}){var o;const r=null===(o=Oo[e])||void 0===o?void 0:o.Slot,l=(0,m.__experimentalUseSlot)(null==r?void 0:r.__unstableName);return r&&l?Boolean(l.fills&&l.fills.length)?(0,s.createElement)(r,i({},n,{bubblesVirtually:t})):null:("undefined"!=typeof process&&process.env,null)}const Ho=Fo;Ho.Slot=Vo;const zo=e=>(0,s.createElement)(Fo,i({},e,{__experimentalGroup:"advanced"}));zo.Slot=e=>(0,s.createElement)(Vo,i({},e,{__experimentalGroup:"advanced"})),zo.slotName="InspectorAdvancedControls";var Go=Ho;const Uo=/[\s#]/g,Wo=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(m.TextControl,{className:"html-anchor-control",label:(0,g.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,g.__)("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)(m.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},(0,g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,g.__)("Add an anchor"),onChange:e=>{e=e.replace(Uo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(Go,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(Go,null,(0,s.createElement)(m.PanelBody,{title:(0,g.__)("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",Wo),(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 jo=(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)(Go,{__experimentalGroup:"advanced"},(0,s.createElement)(m.TextControl,{autoComplete:"off",label:(0,g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,g.__)("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",jo),(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 $o=n(7621),Ko=n.n($o);const qo=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},Yo=(e,t)=>(0,u.find)(e,{color:t});function Xo(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const Qo=[];function Zo(e){if(e)return`has-${e}-gradient-background`}function Jo(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function er(e,t){return(0,u.find)(e,["gradient",t])}function tr(e,t){const n=er(e,t);return n&&n.slug}function nr({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=Un(),o=so("color.gradients")||Qo,{gradient:r,customGradient:l}=(0,p.useSelect)((o=>{const{getBlockAttributes:r}=o(Vn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:i}=(0,p.useDispatch)(Vn),a=(0,s.useCallback)((r=>{const l=tr(o,r);i(n,l?{[e]:l,[t]:void 0}:{[e]:void 0,[t]:r})}),[o,n,i]),c=Zo(r);let u;return u=r?Jo(o,r):l,{gradientClass:c,gradientValue:u,setGradient:a}}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
5
+ const or=(0,g.__)("(Color: %s)"),rr=(0,g.__)("(Gradient: %s)"),lr=["colors","disableCustomColors","gradients","disableCustomGradients"];// translators: first %s: the gradient name or value (e.g. red to green or linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)
6
+ function ir({colors:e,gradients:t,label:n,currentTab:o,colorValue:r,gradientValue:l}){let i,a;if("color"===o){if(r){i=r;const t=Yo(e,i),n=t&&t.name;a=(0,g.sprintf)(or,n||i)}}else if("gradient"===o&&l){i=l;const e=er(t,i),n=e&&e.name;a=(0,g.sprintf)(rr,n||i)}return(0,s.createElement)(s.Fragment,null,n,!!i&&(0,s.createElement)(m.ColorIndicator,{colorValue:i,"aria-label":a}))}function sr({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,className:r,label:l,onColorChange:i,onGradientChange:a,colorValue:d,gradientValue:p,clearable:f}){const h=i&&(!(0,u.isEmpty)(e)||!n),b=a&&(!(0,u.isEmpty)(t)||!o),[v,k]=(0,s.useState)(p?"gradient":!!h&&"color");return h||b?(0,s.createElement)(m.BaseControl,{className:c()("block-editor-color-gradient-control",r)},(0,s.createElement)("fieldset",null,(0,s.createElement)("legend",null,(0,s.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,s.createElement)(m.BaseControl.VisualLabel,null,(0,s.createElement)(ir,{currentTab:v,label:l,colorValue:d,gradientValue:p})))),h&&b&&(0,s.createElement)(m.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},(0,s.createElement)(m.Button,{isSmall:!0,isPressed:"color"===v,onClick:()=>k("color")},(0,g.__)("Solid")),(0,s.createElement)(m.Button,{isSmall:!0,isPressed:"gradient"===v,onClick:()=>k("gradient")},(0,g.__)("Gradient"))),("color"===v||!b)&&(0,s.createElement)(m.ColorPalette,{value:d,onChange:b?e=>{i(e),a()}:i,colors:e,disableCustomColors:n,clearable:f}),("gradient"===v||!h)&&(0,s.createElement)(m.GradientPicker,{value:p,onChange:h?e=>{a(e),i()}:a,gradients:t,disableCustomGradients:o,clearable:f}))):null}function ar(e){const t={};return t.colors=so("color.palette"),t.gradients=so("color.gradients"),t.disableCustomColors=!so("color.custom"),t.disableCustomGradients=!so("color.customGradient"),(0,s.createElement)(sr,i({},t,e))}var cr=function(e){return(0,u.every)(lr,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(sr,e):(0,s.createElement)(ar,e)};const ur=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,ur),u.identity);return(0,u.isEmpty)(t)?void 0:t},dr=[];function mr(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=so("color.palette")||dr,l=!so("color.custom"),i=!so("color.customGradient"),[a,c]=(0,s.useState)((()=>{var e,o;return null===(e=qo(r,t,null==n||null===(o=n.border)||void 0===o?void 0:o.color))||void 0===e?void 0:e.color}));return(0,s.createElement)(cr,{label:(0,g.__)("Color"),colorValue:a,colors:r,gradients:void 0,disableCustomColors:l,disableCustomGradients:i,onColorChange:e=>{c(e);const t=Yo(r,e),l={...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:ur(l),borderColor:i})}})}function pr(e,t,n){var o;if(!Fr(t,"color")||Vr(t))return e;const{borderColor:r,style:l}=n,i=Xo("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 fr=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:a}=l,c=so("color.palette")||dr;if(!Fr(r,"color")||Vr(r))return(0,s.createElement)(e,t);const u={borderColor:a?null===(n=qo(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 gr(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function hr(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,m.__experimentalParseUnit)(e))),n=t.map((e=>e[0])),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=gr(o);return 0===r||r?`${r}${l}`:null}function br(e={}){const t=hr(e);return isNaN(parseFloat(t))}function vr(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}function kr({onChange:e,values:t,...n}){const o=hr(t),r=vr(t)&&br(t),l=r?(0,g.__)("Mixed"):null;return(0,s.createElement)(m.__experimentalUnitControl,i({},n,{"aria-label":(0,g.__)("Border radius"),disableUnits:r,isOnly:!0,value:o,onChange:e,placeholder:l}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Fr(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",pr),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Fr(e,"color")||Vr(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),pr(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",fr);const _r={topLeft:(0,g.__)("Top left"),topRight:(0,g.__)("Top right"),bottomLeft:(0,g.__)("Bottom left"),bottomRight:(0,g.__)("Bottom right")};function yr({onChange:e,values:t,...n}){const o="string"!=typeof t?t:{topLeft:t,topRight:t,bottomLeft:t,bottomRight:t};return(0,s.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(_r).map((([t,r])=>{return(0,s.createElement)(m.__experimentalUnitControl,i({},n,{key:t,"aria-label":r,value:o[t],onChange:(l=t,t=>{e&&e({...o,[l]:t||void 0})})}));var l})))}var Er=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),Cr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 Sr({isLinked:e,...t}){const n=e?(0,g.__)("Unlink Radii"):(0,g.__)("Link Radii");return(0,s.createElement)(m.Tooltip,{text:n},(0,s.createElement)(m.Button,i({},t,{className:"component-border-radius-control__linked-button",isPrimary:e,isSecondary:!e,isSmall:!0,icon:e?Er:Cr,iconSize:16,"aria-label":n})))}const wr={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},Br={px:100,em:20,rem:20};function Ir({onChange:e,values:t}){const[n,o]=(0,s.useState)(!vr(t)||!br(t)),r=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"]}),l=function(e={}){if("string"==typeof e){const[,t]=(0,m.__experimentalParseUnit)(e);return t||"px"}return gr(Object.values(e).map((e=>{const[,t]=(0,m.__experimentalParseUnit)(e);return t})))}(t),i=r&&r.find((e=>e.value===l)),a=(null==i?void 0:i.step)||1,[c]=(0,m.__experimentalParseUnit)(hr(t));return(0,s.createElement)("fieldset",{className:"components-border-radius-control"},(0,s.createElement)("legend",null,(0,g.__)("Radius")),(0,s.createElement)("div",{className:"components-border-radius-control__wrapper"},n?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(kr,{className:"components-border-radius-control__unit-control",values:t,min:0,onChange:e,unit:l,units:r}),(0,s.createElement)(m.RangeControl,{className:"components-border-radius-control__range-control",value:c,min:0,max:Br[l],initialPosition:0,withInputField:!1,onChange:t=>{e(void 0!==t?`${t}${l}`:void 0)},step:a})):(0,s.createElement)(yr,{min:0,onChange:e,values:t||wr,units:r}),(0,s.createElement)(Sr,{onClick:()=>o(!n),isLinked:n})))}function xr(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Ir,{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=ur(t)),o({style:t})}})}var Tr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{d:"M5 11.25h14v1.5H5z"})),Nr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"})),Lr=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(F.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 Pr=[{label:(0,g.__)("Solid"),icon:Tr,value:"solid"},{label:(0,g.__)("Dashed"),icon:Nr,value:"dashed"},{label:(0,g.__)("Dotted"),icon:Lr,value:"dotted"}];function Rr({onChange:e,value:t}){return(0,s.createElement)("fieldset",{className:"components-border-style-control"},(0,s.createElement)("legend",null,(0,g.__)("Style")),(0,s.createElement)("div",{className:"components-border-style-control__buttons"},Pr.map((n=>(0,s.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===t,onClick:()=>e(n.value===t?void 0:n.value),"aria-label":n.label})))))}const Ar=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,s.createElement)(Rr,{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:ur(t)})}})},Mr=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)();(0,s.useEffect)((()=>{"none"!==i&&c(i)}),[i]),(0,s.useEffect)((()=>{(t||l)&&d({name:t||void 0,color:l||void 0})}),[t,l]);const p=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"]});return(0,s.createElement)(m.__experimentalUnitControl,{value:r,label:(0,g.__)("Width"),min:0,onChange:e=>{let r={...n,border:{...null==n?void 0:n.border,width:e}},l=t;const s=0===parseFloat(e);s&&(l=void 0,r.border.color=void 0,r.border.style="none"),s||"none"!==i||(r.border.style=a),s||void 0!==t||(l=null==u?void 0:u.name,r.border.color=null==u?void 0:u.color),void 0!==e&&""!==e||(r=ur(r)),o({borderColor:l,style:r})},units:p})},Dr="__experimentalBorder";function Or(e){const t=Hr(e),n=Fr(e.name),o=so("border.customColor")&&Fr(e.name,"color"),r=so("border.customRadius")&&Fr(e.name,"radius"),l=so("border.customStyle")&&Fr(e.name,"style"),i=so("border.customWidth")&&Fr(e.name,"width");return t||!n?null:(0,s.createElement)(Go,null,(0,s.createElement)(m.PanelBody,{className:"block-editor-hooks__border-controls",title:(0,g.__)("Border"),initialOpen:!1},(i||l)&&(0,s.createElement)("div",{className:"block-editor-hooks__border-controls-row"},i&&(0,s.createElement)(Mr,e),l&&(0,s.createElement)(Ar,e)),o&&(0,s.createElement)(mr,e),r&&(0,s.createElement)(xr,e)))}function Fr(e,t="any"){if("web"!==s.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,Dr);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 Vr(e){const t=(0,r.getBlockSupport)(e,Dr);return null==t?void 0:t.__experimentalSkipSerialization}const Hr=()=>[!so("border.customColor"),!so("border.customRadius"),!so("border.customStyle"),!so("border.customWidth")].every(Boolean),zr=(0,g.__)("(%s: color %s)"),Gr=(0,g.__)("(%s: gradient %s)"),Ur=["colors","disableCustomColors","gradients","disableCustomGradients"],Wr=({colors:e,gradients:t,settings:n})=>n.map((({colorValue:n,gradientValue:o,label:r,colors:l,gradients:i},a)=>{if(!n&&!o)return null;let c;if(n){const t=Yo(l||e,n);c=(0,g.sprintf)(zr,r.toLowerCase(),t&&t.name||n)}else{const e=er(i||t,n);c=(0,g.sprintf)(Gr,r.toLowerCase(),e&&e.name||o)}return(0,s.createElement)(m.ColorIndicator,{key:a,colorValue:n||o,"aria-label":c})})),jr=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:l,settings:a,title:d,...p})=>{if((0,u.isEmpty)(t)&&(0,u.isEmpty)(n)&&o&&r&&(0,u.every)(a,(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 f=(0,s.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},d,(0,s.createElement)(Wr,{colors:t,gradients:n,settings:a}));return(0,s.createElement)(m.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",e),title:f},p),a.map(((e,l)=>(0,s.createElement)(cr,i({key:l,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r},e)))),l)},$r=e=>{const t={};return t.colors=so("color.palette"),t.gradients=so("color.gradients"),t.disableCustomColors=!so("color.custom"),t.disableCustomGradients=!so("color.customGradient"),(0,s.createElement)(jr,i({},t,e))};var Kr=e=>(0,u.every)(Ur,(t=>e.hasOwnProperty(t)))?(0,s.createElement)(jr,e):(0,s.createElement)($r,e);function qr({tinyBackgroundColor:e,tinyTextColor:t,backgroundColor:n,textColor:o}){const r=e.getBrightness()<t.getBrightness()?(0,g.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color."):(0,g.__)("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,It.speak)((0,g.__)("This color combination may be hard for people to read."))}),[n,o]),(0,s.createElement)("div",{className:"block-editor-contrast-checker"},(0,s.createElement)(m.Notice,{spokenMessage:null,status:"warning",isDismissible:!1},r))}var Yr=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fontSize:o,isLargeText:r,textColor:l}){if(!e&&!t||!l&&!n)return null;const i=Ko()(e||t),a=Ko()(l||n);return 1!==i.getAlpha()||1!==a.getAlpha()||Ko().isReadable(i,a,{level:"AA",size:r||!1!==r&&o>=24?"large":"small"})?null:(0,s.createElement)(qr,{backgroundColor:e,textColor:l,tinyBackgroundColor:i,tinyTextColor:a})};const Xr=(0,s.createContext)();function Qr({children:e}){const t=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(Xr.Provider,{value:t},e)}function Zr(e){const{refs:t,callbacks:n}=(0,s.useContext)(Xr),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 Jr(e){const{refs:t}=(0,s.useContext)(Xr),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 el(e){const{callbacks:t}=(0,s.useContext)(Xr),n=Jr(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 tl(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function nl({settings:e,clientId:t,enableContrastChecking:n=!0}){const[o,r]=(0,s.useState)(),[l,i]=(0,s.useState)(),a=Jr(t);return(0,s.useEffect)((()=>{if(!n)return;if(!a.current)return;i(tl(a.current).color);let e=a.current,t=tl(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===e.parentNode.ELEMENT_NODE;)e=e.parentNode,t=tl(e).backgroundColor;r(t)})),(0,s.createElement)(Go,null,(0,s.createElement)(Kr,{title:(0,g.__)("Color"),initialOpen:!1,settings:e},n&&(0,s.createElement)(Yr,{backgroundColor:o,textColor:l})))}const ol="color",rl=[],ll=e=>{const t=(0,r.getBlockSupport)(e,ol);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},il=e=>{const t=(0,r.getBlockSupport)(e,ol);return null==t?void 0:t.__experimentalSkipSerialization},sl=e=>{const t=(0,r.getBlockSupport)(e,ol);return(0,u.isObject)(t)&&!!t.gradients};function al(e,t,n){var o,r,l,i,s,a;if(!ll(t)||il(t))return e;const u=sl(t),{backgroundColor:d,textColor:m,gradient:p,style:f}=n,g=Xo("background-color",d),h=Zo(p),b=Xo("color",m),v=c()(e.className,b,h,{[g]:!(u&&null!=f&&null!==(o=f.color)&&void 0!==o&&o.gradient||!g),"has-text-color":m||(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&&(p||(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=v||void 0,e}const cl=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?qo(e,n[1]).color:t};function ul(e){var t,n,o,l,i,a,c,d,m;const{name:p,attributes:f}=e,h=so("color.palette")||rl,b=so("color.gradients")||rl,v=so("color.custom"),k=so("color.customGradient"),_=so("color.link"),y=so("color.text"),E=so("color.background"),C=(0,s.useRef)(f);if((0,s.useEffect)((()=>{C.current=f}),[f]),!ll(p))return null;const S=(e=>{if("web"!==s.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,ol);return(0,u.isObject)(t)&&!!t.link})(p)&&_&&(h.length>0||v),w=(e=>{const t=(0,r.getBlockSupport)(e,ol);return t&&!1!==t.text})(p)&&y&&(h.length>0||v),B=(e=>{const t=(0,r.getBlockSupport)(e,ol);return t&&!1!==t.background})(p)&&E&&(h.length>0||v),I=sl(p)&&(b.length>0||k);if(!(S||w||B||I))return null;const{style:x,textColor:T,backgroundColor:N,gradient:L}=f;let P;if(I&&L)P=Jo(b,L);else if(I){var R;P=null==x||null===(R=x.color)||void 0===R?void 0:R.gradient}const A=t=>n=>{var o,r;const l=Yo(h,n),i=t+"Color",s={...C.current.style,color:{...null===(o=C.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:ur(s),[i]:a};e.setAttributes(c),C.current={...C.current,...c}};return(0,s.createElement)(nl,{enableContrastChecking:!("web"!==s.Platform.OS||L||null!=x&&null!==(t=x.color)&&void 0!==t&&t.gradient),clientId:e.clientId,settings:[...w?[{label:(0,g.__)("Text color"),onColorChange:A("text"),colorValue:qo(h,T,null==x||null===(n=x.color)||void 0===n?void 0:n.text).color}]:[],...B||I?[{label:(0,g.__)("Background color"),onColorChange:B?A("background"):void 0,colorValue:qo(h,N,null==x||null===(o=x.color)||void 0===o?void 0:o.background).color,gradientValue:P,onGradientChange:I?t=>{const n=tr(b,t);let o;if(n){var r,l,i;const e={...null===(r=C.current)||void 0===r?void 0:r.style,color:{...null===(l=C.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:ur(e),gradient:n}}else{var s,a,c;const e={...null===(s=C.current)||void 0===s?void 0:s.style,color:{...null===(a=C.current)||void 0===a||null===(c=a.style)||void 0===c?void 0:c.color,gradient:t}};o={style:ur(e),gradient:void 0}}e.setAttributes(o),C.current={...C.current,...o}}:void 0}]:[],...S?[{label:(0,g.__)("Link Color"),onColorChange:t=>{const n=Yo(h,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=function(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},["elements","link","color","text"],n,u.clone)}(x,0,o);e.setAttributes({style:r})},colorValue:cl(h,null==x||null===(l=x.elements)||void 0===l||null===(i=l.link)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.text),clearable:!(null==x||null===(c=x.elements)||void 0===c||null===(d=c.link)||void 0===d||null===(m=d.color)||void 0===m||!m.text)}]:[]]})}const dl=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,r;const{name:l,attributes:a}=t,{backgroundColor:c,textColor:u}=a,d=so("color.palette")||rl;if(!ll(l)||il(l))return(0,s.createElement)(e,t);const m={color:u?null===(n=qo(d,u))||void 0===n?void 0:n.color:void 0,backgroundColor:c?null===(o=qo(d,c))||void 0===o?void 0:o.color:void 0};let p=t.wrapperProps;return p={...t.wrapperProps,style:{...m,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,s.createElement)(e,i({},t,{wrapperProps:p}))}));(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return ll(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),sl(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",al),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!ll(e)||il(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),al(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",dl);var ml=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),pl=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 fl=[{name:(0,g.__)("Underline"),value:"underline",icon:ml},{name:(0,g.__)("Strikethrough"),value:"line-through",icon:pl}];function gl({value:e,onChange:t}){return(0,s.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,s.createElement)("legend",null,(0,g.__)("Decoration")),(0,s.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},fl.map((n=>(0,s.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:n.value===e,onClick:()=>t(n.value===e?void 0:n.value),"aria-label":n.name})))))}const hl="typography.__experimentalTextDecoration";function bl(e){var t;const{attributes:{style:n},setAttributes:o}=e;return vl(e)?null:(0,s.createElement)(gl,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:ur({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function vl({name:e}={}){const t=!(0,r.hasBlockSupport)(e,hl),n=so("typography.customTextDecorations");return t||!n}var kl=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),_l=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),yl=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 El=[{name:(0,g.__)("Uppercase"),value:"uppercase",icon:kl},{name:(0,g.__)("Lowercase"),value:"lowercase",icon:_l},{name:(0,g.__)("Capitalize"),value:"capitalize",icon:yl}];function Cl({value:e,onChange:t}){return(0,s.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,s.createElement)("legend",null,(0,g.__)("Letter case")),(0,s.createElement)("div",{className:"block-editor-text-transform-control__buttons"},El.map((n=>(0,s.createElement)(m.Button,{key:n.value,icon:n.icon,isSmall:!0,isPressed:e===n.value,"aria-label":n.name,onClick:()=>t(e===n.value?void 0:n.value)})))))}const Sl="typography.__experimentalTextTransform";function wl(e){var t;const{attributes:{style:n},setAttributes:o}=e;return Bl(e)?null:(0,s.createElement)(Cl,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:ur({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function Bl({name:e}={}){const t=!(0,r.hasBlockSupport)(e,Sl),n=so("typography.customTextTransforms");return t||!n}function Il(e){const t=!vl(e),n=!Bl(e);return t||n?(0,s.createElement)("div",{className:"block-editor-text-decoration-and-transform"},t&&(0,s.createElement)(bl,e),n&&(0,s.createElement)(wl,e)):null}var xl=window.wp.keycodes;function Tl({value:e,onChange:t}){const n=function(e){return void 0!==e&&""!==e}(e),o=n?e:"";return(0,s.createElement)("div",{className:"block-editor-line-height-control"},(0,s.createElement)(m.TextControl,{autoComplete:"off",onKeyDown:e=>{const{keyCode:o}=e;o!==xl.ZERO||n||(e.preventDefault(),t("0"))},onChange:e=>{if(n)return void t(e);let o=e;switch(e){case"0.1":o=1.6;break;case"0":o=1.4}t(o)},label:(0,g.__)("Line height"),placeholder:1.5,step:.1,type:"number",value:o,min:0}))}const Nl="typography.lineHeight";function Ll(e){var t;const{attributes:{style:n}}=e;return Pl(e)?null:(0,s.createElement)(Tl,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:t=>{const o={...n,typography:{...null==n?void 0:n.typography,lineHeight:t}};e.setAttributes({style:ur(o)})}})}function Pl({name:e}={}){const t=!so("typography.customLineHeight");return!(0,r.hasBlockSupport)(e,Nl)||t}const Rl=[{name:(0,g.__)("Regular"),value:"normal"},{name:(0,g.__)("Italic"),value:"italic"}],Al=[{name:(0,g.__)("Thin"),value:"100"},{name:(0,g.__)("Extra Light"),value:"200"},{name:(0,g.__)("Light"),value:"300"},{name:(0,g.__)("Regular"),value:"400"},{name:(0,g.__)("Medium"),value:"500"},{name:(0,g.__)("Semi Bold"),value:"600"},{name:(0,g.__)("Bold"),value:"700"},{name:(0,g.__)("Extra Bold"),value:"800"},{name:(0,g.__)("Black"),value:"900"}];function Ml(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,a={key:"default",name:(0,g.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},c=(0,s.useMemo)((()=>n&&o?(()=>{const e=[a];return Rl.forEach((({name:t,value:n})=>{Al.forEach((({name:o,value:r})=>{const l="normal"===n?o:(0,g.sprintf)(
7
  /* translators: 1: Font weight name. 2: Font style name. */
8
+ (0,g.__)("%1$s %2$s"),o,t);e.push({key:`${n}-${r}`,name:l,style:{fontStyle:n,fontWeight:r}})}))})),e})():n?(()=>{const e=[a];return Rl.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[a];return Al.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options]),u=c.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l));return(0,s.createElement)("fieldset",{className:"components-font-appearance-control"},i&&(0,s.createElement)(m.CustomSelectControl,{className:"components-font-appearance-control__select",label:n?o?(0,g.__)("Appearance"):(0,g.__)("Font style"):(0,g.__)("Font weight"),describedBy:u?n?o?(0,g.sprintf)(// translators: %s: Currently selected font appearance.
9
+ (0,g.__)("Currently selected font appearance: %s"),u.name):(0,g.sprintf)(// translators: %s: Currently selected font style.
10
+ (0,g.__)("Currently selected font style: %s"),u.name):(0,g.sprintf)(// translators: %s: Currently selected font weight.
11
+ (0,g.__)("Currently selected font weight: %s"),u.name):(0,g.__)("No selected font appearance"),options:c,value:u,onChange:({selectedItem:e})=>t(e.style)}))}const Dl="typography.__experimentalFontStyle",Ol="typography.__experimentalFontWeight";function Fl(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!Vl(e),i=!Hl(e);if(!l&&!i)return null;const 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)(Ml,{onChange:e=>{r({style:ur({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:a,fontWeight:c}})}function Vl({name:e}={}){const t=(0,r.hasBlockSupport)(e,Dl),n=so("typography.customFontStyle");return!t||!n}function Hl({name:e}={}){const t=(0,r.hasBlockSupport)(e,Ol),n=so("typography.customFontWeight");return!t||!n}function zl(e){const t=Vl(e),n=Hl(e);return t&&n}function Gl({value:e="",onChange:t,fontFamilies:n,...o}){const r=so("typography.fontFamilies");if(n||(n=r),(0,u.isEmpty)(n))return null;const l=[{value:"",label:(0,g.__)("Default")},...n.map((({fontFamily:e,name:t})=>({value:e,label:t||e})))];return(0,s.createElement)(m.SelectControl,i({label:(0,g.__)("Font family"),options:l,value:e,onChange:t,labelPosition:"top"},o))}const Ul="typography.__experimentalFontFamily";function Wl({name:e,setAttributes:t,attributes:{style:n={}}}){var o;const r=so("typography.fontFamilies");if(jl({name:e}))return null;const l=((e,t)=>{const n=/var:preset\|font-family\|(.+)/.exec(t);if(n&&n[1]){const t=(0,u.find)(e,(({slug:e})=>e===n[1]));if(t)return t.fontFamily}return t})(r,null===(o=n.typography)||void 0===o?void 0:o.fontFamily);return(0,s.createElement)(Gl,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const o=(0,u.find)(r,(({fontFamily:t})=>t===e));t({style:ur({...n,typography:{...n.typography||{},fontFamily:o?`var:preset|font-family|${o.slug}`:e||void 0}})})}})}function jl({name:e}){const t=so("typography.fontFamilies");return!t||0===t.length||!(0,r.hasBlockSupport)(e,Ul)}var $l=window.wp.tokenList,Kl=n.n($l);const ql=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Yl(e,t){return(0,u.find)(e,{size:t})||{size:t}}function Xl(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Ql=function(e){const t=so("typography.fontSizes"),n=!so("typography.customFontSize");return(0,s.createElement)(m.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Zl="typography.fontSize";function Jl(e,t,n){if(!(0,r.hasBlockSupport)(t,Zl))return e;if((0,r.hasBlockSupport)(t,"typography.__experimentalSkipSerialization"))return e;const o=new(Kl())(e.className);o.add(Xl(n.fontSize));const l=o.value;return e.className=l||void 0,e}function ei(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=ti(e),a=so("typography.fontSizes");if(i)return null;const c=ql(a,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),u=(null==c?void 0:c.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,s.createElement)(Ql,{onChange:e=>{const t=Yl(a,e).slug;l({style:ur({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:u})}function ti({name:e}={}){const t=so("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,Zl)||!n}const ni=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=so("typography.fontSizes"),{name:i,attributes:{fontSize:a,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,Zl)||(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=ql(l,a,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,m={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,s.createElement)(e,m)}),"withFontSizeInlineStyles");function oi({value:e,onChange:t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["px","em","rem"],defaultValues:{px:"2",em:".2",rem:".2"}});return(0,s.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Letter-spacing"),value:e,__unstableInputWidth:"60px",units:n,onChange:t})}(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,Zl)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Jl),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,Zl))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Jl(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",ni);const ri="typography.__experimentalLetterSpacing";function li(e){var t;const{attributes:{style:n},setAttributes:o}=e;return ii(e)?null:(0,s.createElement)(oi,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:ur({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})}})}function ii({name:e}={}){const t=!(0,r.hasBlockSupport)(e,ri),n=so("typography.customLetterSpacing");return t||!n}const si=[Nl,Zl,Dl,Ol,Ul,hl,Sl,ri];function ai(e){const t=function(e={}){const t=[zl(e),ti(e),Pl(e),jl(e),vl(e),Bl(e),ii(e)];return t.filter(Boolean).length===t.length}(e),n=ci(e.name);return t||!n?null:(0,s.createElement)(Go,null,(0,s.createElement)(m.PanelBody,{title:(0,g.__)("Typography")},(0,s.createElement)(Wl,e),(0,s.createElement)(ei,e),(0,s.createElement)(Fl,e),(0,s.createElement)(Ll,e),(0,s.createElement)(Il,e),(0,s.createElement)(li,e)))}const ci=e=>si.some((t=>(0,r.hasBlockSupport)(e,t)));function ui(e){const t=(0,r.getBlockSupport)(e,ki);return!!(!0===t||null!=t&&t.blockGap)}function di({name:e}={}){const t=!so("spacing.blockGap");return!ui(e)||t}function mi(e){var t;const{clientId:n,attributes:{style:o},setAttributes:r}=e,l=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]}),i=Jr(n);return di(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__experimentalUnitControl,{label:(0,g.__)("Block gap"),min:0,onChange:e=>{var t;const n={...o,spacing:{...null==o?void 0:o.spacing,blockGap:e}};r({style:ur(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 pi(e){const t=(0,r.getBlockSupport)(e,ki);return!!(!0===t||null!=t&&t.margin)}function fi({name:e}={}){const t=!so("spacing.customMargin"),n=!wi(e,"margin");return!pi(e)||t||n}function gi(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]}),i=Si(n,"margin"),a=i&&i.some((e=>yi.includes(e)));return fi(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__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:ur(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:ur(t)})},label:(0,g.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}function hi(e){const t=(0,r.getBlockSupport)(e,ki);return!!(!0===t||null!=t&&t.padding)}function bi({name:e}={}){const t=!so("spacing.customPadding"),n=!wi(e,"padding");return!hi(e)||t||n}function vi(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"]}),i=Si(n,"padding"),a=i&&i.some((e=>yi.includes(e)));return bi(e)?null:s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__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:ur(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:ur(t)})},label:(0,g.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:a})),native:null})}const ki="spacing",_i=["top","right","bottom","left"],yi=["vertical","horizontal"];function Ei(e){const t=di(e),n=bi(e),o=fi(e),l=Ci(e),i=(a=e.name,"web"===s.Platform.OS&&(ui(a)||hi(a)||pi(a)));var a;if(l||!i)return null;const c=(0,r.getBlockSupport)(e.name,[ki,"__experimentalDefaultControls"]);return(0,s.createElement)(Go,{key:"dimensions"},(0,s.createElement)(m.__experimentalToolsPanel,{label:(0,g.__)("Dimensions options"),header:(0,g.__)("Dimensions"),resetAll:()=>{const{style:t}=e.attributes;e.setAttributes({style:ur({...t,spacing:{...null==t?void 0:t.spacing,blockGap:void 0,margin:void 0,padding:void 0}})})}},!n&&(0,s.createElement)(m.__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,g.__)("Padding"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:ur({...n,spacing:{...null==n?void 0:n.spacing,padding:void 0}})})}(e),isShownByDefault:null==c?void 0:c.padding},(0,s.createElement)(vi,e)),!o&&(0,s.createElement)(m.__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,g.__)("Margin"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:ur({...n,spacing:{...null==n?void 0:n.spacing,margin:void 0}})})}(e),isShownByDefault:null==c?void 0:c.margin},(0,s.createElement)(gi,e)),!t&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:"single-column",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,g.__)("Block gap"),onDeselect:()=>function({attributes:e={},setAttributes:t}){const{style:n}=e;t({style:{...n,spacing:{...null==n?void 0:n.spacing,blockGap:void 0}}})}(e),isShownByDefault:null==c?void 0:c.blockGap},(0,s.createElement)(mi,e))))}const Ci=(e={})=>{const t=di(e),n=bi(e),o=fi(e);return t&&n&&o};function Si(e,t){const n=(0,r.getBlockSupport)(e,ki);if(n&&"boolean"!=typeof n[t])return n[t]}function wi(e,t){const n=Si(e,t);return!(n&&n.some((e=>_i.includes(e)))&&n.some((e=>yi.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}const Bi=[...si,Dr,ol,ki],Ii=e=>Bi.some((t=>(0,r.hasBlockSupport)(e,t))),xi="var:";function Ti(e){return(0,u.startsWith)(e,xi)?`var(--wp--${e.slice(xi.length).split("|").join("--")})`:e}function Ni(e={}){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]=Ti(l))})):t[n]=Ti((0,u.get)(e,o))}})),t}const Li={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[ol],"typography.__experimentalSkipSerialization":["typography"],[`${ki}.__experimentalSkipSerialization`]:["spacing"]},Pi={...Li,[`${ki}`]:["spacing.blockGap"]};function Ri(e,t,n,o=Pi){if(!Ii(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={...Ni(l),...e.style},e}const Ai=(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)(ai,t),(0,s.createElement)(Or,t),(0,s.createElement)(ul,t),(0,s.createElement)(Ei,t)),(0,s.createElement)(e,t))}),"withToolbarControls"),Mi=(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)}`,m=function(e,t={}){return(0,u.map)(t,((t,n)=>{const o=Ni(t);return(0,u.isEmpty)(o)?"":[`.${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e}${"link"===n?"!important":""};`)),"}"].join("\n")})).join("\n")}(a,null===(o=t.attributes.style)||void 0===o?void 0:o.elements);return(0,s.createElement)(s.Fragment,null,l&&(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html: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 Ii(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Ri),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Ii(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Ri(o,e,n,Li)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",Ai),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",Mi);var Di=function({value:e,onChange:t,onToggle:n,duotonePalette:o,colorPalette:r,disableCustomColors:l,disableCustomDuotone:i}){return(0,s.createElement)(m.Popover,{className:"block-editor-duotone-control__popover",headerTitle:(0,g.__)("Duotone"),onFocusOutside:n},(0,s.createElement)(m.MenuGroup,{label:(0,g.__)("Duotone")},(0,s.createElement)(m.DuotonePicker,{colorPalette:r,duotonePalette:o,disableCustomColors:l,disableCustomDuotone:i,value:e,onChange:t})))},Oi=function({colorPalette:e,duotonePalette:t,disableCustomColors:n,disableCustomDuotone:o,value:r,onChange:l}){const[i,a]=(0,s.useState)(!1),c=()=>{a((e=>!e))};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.ToolbarButton,{showTooltip:!0,onClick:c,"aria-haspopup":"true","aria-expanded":i,onKeyDown:e=>{i||e.keyCode!==xl.DOWN||(e.preventDefault(),c())},label:(0,g.__)("Apply duotone filter"),icon:(0,s.createElement)(m.DuotoneSwatch,{values:r})}),i&&(0,s.createElement)(Di,{value:r,onChange:l,onToggle:c,duotonePalette:t,colorPalette:e,disableCustomColors:n,disableCustomDuotone:o}))},Fi=window.wp.dom;const Vi=(0,s.createContext)({});function Hi({value:e,children:t}){const n=(0,s.useContext)(Vi),o=(0,s.useMemo)((()=>({...n,...e})),[n,e]);return(0,s.createElement)(Vi.Provider,{value:o,children:t})}var zi=Vi;const Gi={};var Ui=(0,m.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(zi),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):Gi),[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 m=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,p=c()(m,t.className);return(0,s.createElement)(d,i({},e,{context:a,className:p}))}));function Wi(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(Gn,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(Ui,e))}var ji=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),$i=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,s.createElement)("div",{className:c()(e,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},n),(s.Children.count(t)>0||o)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(t)>0&&s.Children.map(t,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,s.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:ji,label:(0,g.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(m.MenuGroup,null,o.map(((e,t)=>(0,s.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title)))))))))},Ki=n(7630);function qi({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:l}){return(0,s.createElement)("div",{className:l},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},e),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,Fi.safeHTML)(n)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:o},r)))}var Yi=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:l}){const i=(a=o(e),(0,u.castArray)(a).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var a;const d=(m=e.originalContent,p=i,(0,Ki.Kx)(m,p).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,p;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(qi,{title:(0,g.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,g.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,s.createElement)(qi,{title:(0,g.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:l,rawContent:d,renderedContent:i}))};const Xi=e=>(0,r.rawHandler)({HTML:e.originalContent});var Qi=(0,d.compose)([(0,p.withSelect)(((e,{clientId:t})=>({block:e(Vn).getBlock(t)}))),(0,p.withDispatch)(((e,{block:t})=>{const{replaceBlock:n}=e(Vn);return{convertToClassic(){n(t.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(t))},convertToHTML(){n(t.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(t))},convertToBlocks(){n(t.clientId,Xi(t))},attemptBlockRecovery(){n(t.clientId,(({name:e,attributes:t,innerBlocks:n})=>(0,r.createBlock)(e,t,n))(t))}}}))])((function({convertToHTML:e,convertToBlocks:t,convertToClassic:n,attemptBlockRecovery:o,block:l}){const i=!!(0,r.getBlockType)("core/html"),[a,c]=(0,s.useState)(!1),u=(0,s.useCallback)((()=>c(!0)),[]),d=(0,s.useCallback)((()=>c(!1)),[]),p=(0,s.useMemo)((()=>[{
12
  // translators: Button to fix block content
13
+ title:(0,g._x)("Resolve","imperative verb"),onClick:u},i&&{title:(0,g.__)("Convert to HTML"),onClick:e},{title:(0,g.__)("Convert to Classic Block"),onClick:n}].filter(Boolean)),[u,e,n]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)($i,{actions:[(0,s.createElement)(m.Button,{key:"recover",onClick:o,variant:"primary"},(0,g.__)("Attempt Block Recovery"))],secondaryActions:p},(0,g.__)("This block contains unexpected or invalid content.")),a&&(0,s.createElement)(m.Modal,{title:// translators: Dialog title to fix block content
14
+ (0,g.__)("Resolve Block"),onRequestClose:d,className:"block-editor-block-compare"},(0,s.createElement)(Yi,{block:l,onKeep:e,onConvert:t,convertor:Xi,convertButtonText:(0,g.__)("Convert to Blocks")})))}));const Zi=(0,s.createElement)($i,{className:"block-editor-block-list__block-crash-warning"},(0,g.__)("This block has encountered an error and cannot be previewed."));var Ji=()=>Zi;class es 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 ts=es,ns=n(4042),os=function({clientId:e}){const[t,n]=(0,s.useState)(""),o=(0,p.useSelect)((t=>t(Vn).getBlock(e)),[e]),{updateBlock:l}=(0,p.useDispatch)(Vn);return(0,s.useEffect)((()=>{n((0,r.getBlockContent)(o))}),[o]),(0,s.createElement)(ns.Z,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,r.getBlockType)(o.name),s=(0,r.getBlockAttributes)(i,t,o.attributes),a=t||(0,r.getSaveContent)(i,s),c=!t||(0,r.isValidBlockContent)(i,s,a);l(e,{attributes:s,originalContent:a,isValid:c}),t||n({content:a})},onChange:e=>n(e.target.value)})},rs=n(8088);const ls=e=>e+1,is=e=>({top:e.offsetTop,left:e.offsetLeft});var ss=function({isSelected:e,adjustScrolling:t,enableAnimation:n,triggerAnimationOnChange:o}){const r=(0,s.useRef)(),l=(0,d.useReducedMotion)()||!n,[i,a]=(0,s.useReducer)(ls,0),[c,u]=(0,s.useReducer)(ls,0),[m,p]=(0,s.useState)({x:0,y:0}),f=(0,s.useMemo)((()=>r.current?is(r.current):null),[o]),g=(0,s.useMemo)((()=>{if(!t||!r.current)return()=>{};const e=(0,Fi.getScrollContainer)(r.current);if(!e)return()=>{};const n=r.current.getBoundingClientRect();return()=>{const t=r.current.getBoundingClientRect().top-n.top;t&&(e.scrollTop+=t)}}),[o,t]);function h({x:t,y:n}){t=Math.round(t),n=Math.round(n),t===h.x&&n===h.y||(function({x:t,y:n}){if(!r.current)return;const o=0===t&&0===n;r.current.style.transformOrigin=o?"":"center",r.current.style.transform=o?"":`translate3d(${t}px,${n}px,0)`,r.current.style.zIndex=!e||o?"":"1",g()}({x:t,y:n}),h.x=t,h.y=n)}return(0,s.useLayoutEffect)((()=>{i&&u()}),[i]),(0,s.useLayoutEffect)((()=>{if(!f)return;if(l)return void g();r.current.style.transform="";const e=is(r.current);a(),p({x:Math.round(f.left-e.left),y:Math.round(f.top-e.top)})}),[o]),h.x=0,h.y=0,(0,rs.q_)({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:i!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onFrame:h}),r};const as=".block-editor-block-list__block",cs=".block-list-appender";function us(e,t){return t.closest([as,cs].join(","))===e}function ds(e){const t=(0,s.useRef)(),n=function(e){return(0,p.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isMultiSelecting:o,isNavigationMode:r,isBlockSelected:l}=t(Vn);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=Fi.focus.tabbable.find(t.current).filter((e=>(0,Fi.isTextField)(e))),r=-1===n,l=(r?u.last:u.first)(o)||t.current;us(t.current,l)?(0,Fi.placeCaretAtHorizontalEdge)(l,r):t.current.focus()}),[n]),t}function ms(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ps(){const e=(0,p.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(Vn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",ms),t.addEventListener("mouseover",ms),()=>{t.removeEventListener("mouseout",ms),t.removeEventListener("mouseover",ms),t.classList.remove("is-hovered")}}),[e])}function fs(e){return(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:m}=t(Vn),{__experimentalSpotlightEntityBlocks:p,outlineMode:f}=a(),g=n(e),h=l(e),b=s(e),v=u(e,!0),k=m(p);return c()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(b)),"is-dragging":g,"has-child-selected":v,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":h&&f&&d()})}),[e])}function gs(e){return(0,p.useSelect)((t=>{const n=t(Vn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function hs(e){return(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(Vn),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 bs(e){return(0,p.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(Vn);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 vs(e){const{isBlockSelected:t}=(0,p.useSelect)(Vn),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(Vn);return(0,d.useRefEffect)((r=>{function l(l){t(e)?l.target.isContentEditable||o(e):us(r,l.target)&&n(e)}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}function ks(e){const t=(0,p.useSelect)((t=>t(Vn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(Vn),{insertDefaultBlock:r,removeBlock:l}=(0,p.useDispatch)(Vn);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!==xl.ENTER&&s!==xl.BACKSPACE&&s!==xl.DELETE||a!==i||(0,Fi.isTextField)(a)||(t.preventDefault(),s===xl.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function _s(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(Vn),{setNavigationMode:o,selectBlock:r}=(0,p.useDispatch)(Vn);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 ys=n(4979),Es=n.n(ys);function Cs(e){const t=(0,s.useRef)(),n=(0,p.useSelect)((t=>{const{isBlockSelected:n,getBlockSelectionEnd:o}=t(Vn);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,Fi.getScrollContainer)(e)||e.ownerDocument.defaultView;o&&Es()(e,o,{onlyScrollIfNeeded:!0})}),[n]),t}function Ss(e,t){Array.from(e.closest(".is-root-container").querySelectorAll(".rich-text")).forEach((e=>{t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}function ws(e){const{startMultiSelect:t,stopMultiSelect:n,multiSelect:o,selectBlock:r}=(0,p.useDispatch)(Vn),{isSelectionEnabled:l,isBlockSelected:i,getBlockParents:s,getBlockSelectionStart:a,hasMultiSelection:c}=(0,p.useSelect)(Vn);return(0,d.useRefEffect)((u=>{const{ownerDocument:d}=u,{defaultView:m}=d;let p,f;function g({isSelectionEnd:t}){const n=m.getSelection();if(!n.rangeCount||n.isCollapsed)return void Ss(u,!0);const l=function(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(as);return t?t.id.slice("block-".length):void 0}(n.focusNode);if(e===l){if(r(e),t&&(Ss(u,!0),n.rangeCount)){const{commonAncestorContainer:e}=n.getRangeAt(0);p.contains(e)&&p.focus()}}else{const t=[...s(e),e],n=[...s(l),l],r=Math.min(t.length,n.length)-1;o(t[r],n[r])}}function h(){d.removeEventListener("selectionchange",g),m.removeEventListener("mouseup",h),f=m.requestAnimationFrame((()=>{g({isSelectionEnd:!0}),n()}))}function b({buttons:n}){1===n&&l()&&i(e)&&(p=d.activeElement,t(),d.addEventListener("selectionchange",g),m.addEventListener("mouseup",h),Ss(u,!1))}function v(t){if(l()&&0===t.button)if(t.shiftKey){const n=a();n&&n!==e&&(Ss(u,!1),o(n,e),t.preventDefault())}else c()&&r(e)}return u.addEventListener("mousedown",v),u.addEventListener("mouseleave",b),()=>{u.removeEventListener("mousedown",v),u.removeEventListener("mouseleave",b),d.removeEventListener("selectionchange",g),m.removeEventListener("mouseup",h),m.cancelAnimationFrame(f)}}),[e,t,n,o,r,l,i,s])}function Bs(){const e=(0,s.useContext)(ud);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Is(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(xs),{index:a,mode:u,name:m,blockApiVersion:f,blockTitle:h,isPartOfSelection:b,adjustScrolling:v,enableAnimation:k}=(0,p.useSelect)((e=>{const{getBlockRootClientId:t,getBlockIndex:o,getBlockMode:l,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:m}=e(Vn),p=c(n),f=u(n)||d(n),g=i(n),h=t(n),b=(0,r.getBlockType)(g);return{index:o(n,h),mode:l(n),name:g,blockApiVersion:(null==b?void 0:b.apiVersion)||1,blockTitle:null==b?void 0:b.title,isPartOfSelection:p||f,adjustScrolling:p||m(n),enableAnimation:!s()&&a()<=200}}),[n]),_=(0,g.sprintf)((0,g.__)("Block: %s"),h),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,ds(n),Cs(n),Zr(n),vs(n),ws(n),ks(n),_s(n),ps(),Bs(),ss({isSelected:b,adjustScrolling:v,enableAnimation:k,triggerAnimationOnChange:a})]),C=Un();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":m,"data-title":h,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,fs(n),gs(n),hs(n),bs(n)),style:{...l.style,...e.style}}}Is.save=r.__unstableGetBlockProps;const xs=(0,s.createContext)();function Ts({children:e,isHtml:t,...n}){return(0,s.createElement)("div",Is(n,{__unstableIsHtml:t}),e)}const Ns=(0,p.withSelect)(((e,{clientId:t,rootClientId:n})=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:l,getTemplateLock:i,__unstableGetBlockWithoutInnerBlocks:s}=e(Vn),a=s(t),c=o(t),u=i(n),{name:d,attributes:m,isValid:p}=a||{};return{mode:r(t),isSelectionEnabled:l(),isLocked:!!u,block:a,name:d,attributes:m,isValid:p,isSelected:c}})),Ls=(0,p.withDispatch)(((e,t,{select:n})=>{const{updateBlockAttributes:o,insertBlocks:l,mergeBlocks:i,replaceBlocks:s,toggleSelection:a,__unstableMarkLastChangeAsPersistent:c}=e(Vn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n(Vn),l=r(),{clientId:i}=t,s=l.length?l:[i];o(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;l(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:r}=t,{getBlockIndex:i}=n(Vn),s=i(o,r);l(e,s+1,r)},onMerge(e){const{clientId:o}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=n(Vn);if(e){const e=l(o);e&&i(o,e)}else{const e=r(o);e&&i(e,o)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),s([t.clientId],e,n,o)},toggleSelection(e){a(e)}}}));var Ps=(0,d.compose)(d.pure,Ns,Ls,(0,d.ifCondition)((({block:e})=>!!e)),(0,m.withFilters)("editor.BlockListBlock"))((function({mode:e,isLocked:t,clientId:n,isSelected:o,isSelectionEnabled:l,className:i,name:a,isValid:d,attributes:m,wrapperProps:f,setAttributes:g,onReplace:h,onInsertBlocksAfter:b,onMerge:v,toggleSelection:k}){const{removeBlock:_}=(0,p.useDispatch)(Vn),y=(0,s.useCallback)((()=>_(n)),[n]);let E=(0,s.createElement)(Wi,{name:a,isSelected:o,attributes:m,setAttributes:g,insertBlocksAfter:t?void 0:b,onReplace:t?void 0:h,onRemove:t?void 0:y,mergeBlocks:t?void 0:v,clientId:n,isSelectionEnabled:l,toggleSelection:k});const C=(0,r.getBlockType)(a);null!=C&&C.getEditWrapperProps&&(f=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}(f,C.getEditWrapperProps(m)));const S=f&&!!f["data-align"];let w;if(S&&(E=(0,s.createElement)("div",{className:"wp-block","data-align":f["data-align"]},E)),d)w="html"===e?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},E),(0,s.createElement)(Ts,{isHtml:!0},(0,s.createElement)(os,{clientId:n}))):(null==C?void 0:C.apiVersion)>1?E:(0,s.createElement)(Ts,f,E);else{const e=(0,r.getSaveContent)(C,m);w=(0,s.createElement)(Ts,{className:"has-warning"},(0,s.createElement)(Qi,{clientId:n}),(0,s.createElement)(s.RawHTML,null,(0,Fi.safeHTML)(e)))}const B={clientId:n,className:i,wrapperProps:(0,u.omit)(f,["data-align"]),isAligned:S},I=(0,s.useMemo)((()=>B),Object.values(B));return(0,s.createElement)(xs.Provider,{value:I},(0,s.createElement)(ts,{fallback:(0,s.createElement)(Ts,{className:"has-warning"},(0,s.createElement)(Ji,null))},w))})),Rs=window.wp.htmlEntities,As=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Ms=[(0,s.createInterpolateElement)((0,g.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,g.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,g.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,g.__)("Drag files into the editor to automatically insert media blocks."),(0,g.__)("Change a block's type by pressing the block icon on the toolbar.")];var Ds=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*Ms.length));return(0,s.createElement)(m.Tip,null,Ms[e])},Os=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"}));function Fs({icon:e,showColors:t=!1,className:n}){var o;"block-default"===(null===(o=e)||void 0===o?void 0:o.src)&&(e={src:Os});const r=(0,s.createElement)(m.Icon,{icon:e&&e.src?e.src:e}),l=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,s.createElement)("span",{style:l,className:c()("block-editor-block-icon",n,{"has-colors":t})},r)}var Vs=function({title:e,icon:t,description:n,blockType:o}){return o&&(Nt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Fs,{icon:t,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},e),(0,s.createElement)("span",{className:"block-editor-block-card__description"},n)))};function Hs({clientId:e=null,value:t,selection:n,onChange:o=u.noop,onInput:l=u.noop}){const i=(0,p.useRegistry)(),{resetBlocks:a,resetSelection:c,replaceInnerBlocks:d,setHasControlledInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:f}=i.dispatch(Vn),{getBlockName:g,getBlocks:h}=i.select(Vn),b=(0,s.useRef)({incoming:null,outgoing:[]}),v=(0,s.useRef)(!1),k=(0,s.useRef)(l),_=(0,s.useRef)(o);(0,s.useEffect)((()=>{k.current=l,_.current=o}),[l,o]),(0,s.useEffect)((()=>{b.current.outgoing.includes(t)?(0,u.last)(b.current.outgoing)===t&&(b.current.outgoing=[]):h(e)!==t&&(b.current.outgoing=[],(()=>{if(t)if(f(),e){m(e,!0),f();const n=t.map((e=>(0,r.cloneBlock)(e)));v.current&&(b.current.incoming=n),d(e,n)}else v.current&&(b.current.incoming=t),a(t)})(),n&&c(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]),(0,s.useEffect)((()=>{const{getSelectionStart:t,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l}=i.select(Vn);let s=h(e),a=r(),c=!1;v.current=!0;const u=i.subscribe((()=>{if(null!==e&&null===g(e))return;const i=r(),u=h(e),d=u!==s;if(s=u,d&&(b.current.incoming||l()))return b.current.incoming=null,void(a=i);(d||c&&!d&&i&&!a)&&(a=i,b.current.outgoing.push(s),(a?_.current:k.current)(s,{selection:{selectionStart:t(),selectionEnd:n(),initialPosition:o()}})),c=d}));return()=>u()}),[i,e])}var zs=(0,d.createHigherOrderComponent)((e=>(0,p.withRegistry)((({useSubRegistry:t=!0,registry:n,...o})=>{if(!t)return(0,s.createElement)(e,i({registry:n},o));const[r,l]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,p.createRegistry)({},n);e.registerStore(Pt,Fn),l(e)}),[n]),r?(0,s.createElement)(p.RegistryProvider,{value:r},(0,s.createElement)(e,i({registry:r},o))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,p.useDispatch)(Vn);return(0,s.useEffect)((()=>{o(n)}),[n]),Hs(e),(0,s.createElement)(Qr,null,t)}));function Gs({onClick:e}){return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:e,onKeyPress:e},(0,s.createElement)(m.Disabled,null,(0,s.createElement)(md,null)))}function Us(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,p.useSelect)(Vn),{clearSelectedBlock:n}=(0,p.useDispatch)(Vn);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 Ws(e){return(0,s.createElement)("div",i({ref:Us()},e))}function js(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 $s(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r}=e(Vn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r()}}function Ks(){const{isMultiSelecting:e,multiSelectedBlockClientIds:t,hasMultiSelection:n,selectedBlockClientId:o}=(0,p.useSelect)($s,[]),r=Jr(o),l=Jr((0,u.first)(t)),i=Jr((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;s.focus();const d=c.getSelection(),m=a.createRange(),p=js(l.current,"start"),f=js(i.current,"end");var g;g=s,Array.from(g.querySelectorAll(".rich-text")).forEach((e=>{e.removeAttribute("contenteditable")})),m.setStartBefore(p),m.setEndAfter(f),d.removeAllRanges(),d.addRange(m)}),[n,e,t,o])}function qs(e){const{tagName:t}=e;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ys(e,t,n,o){let r,l=Fi.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(!Fi.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 Xs(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksStartClientId:t,getMultiSelectedBlocksEndClientId:n,getPreviousBlockClientId:o,getNextBlockClientId:r,getFirstMultiSelectedBlockClientId:l,getLastMultiSelectedBlockClientId:i,getSettings:s,hasMultiSelection:a}=(0,p.useSelect)(Vn),{multiSelect:c,selectBlock:u}=(0,p.useDispatch)(Vn);return(0,d.useRefEffect)((d=>{let m;function p(){m=null}function f(l){const i=e(),s=t(),a=n(),d=o(a||i),m=r(a||i),p=l?d:m;p&&(s===p?u(p):c(s||i,p))}function g(e){const t=l(),n=i(),o=e?t:n;o&&u(o)}function h(t){const{keyCode:l,target:i}=t,c=l===xl.UP,u=l===xl.DOWN,p=l===xl.LEFT,h=l===xl.RIGHT,b=c||p,v=p||h,k=c||u,_=v||k,y=t.shiftKey,E=y||t.ctrlKey||t.altKey||t.metaKey,C=k?Fi.isVerticalEdge:Fi.isHorizontalEdge,{ownerDocument:S}=d,{defaultView:w}=S;if(a())return void(_&&((y?f:g)(b),t.preventDefault()));if(k?m||(m=(0,Fi.computeCaretRect)(w)):m=null,t.defaultPrevented)return;if(!_)return;if(!function(e,t,n){if((t===xl.UP||t===xl.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(i,l,E))return;const B=(0,Fi.isRTL)(i)?!b:b,{keepCaretInsideBlock:I}=s(),x=e();if(y){const e=n(),l=o(e||x),s=r(e||x);(b&&l||!b&&s)&&function(e,t){const n=Ys(e,t,d);return!(n&&(o=e,r=n,o.closest(as)===r.closest(as)));var o,r}(i,b)&&C(i,b)&&(f(b),t.preventDefault())}else if(k&&(0,Fi.isVerticalEdge)(i,b)&&!I){const e=Ys(i,b,d,!0);e&&((0,Fi.placeCaretAtVerticalEdge)(e,b,m),t.preventDefault())}else if(v&&w.getSelection().isCollapsed&&(0,Fi.isHorizontalEdge)(i,B)&&!I){const e=Ys(i,B,d);(0,Fi.placeCaretAtHorizontalEdge)(e,b),t.preventDefault()}}return d.addEventListener("mousedown",p),d.addEventListener("keydown",h),()=>{d.removeEventListener("mousedown",p),d.removeEventListener("keydown",h)}}),[])}var Qs=window.wp.keyboardShortcuts;function Zs(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(Vn),{multiSelect:o}=(0,p.useDispatch)(Vn),r=(0,Qs.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;if(!(0,Fi.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),m=(0,u.last)(c);d!==m&&(o(d,m),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function Js(){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}=(0,p.useSelect)(Vn),{setNavigationMode:i}=(0,p.useDispatch)(Vn),a=(0,p.useSelect)((e=>e(Vn).isNavigationMode()),[])?void 0:"0",c=(0,s.useRef)();function u(t){if(c.current)c.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{i(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Fi.focus.tabbable[n](t.target).focus()}}const m=(0,s.createElement)("div",{ref:t,tabIndex:a,onFocus:u}),f=(0,s.createElement)("div",{ref:n,tabIndex:a,onFocus:u}),g=(0,d.useRefEffect)((s=>{function a(e){if(e.defaultPrevented)return;if(e.keyCode===xl.ESCAPE&&!r())return e.preventDefault(),void i(!0);if(e.keyCode!==xl.TAB)return;const o=e.shiftKey,a=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&i(!0));if(qs(e.target)&&qs(Fi.focus.tabbable[a](e.target)))return;const u=o?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function u(e){o.current=e.target}function d(o){var r;if(o.keyCode!==xl.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=Fi.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:p}=m;return p.addEventListener("keydown",d),s.addEventListener("keydown",a),s.addEventListener("focusout",u),()=>{p.removeEventListener("keydown",d),s.removeEventListener("keydown",a),s.removeEventListener("focusout",u)}}),[]);return[m,(0,d.useMergeRefs)([e,g]),f]}(),o=(0,p.useSelect)((e=>e(Vn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,Ks(),Zs(),Xs(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,o)return e.setAttribute("aria-label",(0,g.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var ea=(0,s.forwardRef)((function({children:e,...t},n){const[o,r,l]=Js();return(0,s.createElement)(s.Fragment,null,o,(0,s.createElement)("div",i({},t,{ref:(0,d.useMergeRefs)([r,n]),className:c()(t.className,"block-editor-writing-flow")}),e),l)}));const ta="editor-styles-wrapper";function na(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var oa=(0,s.forwardRef)((function({contentRef:e,children:t,head:n,tabIndex:o=0,...r},l){const[,a]=(0,s.useReducer)((()=>({}))),[u,p]=(0,s.useState)(),[f,h]=(0,s.useState)([]),b=na(window.__editorAssets.styles),v=na(window.__editorAssets.scripts),k=Us(),[_,y,E]=Js(),C=(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=["keydown","keypress","dragover"];for(const t of r)e.addEventListener(t,o)}(t),p(t),k(r),h(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()}))}),[]),S=(0,d.useRefEffect)((e=>{v.reduce(((t,n)=>t.then((()=>async function(e,{id:t,src:n}){return new Promise(((o,r)=>{const l=e.ownerDocument.createElement("script");l.id=t,n?(l.src=n,l.onload=()=>o(),l.onerror=()=>r()):o(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{a()}))}),[]),w=(0,d.useMergeRefs)([e,k,y]);return(0,s.useEffect)((()=>{var e;u&&(e=u,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((({selectorText:e})=>e&&(e.includes(`.${ta}`)||e.includes(".wp-block"))))&&!e.getElementById(n.id)){console.error(`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))}})))}),[u]),n=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),b.map((({tagName:e,href:t,id:n,rel:o,media:r,textContent:l})=>{const i=e.toLowerCase();return"style"===i?(0,s.createElement)(i,{id:n,key:n},l):(0,s.createElement)(i,{href:t,id:n,rel:o,media:r,key:n})})),n),(0,s.createElement)(s.Fragment,null,o>=0&&_,(0,s.createElement)("iframe",i({},r,{ref:(0,d.useMergeRefs)([l,C]),tabIndex:o,title:(0,g.__)("Editor canvas")}),u&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:S},n),(0,s.createElement)("body",{ref:w,className:c()(ta,...f)},(0,s.createElement)(m.__experimentalStyleProvider,{document:u},t))),u.documentElement)),o>=0&&E)})),ra=n(3692),la=n.n(ra);const ia=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function sa(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),p(),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 m(/^{\s*/)}function u(){return m(/^}/)}function d(){let t;const n=[];for(p(),f(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),f(n));return n}function m(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function p(){m(/^\s*/)}function f(e){let t;for(e=e||[];t=g();)!1!==t&&e.push(t);return e}function g(){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 h(){const e=m(/^([^{]+)/);if(e)return aa(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 b(){const e=l();let t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=aa(t[0]),!m(/^:\s*/))return a("property missing ':'");const n=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(ia,""),value:n?aa(n[0]).replace(ia,""):""});return m(/^[;\s]*/),o}function v(){const e=[];if(!c())return a("missing '{'");let t;for(f(e);t=b();)!1!==t&&(e.push(t),f(e));return u()?e:a("missing '}'")}function k(){let e;const t=[],n=l();for(;e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=m(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=m(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=m(/^([-\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=m(/^@media *([^{]+)/);if(!t)return;const n=aa(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=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:aa(t[1]),media:aa(t[2])})}()||function(){const e=l(),t=m(/^@supports *([^{]+)/);if(!t)return;const n=aa(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=m(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=aa(t[1]),o=aa(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(!m(/^@page */))return;const t=h()||[];if(!c())return a("@page missing '{'");let n,o=f();for(;n=b();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!m(/^@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(!m(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=f();for(;t=b();)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=h();return t?(f(),e({type:"rule",selectors:t,declarations:v()})):a("selector missing")}return ca(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function aa(e){return e?e.replace(/^\s+|\s+$/g,""):""}function ca(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){ca(e,o)})):n&&"object"==typeof n&&ca(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var ua=n(5717),da=n.n(ua),ma=pa;function pa(e){this.options=e||{}}pa.prototype.emit=function(e){return e},pa.prototype.visit=function(e){return this[e.type](e)},pa.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 fa=ga;function ga(e){ma.call(this,e)}da()(ga,ma),ga.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},ga.prototype.comment=function(e){return this.emit("",e.position)},ga.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},ga.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ga.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("}")},ga.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},ga.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},ga.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ga.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},ga.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},ga.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("}")},ga.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},ga.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ga.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},ga.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("}"):""},ga.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var ha=ba;function ba(e){e=e||{},ma.call(this,e),this.indentation=e.indent}da()(ba,ma),ba.prototype.compile=function(e){return this.stylesheet(e)},ba.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},ba.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},ba.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},ba.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}")},ba.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}")},ba.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},ba.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},ba.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}")},ba.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)+"}")},ba.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")},ba.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}")},ba.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}")},ba.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}")},ba.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},ba.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()+"}"):""},ba.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},ba.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};function va(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 ka(e,t){return new URL(e,t).toString()}const _a=/^(body|html|:root).*$/;var ya=(e,t="")=>(0,u.map)(e,(({css:e,baseURL:n,__experimentalNoWrapper:o=!1})=>{const r=[];return t&&!o&&r.push(((e,t=[])=>n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(_a)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n)(t)),n&&r.push((l=n,e=>{if("declaration"===e.type){const r=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]};va(e)&&o.push(e)}return o}(e.value).map((o=l,e=>({...e,newUrl:"url("+e.before+e.quote+ka(e.value,o)+e.quote+e.after+")"})));return{...e,value:(t=e.value,n=r,n.forEach((e=>{t=t.replace(e.source,e.newUrl)})),t)}}var t,n,o;return e})),r.length?function(e,t){try{const r=sa(e);return n=la().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new fa(o):new ha(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o}(e,(0,d.compose)(r)):e;var l}));const Ea=".editor-styles-wrapper";function Ca(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(Ea);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)}Ko()(l).getLuminance()>.5||0===Ko()(l).getAlpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function Sa({styles:e}){const t=(0,s.useMemo)((()=>ya(e,Ea)),[e]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:Ca(e)}),t.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}let wa;var Ba=function({viewportWidth:e,__experimentalPadding:t}){const[n,{width:o}]=(0,d.useResizeObserver)(),[r,{height:l}]=(0,d.useResizeObserver)(),i=(0,p.useSelect)((e=>e(Vn).getSettings().styles));wa=wa||(0,d.pure)(md);const a=o/e;return(0,s.createElement)("div",{className:"block-editor-block-preview__container"},n,(0,s.createElement)(m.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${a})`,height:l*a}},(0,s.createElement)(oa,{head:(0,s.createElement)(Sa,{styles:i}),contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:n}}=e;n.style.position="absolute",n.style.width="100%",e.style.padding=t+"px"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:l,pointerEvents:"none"}},r,(0,s.createElement)(wa,{renderAppender:!1}))))},Ia=(0,s.memo)((function({blocks:e,__experimentalPadding:t=0,viewportWidth:n=1200,__experimentalLive:o=!1,__experimentalOnClick:r}){const l=(0,p.useSelect)((e=>e(Vn).getSettings()),[]),i=(0,s.useMemo)((()=>{const e={...l};return e.__experimentalBlockPatterns=[],e}),[l]),a=(0,s.useMemo)((()=>(0,u.castArray)(e)),[e]);return e&&0!==e.length?(0,s.createElement)(zs,{value:a,settings:i},o?(0,s.createElement)(Gs,{onClick:r}):(0,s.createElement)(Ba,{viewportWidth:n,__experimentalPadding:t})):null})),xa=function({item:e}){var t,n;const{name:o,title:l,icon:i,description:a,initialAttributes:c}=e,u=(0,r.getBlockType)(o),d=(0,r.isReusableBlock)(e);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(Ia,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?(0,r.getBlockFromExample)(e.name,{attributes:{...u.example.attributes,...c},innerBlocks:u.example.innerBlocks}):(0,r.createBlock)(o,c)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,g.__)("No Preview Available."))),!d&&(0,s.createElement)(Vs,{title:l,icon:i,description:a}))},Ta=(0,s.createContext)(),Na=(0,s.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){const l=(0,s.useContext)(Ta);return(0,s.createElement)(m.__unstableCompositeItem,i({ref:r,state:l,role:"option",focusable:!0},o),(o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,s.createElement)(t,r,n):"function"==typeof n?n(r):(0,s.createElement)(m.Button,r,n)}))})),La=(0,s.createElement)(F.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},(0,s.createElement)(F.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function Pa({count:e,icon:t}){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)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(m.FlexItem,null,t?(0,s.createElement)(Fs,{icon:t}):(0,g.sprintf)(
15
  /* translators: %d: Number of blocks. */
16
+ (0,g._n)("%d block","%d blocks",e),e)),(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(Fs,{icon:La})))))}var Ra=({isEnabled:e,blocks:t,icon:n,children:o})=>{const r={type:"inserter",blocks:t};return(0,s.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:r,__experimentalDragComponent:(0,s.createElement)(Pa,{count:t.length,icon:n})},(({onDraggableStart:t,onDraggableEnd:n})=>o({draggable:e,onDragStart:e?t:void 0,onDragEnd:e?n:void 0})))};function Aa(e=window){const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var Ma=(0,s.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:l,isDraggable:a,...u}){const d=(0,s.useRef)(!1),m=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},p=(0,s.useMemo)((()=>[(0,r.createBlock)(n.name,n.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.initialAttributes]);return(0,s.createElement)(Ra,{isEnabled:a&&!n.disabled,blocks:p,icon:n.icon},(({draggable:r,onDragStart:a,onDragEnd:p})=>(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{d.current=!0,a&&(l(null),a(e))},onDragEnd:e=>{d.current=!1,p&&p(e)}},(0,s.createElement)(Na,i({isFirst:t,className:c()("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,Aa()?e.metaKey:e.ctrlKey),l(null)},onKeyDown:e=>{const{keyCode:t}=e;t===xl.ENTER&&(e.preventDefault(),o(n,Aa()?e.metaKey:e.ctrlKey),l(null))},onFocus:()=>{d.current||l(n)},onMouseEnter:()=>{d.current||l(n)},onMouseLeave:()=>l(null),onBlur:()=>l(null)},u),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,s.createElement)(Fs,{icon:n.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},n.title)))))})),Da=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,It.speak)((0,g.__)("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))})),Oa=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(Ta);return(0,s.createElement)(m.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),Fa=function({items:e=[],onSelect:t,onHover:n=(()=>{}),children:o,label:l,isDraggable:i=!0}){return(0,s.createElement)(Da,{className:"block-editor-block-types-list","aria-label":l},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}(e).map(((e,o)=>(0,s.createElement)(Oa,{key:o},e.map(((e,l)=>(0,s.createElement)(Ma,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:t,onHover:n,isDraggable:i,isFirst:0===o&&0===l})))))),o)},Va=function({title:e,icon:t,children:n}){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"},e),(0,s.createElement)(m.Icon,{icon:t})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},n))},Ha=(e,t)=>{const{categories:n,collections:o,items:l}=(0,p.useSelect)((t=>{const{getInserterItems:n}=t(Vn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)((({name:e,initialAttributes:n,innerBlocks:o},l)=>{const i=(0,r.createBlock)(e,n,(0,r.createBlocksFromInnerBlocksTemplate)(o));t(i,void 0,l)}),[t])]},za=function({children:e}){const t=(0,m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(Ta.Provider,{value:t},e)};const Ga=[];var Ua=function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o}){const[r,l,i,a]=Ha(e,t),c=(0,s.useMemo)((()=>(0,u.orderBy)(r,["frecency"],["desc"]).slice(0,6)),[r]),m=(0,s.useMemo)((()=>r.filter((e=>!e.category))),[r]),p=(0,s.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(r)),[r]),f=(0,s.useMemo)((()=>{const e={...i};return Object.keys(i).forEach((t=>{e[t]=r.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[r,i]);(0,s.useEffect)((()=>()=>n(null)),[]);const h=(0,d.useAsyncList)(l),b=l.length===h.length,v=(0,s.useMemo)((()=>Object.entries(i)),[i]),k=(0,d.useAsyncList)(b?v:Ga);return(0,s.createElement)(za,null,(0,s.createElement)("div",null,o&&!!c.length&&(0,s.createElement)(Va,{title:(0,g._x)("Most used","blocks")},(0,s.createElement)(Fa,{items:c,onSelect:a,onHover:n,label:(0,g._x)("Most used","blocks")})),(0,u.map)(h,(e=>{const t=p[e.slug];return t&&t.length?(0,s.createElement)(Va,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(Fa,{items:t,onSelect:a,onHover:n,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(Va,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,g.__)("Uncategorized")},(0,s.createElement)(Fa,{items:m,onSelect:a,onHover:n,label:(0,g.__)("Uncategorized")})),(0,u.map)(k,(([e,t])=>{const o=f[e];return o&&o.length?(0,s.createElement)(Va,{key:e,title:t.title,icon:t.icon},(0,s.createElement)(Fa,{items:o,onSelect:a,onHover:n,label:t.title})):null}))))},Wa=function({selectedCategory:e,patternCategories:t,onClickCategory:n,children:o}){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},(0,s.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,g.__)("Filter patterns"),hideLabelFromVision:!0,value:e.name,onChange:e=>{n(t.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return t.map((t=>e.push({value:t.name,label:t.label}))),e})()})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},ja=window.wp.notices,$a=(e,t)=>{const{patternCategories:n,patterns:o}=(0,p.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,p.useDispatch)(ja.store);return[o,n,(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,g.sprintf)(
17
  /* translators: %s: block pattern title. */
18
+ (0,g.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function Ka({isDraggable:e,pattern:t,onClick:n,composite:o}){const{name:r,viewportWidth:l}=t,{blocks:a}=(0,p.useSelect)((e=>e(Vn).__experimentalGetParsedPattern(r)),[r]),c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(Ka)}`;return(0,s.createElement)(Ra,{isEnabled:e,blocks:a},(({draggable:e,onDragStart:r,onDragEnd:u})=>(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":t.title,"aria-describedby":t.description?c:void 0,draggable:e,onDragStart:r,onDragEnd:u},(0,s.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>n(t,a)}),(0,s.createElement)(Ia,{blocks:a,viewportWidth:l}),(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},t.title),!!t.description&&(0,s.createElement)(m.VisuallyHidden,{id:c},t.description)))))}function qa(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ya=function({isDraggable:e,blockPatterns:t,shownPatterns:n,onClickPattern:o,orientation:r,label:l=(0,g.__)("Block Patterns")}){const a=(0,m.__unstableUseCompositeState)({orientation:r});return(0,s.createElement)(m.__unstableComposite,i({},a,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":l}),t.map((t=>n.includes(t)?(0,s.createElement)(Ka,{key:t.name,pattern:t,onClick:o,isDraggable:e,composite:a}):(0,s.createElement)(qa,{key:t.name}))))};function Xa({rootClientId:e,onInsert:t,selectedCategory:n,onClickCategory:o}){const[r,l,i]=$a(t,e),a=(0,s.useMemo)((()=>l.filter((e=>r.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))))),[r,l]),c=n||a[0];(0,s.useEffect)((()=>{r.some((e=>m(e)===1/0))&&!a.find((e=>"uncategorized"===e.name))&&a.push({name:"uncategorized",label:(0,g._x)("Uncategorized")})}),[a,r]);const m=(0,s.useCallback)((e=>{if(!e.categories||!e.categories.length)return 1/0;const t=(0,u.fromPairs)(a.map((({name:e},t)=>[e,t])));return Math.min(...e.categories.map((e=>void 0!==t[e]?t[e]:1/0)))}),[a]),p=(0,s.useMemo)((()=>r.filter((e=>"uncategorized"===c.name?m(e)===1/0:e.categories&&e.categories.includes(c.name)))),[r,c]),f=(0,s.useMemo)((()=>p.sort(((e,t)=>m(e)-m(t)))),[p,m]),h=(0,d.useAsyncList)(f);return(0,s.createElement)(s.Fragment,null,!!p.length&&(0,s.createElement)(Wa,{selectedCategory:c,patternCategories:a,onClickCategory:o},(0,s.createElement)(Ya,{shownPatterns:h,blockPatterns:p,onClickPattern:i,label:c.label,orientation:"vertical",isDraggable:!0})))}var Qa=function({rootClientId:e,onInsert:t,onClickCategory:n,selectedCategory:o}){return(0,s.createElement)(Xa,{rootClientId:e,selectedCategory:o,onInsert:t,onClickCategory:n})},Za=window.wp.url,Ja=function(){return(0,s.createElement)("div",{className:"block-editor-inserter__no-results"},(0,s.createElement)(bo,{className:"block-editor-inserter__no-results-icon",icon:Os}),(0,s.createElement)("p",null,(0,g.__)("No results found.")))};function ec({onHover:e,onInsert:t,rootClientId:n}){const[o,,,r]=Ha(n,t),l=(0,s.useMemo)((()=>o.filter((({category:e})=>"reusable"===e))),[o]);return 0===l.length?(0,s.createElement)(Ja,null):(0,s.createElement)(Va,{title:(0,g.__)("Reusable blocks")},(0,s.createElement)(Fa,{items:l,onSelect:r,onHover:e,label:(0,g.__)("Reusable blocks")}))}var tc=function({rootClientId:e,onInsert:t,onHover:n}){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ec,{onHover:n,onInsert:t,rootClientId:e}),(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,Za.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,g.__)("Manage Reusable blocks"))))};const{Fill:nc,Slot:oc}=(0,m.createSlotFill)("__unstableInserterMenuExtension");nc.Slot=oc;var rc=nc,lc=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:l,shouldFocusBlock:i=!0}){const{getSelectedBlock:a}=(0,p.useSelect)(Vn),{destinationRootClientId:c,destinationIndex:d}=(0,p.useSelect)((r=>{const{getSelectedBlockClientId:l,getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:a}=r(Vn),c=l();let u,d=e;return void 0!==t?u=t:n?u=s(n,d):!o&&c?(d=i(c),u=s(c,d)+1):u=a(d).length,{destinationRootClientId:d,destinationIndex:u}}),[e,t,n,o]),{replaceBlocks:m,insertBlocks:f,showInsertionPoint:h,hideInsertionPoint:b}=(0,p.useDispatch)(Vn),v=(0,s.useCallback)(((e,t,n=!1)=>{const s=a();!o&&s&&(0,r.isUnmodifiedDefaultBlock)(s)?m(s.clientId,e,null,i||n?0:null,t):f(e,d,c,!0,i||n?0:null,t);const p=(0,g.sprintf)(// translators: %d: the name of the block that has been added
19
+ (0,g._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,It.speak)(p),l&&l()}),[o,a,m,f,c,d,l,i]),k=(0,s.useCallback)((e=>{e?h(c,d):b()}),[h,b,c,d]);return[c,v,k]};const ic=e=>e.name||"",sc=e=>e.title,ac=e=>e.description||"",cc=e=>e.keywords||[],uc=e=>e.category,dc=()=>null;function mc(e=""){return(e=(e=(0,u.deburr)(e)).replace(/^\//,"")).toLowerCase()}const pc=(e="")=>(0,u.words)(mc(e)),fc=(e,t,n,o)=>0===pc(o).length?e:gc(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}}),gc=(e=[],t="",n={})=>{if(0===pc(t).length)return e;const o=e.map((e=>[e,hc(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function hc(e,t,n={}){const{getName:o=ic,getTitle:r=sc,getDescription:l=ac,getKeywords:i=cc,getCategory:s=uc,getCollection:a=dc}=n,c=o(e),d=r(e),m=l(e),p=i(e),f=s(e),g=a(e),h=mc(t),b=mc(d);let v=0;if(h===b)v+=30;else if(b.startsWith(h))v+=20;else{const e=[c,d,m,...p,f,g].join(" ");0===(k=(0,u.words)(h),_=e,(0,u.differenceWith)(k,pc(_),((e,t)=>t.includes(e)))).length&&(v+=10)}var k,_;return 0!==v&&c.startsWith("core/")&&v++,v}const bc=[];var vc=function({filterValue:e,onSelect:t,onHover:n,rootClientId:o,clientId:r,isAppender:l,__experimentalInsertionIndex:i,maxBlockPatterns:a,maxBlockTypes:c,showBlockDirectory:p=!1,isDraggable:f=!0,shouldFocusBlock:h=!0}){const b=(0,d.useDebounce)(It.speak,500),[v,k]=lc({onSelect:t,rootClientId:o,clientId:r,isAppender:l,insertionIndex:i,shouldFocusBlock:h}),[_,y,E,C]=Ha(v,k),[S,,w]=$a(k,v),B=(0,s.useMemo)((()=>{const t=fc((0,u.orderBy)(_,["frecency"],["desc"]),y,E,e);return void 0!==c?t.slice(0,c):t}),[e,_,y,E,c]),I=(0,s.useMemo)((()=>{const t=gc(S,e);return void 0!==a?t.slice(0,a):t}),[e,S,a]);(0,s.useEffect)((()=>{if(!e)return;const t=B.length+I.length,n=(0,g.sprintf)(
20
  /* translators: %d: number of results. */
21
+ (0,g._n)("%d result found.","%d results found.",t),t);b(n)}),[e,b]);const x=(0,d.useAsyncList)(B,{step:9}),T=(0,d.useAsyncList)(x.length===B.length?I:bc),N=!(0,u.isEmpty)(B)||!(0,u.isEmpty)(I);return(0,s.createElement)(za,null,!p&&!N&&(0,s.createElement)(Ja,null),!!B.length&&(0,s.createElement)(Va,{title:(0,s.createElement)(m.VisuallyHidden,null,(0,g.__)("Blocks"))},(0,s.createElement)(Fa,{items:x,onSelect:C,onHover:n,label:(0,g.__)("Blocks"),isDraggable:f})),!!B.length&&!!I.length&&(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!I.length&&(0,s.createElement)(Va,{title:(0,s.createElement)(m.VisuallyHidden,null,(0,g.__)("Block Patterns"))},(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,s.createElement)(Ya,{shownPatterns:T,blockPatterns:I,onClickPattern:w,isDraggable:f}))),p&&(0,s.createElement)(rc.Slot,{fillProps:{onSelect:C,onHover:n,filterValue:e,hasItems:N,rootClientId:v}},(e=>e.length?e:N?null:(0,s.createElement)(Ja,null))))};const kc={name:"blocks",
22
  /* translators: Blocks tab title in the block inserter. */
23
+ title:(0,g.__)("Blocks")},_c={name:"patterns",
24
  /* translators: Patterns tab title in the block inserter. */
25
+ title:(0,g.__)("Patterns")},yc={name:"reusable",
26
  /* translators: Reusable blocks tab title in the block inserter. */
27
+ title:(0,g.__)("Reusable")};var Ec=function({children:e,showPatterns:t=!1,showReusableBlocks:n=!1,onSelect:o}){const r=(0,s.useMemo)((()=>{const e=[kc];return t&&e.push(_c),n&&e.push(yc),e}),[kc,t,_c,n,yc]);return(0,s.createElement)(m.TabPanel,{className:"block-editor-inserter__tabs",tabs:r,onSelect:o},e)},Cc=function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:l,showMostUsedBlocks:i,shouldFocusBlock:a=!0}){const[c,u]=(0,s.useState)(""),[d,f]=(0,s.useState)(null),[h,b]=(0,s.useState)(null),[v,k,_]=lc({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:a}),{showPatterns:y,hasReusableBlocks:E}=(0,p.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(Vn);return{showPatterns:!!n(v).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[v]),C=(0,s.useCallback)(((e,t,n)=>{k(e,t,n),r()}),[k,r]),S=(0,s.useCallback)(((e,t)=>{k(e,{patternName:t}),r()}),[k,r]),w=(0,s.useCallback)((e=>{_(!!e),f(e)}),[_,f]),B=(0,s.useCallback)((e=>{b(e)}),[b]),I=(0,s.useMemo)((()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__block-list"},(0,s.createElement)(Ua,{rootClientId:v,onInsert:C,onHover:w,showMostUsedBlocks:i})),l&&(0,s.createElement)("div",{className:"block-editor-inserter__tips"},(0,s.createElement)(m.VisuallyHidden,{as:"h2"},(0,g.__)("A tip for using the block editor")),(0,s.createElement)(Ds,null)))),[v,C,w,c,i,l]),x=(0,s.useMemo)((()=>(0,s.createElement)(Qa,{rootClientId:v,onInsert:S,onClickCategory:B,selectedCategory:h})),[v,S,B,h]),T=(0,s.useMemo)((()=>(0,s.createElement)(tc,{rootClientId:v,onInsert:C,onHover:w})),[v,C,w]),N=(0,s.useCallback)((e=>"blocks"===e.name?I:"patterns"===e.name?x:T),[I,x,T]);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)(m.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{d&&f(null),u(e)},value:c,label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),!!c&&(0,s.createElement)(vc,{filterValue:c,onSelect:r,onHover:w,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:a}),!c&&(y||E)&&(0,s.createElement)(Ec,{showPatterns:y,showReusableBlocks:E},N),!c&&!y&&!E&&I)),l&&d&&(0,s.createElement)(xa,{item:d}))};function Sc({onSelect:e,rootClientId:t,clientId:n,isAppender:o}){const[r,l]=(0,s.useState)(""),[i,a]=lc({onSelect:e,rootClientId:t,clientId:n,isAppender:o}),[u]=Ha(i,a),[d]=$a(a,i),f=d.length&&!!r,h=f&&d.length>6||u.length>6,{setInserterIsOpened:b,insertionIndex:v}=(0,p.useSelect)((e=>{const{getSettings:o,getBlockIndex:r,getBlockCount:l}=e(Vn),i=r(n,t);return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,insertionIndex:-1===i?l():i}}),[n,t]);return(0,s.useEffect)((()=>{b&&b(!1)}),[b]),(0,s.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":h,"has-expand":b})},h&&(0,s.createElement)(m.SearchControl,{className:"block-editor-inserter__search",value:r,onChange:e=>{l(e)},label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),(0,s.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,s.createElement)(vc,{filterValue:r,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:f?2:0,maxBlockTypes:6,isDraggable:!1})),b&&(0,s.createElement)(m.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{b({rootClientId:t,insertionIndex:v})},"aria-label":(0,g.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,g.__)("Browse all")))}const wc=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:l={}})=>{let a;a=r?(0,g.sprintf)(// translators: %s: the name of the block when there is only one
28
+ (0,g._x)("Add %s","directly add the only allowed block"),o):(0,g._x)("Add block","Generic label for block inserter button");const{onClick:c,...u}=l;return(0,s.createElement)(m.Button,i({icon:As,label:a,tooltipPosition:"bottom",onClick:function(t){e&&e(t),c&&c(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t},u))};class Bc 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({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,toggleProps:l,hasItems:i,renderToggle:s=wc}=this.props;return s({onToggle:e,isOpen:t,disabled:n||!i,blockTitle:o,hasSingleBlockType:r,toggleProps:l})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:l}=this.props;return l?(0,s.createElement)(Sc,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o}):(0,s.createElement)(Cc,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,insertOnlyAllowedBlock:n,__experimentalIsQuick:o,onSelectOrClose:r}=this.props;return t?this.renderToggle({onToggle:n}):(0,s.createElement)(m.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,g.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:r})}}var Ic=(0,d.compose)([(0,p.withSelect)(((e,{clientId:t,rootClientId:n})=>{const{getBlockRootClientId:o,hasInserterItems:l,__experimentalGetAllowedBlocks:i}=e(Vn),{getBlockVariations:s}=e(r.store),a=i(n=n||o(t)||void 0),c=1===(0,u.size)(a)&&0===(0,u.size)(s(a[0].name,"inserter"));let d=!1;return c&&(d=a[0]),{hasItems:l(n),hasSingleBlockType:c,blockTitle:d?d.title:"",allowedBlockType:d,rootClientId:n}})),(0,p.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:l,isAppender:i,hasSingleBlockType:s,allowedBlockType:a,onSelectOrClose:c}=t;if(!s)return;const{insertBlock:u}=e(Vn);u((0,r.createBlock)(a.name),function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:s}=n(Vn);if(l)return e(l,o);const a=t();return!i&&a&&s(a)===o?e(a,o)+1:r(o).length}(),o),c&&c();const d=(0,g.sprintf)(// translators: %s: the name of the block that has been added
29
+ (0,g.__)("%s block added"),a.title);(0,It.speak)(d)}}))),(0,d.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(Bc),xc=(0,d.compose)((0,p.withSelect)(((e,t)=>{const{getBlockCount:n,getBlockName:o,isBlockValid:l,getSettings:i,getTemplateLock:s}=e(Vn),a=!n(t.rootClientId),c=o(t.lastBlockClientId)===(0,r.getDefaultBlockName)(),u=l(t.lastBlockClientId),{bodyPlaceholder:d}=i();return{isVisible:a||!c||!u,showPrompt:a,isLocked:!!s(t.rootClientId),placeholder:d}})),(0,p.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(Vn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function({isLocked:e,isVisible:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}){if(e||!t)return null;const i=(0,Rs.decodeEntities)(r)||(0,g.__)("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",contentEditable:!0,suppressContentEditableWarning:!0,role:"button","aria-label":(0,g.__)("Add block"),className:"wp-block block-editor-default-block-appender__content",onFocus:n},o?i:"\ufeff"),(0,s.createElement)(Ic,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Tc({rootClientId:e,className:t,onFocus:n,tabIndex:o},r){return(0,s.createElement)(Ic,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:l,isOpen:i,blockTitle:a,hasSingleBlockType:u})=>{let d;d=u?(0,g.sprintf)(// translators: %s: the name of the block when there is only one
30
+ (0,g._x)("Add %s","directly add the only allowed block"),a):(0,g._x)("Add block","Generic label for block inserter button");const p=!u;let f=(0,s.createElement)(m.Button,{ref:r,onFocus:n,tabIndex:o,className:c()(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":p?"true":void 0,"aria-expanded":p?i:void 0,disabled:l,label:d},!u&&(0,s.createElement)(m.VisuallyHidden,{as:"span"},d),(0,s.createElement)(bo,{icon:As}));return(p||u)&&(f=(0,s.createElement)(m.Tooltip,{text:d},f)),f},isAppender:!0})}const Nc=(0,s.forwardRef)(((e,t)=>(Nt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender"}),Tc(e,t))));var Lc=(0,s.forwardRef)(Tc),Pc=(0,p.withSelect)(((e,{rootClientId:t})=>{const{getBlockOrder:n,canInsertBlockType:o,getTemplateLock:l,getSelectedBlockClientId:i}=e(Vn);return{isLocked:!!l(t),blockClientIds:n(t),canInsertDefaultBlock:o((0,r.getDefaultBlockName)(),t),selectedBlockClientId:i()}}))((function({blockClientIds:e,rootClientId:t,canInsertDefaultBlock:n,isLocked:o,renderAppender:r,className:l,selectedBlockClientId:i,tagName:a="div"}){if(o||!1===r)return null;let d;if(r)d=(0,s.createElement)(r,null);else{const o=!t,r=i===t,l=i&&!e.includes(i);if(!o&&!r&&(!i||l))return null;d=n?(0,s.createElement)(xc,{rootClientId:t,lastBlockClientId:(0,u.last)(e)}):(0,s.createElement)(Lc,{rootClientId:t,className:"block-list-appender__toggle"})}return(0,s.createElement)(a,{tabIndex:-1,className:c()("block-list-appender wp-block",l)},d)}));function Rc(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 Ac=(0,s.createContext)();function Mc({__unstablePopoverSlot:e,__unstableContentRef:t}){const{selectBlock:n}=(0,p.useDispatch)(Vn),o=(0,s.useContext)(Ac),r=(0,s.useRef)(),{orientation:l,previousClientId:i,nextClientId:a,rootClientId:u,isInserterShown:d}=(0,p.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:s}=e(Vn),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}}),[]),f=el(i),h=el(a),b=(0,s.useMemo)((()=>{if(!f&&!h)return{};const e=f?f.getBoundingClientRect():null,t=h?h.getBoundingClientRect():null;if("vertical"===l)return{width:f?f.offsetWidth:h.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,g.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f?f.offsetHeight:h.offsetHeight}}),[f,h]),v=(0,s.useCallback)((()=>{if(!f&&!h)return{};const{ownerDocument:e}=f||h,t=f?f.getBoundingClientRect():null,n=h?h.getBoundingClientRect():null;return"vertical"===l?(0,g.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,g.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}}),[f,h]),k=Rc(t),_=c()("block-editor-block-list__insertion-point","is-"+l),y=f&&h&&d;return(0,s.createElement)(m.Popover,{ref:k,noArrow:!0,animate:!1,getAnchorRect:v,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:e||null},(0,s.createElement)("div",{ref:r,tabIndex:-1,onClick:function(e){e.target===r.current&&a&&n(a,-1)},onFocus:function(e){e.target!==r.current&&(o.current=!0)},className:c()(_,{"is-with-inserter":y}),style:b},(0,s.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),y&&(0,s.createElement)("div",{className:c()("block-editor-block-list__insertion-point-inserter")},(0,s.createElement)(Ic,{position:"bottom center",clientId:a,rootClientId:u,__experimentalIsQuick:!0,onToggle:e=>{o.current=e},onSelectOrClose:()=>{o.current=!1}}))))}function Dc({children:e,__unstablePopoverSlot:t,__unstableContentRef:n}){const o=(0,p.useSelect)((e=>e(Vn).isBlockInsertionPointVisible()),[]);return(0,s.createElement)(Ac.Provider,{value:(0,s.useRef)(!1)},o&&(0,s.createElement)(Mc,{__unstablePopoverSlot:t,__unstableContentRef:n}),e)}function Oc(){const e=(0,s.useContext)(Ac),t=(0,p.useSelect)((e=>e(Vn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:a,getTemplateLock:c}=(0,p.useSelect)(Vn),{showInsertionPoint:u,hideInsertionPoint:m}=(0,p.useDispatch)(Vn);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()&&m());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 p=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),g=t.clientY-f.top,h=t.clientX-f.left;let b=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===p&&e.offsetTop>g||e.classList.contains("wp-block")&&"horizontal"===p&&e.offsetLeft>h));if(!b)return;if(!b.id&&(b=b.firstElementChild,!b))return;if(null===(s=b.parentElement)||void 0===s?void 0:s.closest(".block-editor-block-content-overlay.overlay-active"))return;const v=b.id.slice("block-".length);if(!v)return;if(a().includes(v))return;const k=b.getBoundingClientRect();if("horizontal"===p&&(t.clientY>k.bottom||t.clientY<k.top)||"vertical"===p&&(t.clientX>k.right||t.clientX<k.left))return void(l()&&m());const _=r(v,d);0!==_?u(d,_,{__unstableWithInserter:!0}):l()&&m()}}),[e,n,o,r,l,i,u,m,a])}const Fc="undefined"==typeof window?e=>{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Vc="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Hc(e){return(0,p.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(Vn),{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 zc({clientId:e}){const{attributes:t,name:n,reusableBlockTitle:o}=(0,p.useSelect)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=t(Vn),i=n(e);if(!i)return{};const s=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(e),name:i,reusableBlockTitle:s&&l(o(e).ref)}}),[e]),l=Hc(e);if(!n||!l)return null;const i=(0,r.getBlockType)(n),s=o||(0,r.__experimentalGetBlockLabel)(i,t);return s!==i.title?(0,u.truncate)(s,{length:35}):l.title}var Gc=({children:e,clientIds:t,cloneClassname:n,onDragStart:o,onDragEnd:l})=>{const{srcRootClientId:i,isDraggable:a,icon:c}=(0,p.useSelect)((e=>{var n;const{getBlockRootClientId:o,getTemplateLock:l,getBlockName:i}=e(Vn),s=o(t[0]),a=s?l(s):null,c=i(t[0]);return{srcRootClientId:s,isDraggable:"all"!==a,icon:null===(n=(0,r.getBlockType)(c))||void 0===n?void 0:n.icon}}),[t]),u=(0,s.useRef)(!1),[d,f,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,Fi.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:h,stopDraggingBlocks:b}=(0,p.useDispatch)(Vn);if((0,s.useEffect)((()=>()=>{u.current&&b()}),[]),!a)return e({isDraggable:!1});const v={type:"block",srcClientIds:t,srcRootClientId:i};return(0,s.createElement)(m.Draggable,{cloneClassname:n,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(t),u.current=!0,d(e),o&&o()},onDragOver:f,onDragEnd:()=>{b(),u.current=!1,g(),l&&l()},__experimentalDragComponent:(0,s.createElement)(Pa,{count:t.length,icon:c})},(({onDraggableStart:t,onDraggableEnd:n})=>e({draggable:!0,onDragStart:t,onDragEnd:n})))},Uc=function({clientId:e,rootClientId:t,blockElement:n}){const o=Hc(e),l=(0,p.useSelect)((n=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:s}=n(Vn),a=l(e,t),{name:c,attributes:u}=r(e);return{index:a,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=s(t))||void 0===o?void 0:o.orientation}}),[e,t]),{index:a,name:u,attributes:d,blockMovingMode:f,orientation:h}=l,{setNavigationMode:b,removeBlock:v}=(0,p.useDispatch)(Vn),k=(0,s.useRef)(),_=(0,r.getBlockType)(u),y=(0,r.__experimentalGetAccessibleBlockLabel)(_,d,a+1,h);(0,s.useEffect)((()=>{k.current.focus(),(0,It.speak)(y)}),[y]);const{hasBlockMovingClientId:E,getBlockIndex:C,getBlockRootClientId:S,getClientIdsOfDescendants:w,getSelectedBlockClientId:B,getMultiSelectedBlocksEndClientId:I,getPreviousBlockClientId:x,getNextBlockClientId:T}=(0,p.useSelect)(Vn),{selectBlock:N,clearSelectedBlock:L,setBlockMovingClientId:P,moveBlockToPosition:R}=(0,p.useDispatch)(Vn),A=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!f}),M=(0,g.__)("Drag");return(0,s.createElement)("div",{className:A},(0,s.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(Fs,{icon:null==o?void 0:o.icon,showColors:!0})),(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(Gc,{clientIds:[e]},(e=>(0,s.createElement)(m.Button,i({icon:La,className:"block-selection-button_drag-handle","aria-hidden":"true",label:M,tabIndex:"-1"},e))))),(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(m.Button,{ref:k,onClick:()=>b(!1),onKeyDown:function(t){const{keyCode:o}=t,r=o===xl.UP,l=o===xl.DOWN,i=o===xl.LEFT,s=o===xl.RIGHT,a=o===xl.TAB,c=o===xl.ESCAPE,u=o===xl.ENTER,d=o===xl.SPACE,m=t.shiftKey;if(o===xl.BACKSPACE||o===xl.DELETE)return v(e),void t.preventDefault();const p=B(),f=I(),g=x(f||p),h=T(f||p),b=a&&m||r,k=a&&!m||l,_=i,y=s;let A;if(b)A=g;else if(k)A=h;else if(_){var M;A=null!==(M=S(p))&&void 0!==M?M:p}else if(y){var D;A=null!==(D=w([p])[0])&&void 0!==D?D:p}const O=E();if(c&&O&&!t.defaultPrevented&&(P(null),t.preventDefault()),(u||d)&&O){const e=S(O),t=S(p),n=C(O,e);let o=C(p,t);n<o&&e===t&&(o-=1),R(O,e,t,o),N(O),P(null)}if(k||b||_||y)if(A)t.preventDefault(),N(A);else if(a&&p){let e;k?(e=Fi.focus.tabbable.findNext(n),e||(e=n.ownerDocument.defaultView.frameElement,e=Fi.focus.tabbable.findNext(e))):e=Fi.focus.tabbable.findPrevious(n),e&&(t.preventDefault(),e.focus(),L())}},label:y,className:"block-selection-button_select-button"},(0,s.createElement)(zc,{clientId:e})))))};function Wc(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var jc=function({children:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,...r}){const l=(0,s.useRef)(),a=function(e){const[t,n]=(0,s.useState)(!0),o=(0,s.useCallback)((()=>{const t=!Fi.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Nt()("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}(l);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]=Fi.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,Qs.useShortcut)("core/block-editor/focus-toolbar",a,{bindGlobal:!0,eventName:"keydown"}),(0,s.useEffect)((()=>{l&&a()}),[n,l,a]),(0,s.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Wc(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=Wc(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}(l,t,a,n,o),a?(0,s.createElement)(m.Toolbar,i({label:r["aria-label"],ref:l},r),e):(0,s.createElement)(m.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:l},r),e)},$c=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),Kc=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),qc=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),Yc=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const Xc=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?$c:Kc:qc:"down"===e?"horizontal"===t?(0,g.isRTL)()?Kc:$c:Yc:null,Qc=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move right"):(0,g.__)("Move left"):(0,g.__)("Move up"):"down"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move left"):(0,g.__)("Move right"):(0,g.__)("Move down"):null,Zc=(0,s.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},l)=>{const a=(0,d.useInstanceId)(Zc),f=(0,u.castArray)(e).length,{blockType:h,isDisabled:b,rootClientId:v,isFirst:k,isLast:_,firstIndex:y,orientation:E="vertical"}=(0,p.useSelect)((o=>{const{getBlockIndex:l,getBlockRootClientId:i,getBlockOrder:s,getBlock:a,getBlockListSettings:c}=o(Vn),d=(0,u.castArray)(e),m=(0,u.first)(d),p=i(m),f=l(m,p),g=l((0,u.last)(d),p),h=s(p),b=a(m),v=0===f,k=g===h.length-1,{orientation:_}=c(p)||{};return{blockType:b?(0,r.getBlockType)(b.name):null,isDisabled:"up"===t?v:k,rootClientId:p,firstIndex:f,isFirst:v,isLast:k,orientation:n||_}}),[e,t]),{moveBlocksDown:C,moveBlocksUp:S}=(0,p.useDispatch)(Vn),w="up"===t?S:C,B=`block-editor-block-mover-button__description-${a}`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.Button,i({ref:l,className:c()("block-editor-block-mover-button",`is-${t}-button`),icon:Xc(t,E),label:Qc(t,E),"aria-describedby":B},o,{onClick:b?null:t=>{w(e,v),o.onClick&&o.onClick(t)},"aria-disabled":b})),(0,s.createElement)("span",{id:B,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,g.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,g.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;return r<0&&n?(0,g.__)("Blocks cannot be moved up as they are already at the top"):r>0&&o?(0,g.__)("Blocks cannot be moved down as they are already at the bottom"):r<0&&!n?(0,g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
31
  (0,g._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,g.sprintf)(// translators: 1: Number of selected blocks, 2: Position of selected blocks
32
  (0,g._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,g.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
33
  (0,g.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=a("down");if("down"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
42
  (0,g.__)("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,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
43
  (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
44
  (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc)
45
+ (0,g.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(f,h&&h.title,y,k,_,"up"===t?-1:1,E)))})),Jc=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Zc,i({direction:"up",ref:t},e)))),eu=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Zc,i({direction:"down",ref:t},e))));var tu=(0,p.withSelect)(((e,{clientIds:t})=>{var n;const{getBlock:o,getBlockIndex:l,getBlockListSettings:i,getTemplateLock:s,getBlockOrder:a,getBlockRootClientId:c}=e(Vn),d=(0,u.castArray)(t),m=(0,u.first)(d),p=o(m),f=c((0,u.first)(d)),g=l(m,f),h=0===g,b=l((0,u.last)(d),f)===a(f).length-1;return{blockType:p?(0,r.getBlockType)(p.name):null,isLocked:"all"===s(f),rootClientId:f,firstIndex:g,isFirst:h,isLast:b,orientation:null===(n=i(f))||void 0===n?void 0:n.orientation}}))((function({isFirst:e,isLast:t,clientIds:n,isLocked:o,isHidden:r,rootClientId:l,orientation:a,hideDragHandle:u}){const[d,p]=(0,s.useState)(!1),f=()=>p(!0),h=()=>p(!1);if(o||e&&t&&!l)return null;const b=(0,g.__)("Drag");return(0,s.createElement)("div",{className:c()("block-editor-block-mover",{"is-visible":d||!r,"is-horizontal":"horizontal"===a})},!u&&(0,s.createElement)(Gc,{clientIds:n,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,s.createElement)(m.Button,i({icon:La,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,s.createElement)(m.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,s.createElement)(m.ToolbarItem,{onFocus:f,onBlur:h},(e=>(0,s.createElement)(Jc,i({clientIds:n},e)))),(0,s.createElement)(m.ToolbarItem,{onFocus:f,onBlur:h},(e=>(0,s.createElement)(eu,i({clientIds:n},e))))))}));const{clearTimeout:nu,setTimeout:ou}=window;function ru({ref:e,isFocused:t,debounceTimeout:n=200,onChange:o=u.noop}){const[r,l]=(0,s.useState)(!1),i=(0,s.useRef)(),a=t=>{null!=e&&e.current&&l(t),o(t)},c=()=>{const e=i.current;e&&nu&&nu(e)};return(0,s.useEffect)((()=>()=>c()),[]),{showMovers:r,debouncedShowMovers:e=>{e&&e.stopPropagation(),c(),r||a(!0)},debouncedHideMovers:o=>{o&&o.stopPropagation(),c(),i.current=ou((()=>{(()=>{const n=(null==e?void 0:e.current)&&e.current.matches(":hover");return!t&&!n})()&&a(!1)}),n)}}}function lu({ref:e,debounceTimeout:t=200,onChange:n=u.noop}){const[o,r]=(0,s.useState)(!1),{showMovers:l,debouncedShowMovers:i,debouncedHideMovers:a}=ru({ref:e,debounceTimeout:t,isFocused:o,onChange:n}),c=(0,s.useRef)(!1),d=()=>(null==e?void 0:e.current)&&e.current.contains(e.current.ownerDocument.activeElement);return(0,s.useEffect)((()=>{const t=e.current,n=()=>{d()&&(r(!0),i())},o=()=>{d()||(r(!1),a())};return t&&!c.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),c.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,c,r,i,a]),{showMovers:l,gestures:{onMouseMove:i,onMouseLeave:a}}}function iu(){const{selectBlock:e,toggleBlockHighlight:t}=(0,p.useDispatch)(Vn),{firstParentClientId:n,shouldHide:o,hasReducedUI:l}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:l}=e(Vn),{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=Hc(n),c=(0,s.useRef)(),{gestures:u}=lu({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)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,g.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
+ (0,g.__)("Select %s"),a.title),showTooltip:!0,icon:(0,s.createElement)(Fs,{icon:a.icon})}))}var su=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 au({blocks: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)(m.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,g.__)("Preview")),(0,s.createElement)(Ia,{viewportWidth:500,blocks:e})))))}var cu=({className:e,possibleBlockTransformations:t,onSelect:n,blocks:o})=>{const[l,i]=(0,s.useState)();return(0,s.createElement)(m.MenuGroup,{label:(0,g.__)("Transform to"),className:e},l&&(0,s.createElement)(au,{blocks:(0,r.switchToBlockType)(o,l)}),t.map((e=>{const{name:t,icon:o,title:l,isDisabled:a}=e;return(0,s.createElement)(m.MenuItem,{key:t,className:(0,r.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),n(t)},disabled:a,onMouseLeave:()=>i(null),onMouseEnter:()=>i(t)},(0,s.createElement)(Fs,{icon:o,showColors:!0}),l)})))};const uu={};function du({genericPreviewBlock:e,viewportWidth:t,style:n,isActive:o,onBlur:r,onHover:l,onSelect:i,styleClassName:a,itemRole:u}){const d=(0,s.useMemo)((()=>({...e,attributes:{...e.attributes,className:a}})),[e,a]);return(0,s.createElement)("div",{key:n.name,className:c()("block-editor-block-styles__item",{"is-active":o}),onClick:()=>i(),onKeyDown:e=>{xl.ENTER!==e.keyCode&&xl.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:l,onMouseLeave:r,role:u||"button",tabIndex:"0","aria-label":n.label||n.name},(0,s.createElement)("div",{className:"block-editor-block-styles__item-preview"},(0,s.createElement)(Ia,{viewportWidth:t,blocks:d})),(0,s.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var mu=function({clientId:e,onSwitch:t=u.noop,onHoverClassName:n=u.noop,itemRole:o}){const{styles:l,block:i,type:a,className:c}=(0,p.useSelect)((t=>{const{getBlock:n}=t(Vn),o=n(e);if(!o)return uu;const l=(0,r.getBlockType)(o.name),{getBlockStyles:i}=t(r.store);return{block:o,type:l,styles:i(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:d}=(0,p.useDispatch)(Vn),m=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])}(i,a);if(!l||0===l.length)return null;const f=(0,u.find)(l,"isDefault")?l:[{name:"default",label:(0,g._x)("Default","block style"),isDefault:!0},...l],h=function(e,t){for(const n of new(Kl())(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")}(f,c);return(0,s.createElement)("div",{className:"block-editor-block-styles"},f.map((r=>{var l,i;const u=function(e,t,n){const o=new(Kl())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}(c,h,r);return(0,s.createElement)(du,{genericPreviewBlock:m,viewportWidth:null!==(l=null===(i=a.example)||void 0===i?void 0:i.viewportWidth)&&void 0!==l?l:500,className:c,isActive:h===r,key:r.name,onSelect:()=>{d(e,{className:u}),n(null),t()},onBlur:()=>n(null),onHover:()=>n(u),style:r,styleClassName:u,itemRole:o})})))};function pu({hoveredBlock:e,onSwitch:t}){const{name:n,clientId:o}=e,[l,i]=(0,s.useState)(),a=(0,p.useSelect)((e=>e(r.store).getBlockType(n)),[n]);return(0,s.createElement)(m.MenuGroup,{label:(0,g.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},l&&(0,s.createElement)(au,{blocks:a.example?(0,r.getBlockFromExample)(a.name,{attributes:{...a.example.attributes,className:l},innerBlocks:a.example.innerBlocks}):(0,r.cloneBlock)(e,{className:l})}),(0,s.createElement)(mu,{clientId:o,onSwitch:t,onHoverClassName:i,itemRole:"menuitem"}))}const fu=(e,t,n=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=fu(e,t,n);if(o)return o}}},gu=(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 hu({patterns:e,onSelect:t}){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)(m.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,g.__)("Preview")),(0,s.createElement)(bu,{patterns:e,onSelect:t})))))}function bu({patterns:e,onSelect:t}){const n=(0,m.__unstableUseCompositeState)();return(0,s.createElement)(m.__unstableComposite,i({},n,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,g.__)("Patterns list")}),e.map((e=>(0,s.createElement)(vu,{key:e.name,pattern:e,onSelect:t,composite:n}))))}function vu({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-switcher__preview-patterns-container",r=(0,d.useInstanceId)(vu,`${o}-list__item-description`);return(0,s.createElement)("div",{className:`${o}-list__list-item`,"aria-label":e.title,"aria-describedby":e.description?r:void 0},(0,s.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},n,{className:`${o}-list__item`,onClick:()=>t(e.transformedBlocks)}),(0,s.createElement)(Ia,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,s.createElement)("div",{className:`${o}-list__item-title`},e.title)),!!e.description&&(0,s.createElement)(m.VisuallyHidden,{id:r},e.description))}var ku=function({blocks:e,patterns:t,onSelect:n}){const[o,l]=(0,s.useState)(!1),i=((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=fu(r,t.name,o);if(n){e=!0,o.add(n.clientId),gu(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]))(t,e);return i.length?(0,s.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,s.createElement)(hu,{patterns:i,onSelect:n}),(0,s.createElement)(m.MenuItem,{onClick:e=>{e.preventDefault(),l(!o)},icon:$c},(0,g.__)("Patterns"))):null};const _u=({clientIds:e,blocks:t})=>{const{replaceBlocks:n}=(0,p.useDispatch)(Vn),o=Hc(t[0].clientId),{possibleBlockTransformations:l,hasBlockStyles:i,icon:a,blockTitle:c,patterns:d}=(0,p.useSelect)((n=>{const{getBlockRootClientId:l,getBlockTransformItems:i,__experimentalGetPatternTransformItems:s}=n(Vn),{getBlockStyles:a,getBlockType:c}=n(r.store),d=l((0,u.castArray)(e)[0]),[{name:m}]=t,p=1===t.length,f=p&&a(m);let g;var h;p?g=null==o?void 0:o.icon:g=1===(0,u.uniq)(t.map((({name:e})=>e))).length?null===(h=c(m))||void 0===h?void 0:h.icon:su;return{possibleBlockTransformations:i(t,d),hasBlockStyles:!(null==f||!f.length),icon:g,blockTitle:c(m).title,patterns:s(t,d)}}),[e,t,null==o?void 0:o.icon]),f=1===t.length&&(0,r.isReusableBlock)(t[0]),h=1===t.length&&(0,r.isTemplatePart)(t[0]),b=!!l.length,v=!(null==d||!d.length);if(!i&&!b)return(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:c,icon:(0,s.createElement)(Fs,{icon:a,showColors:!0})}));const k=c,_=1===t.length?(0,g.sprintf)(
48
  /* translators: %s: block title. */
49
  (0,g.__)("%s: Change block type or style"),c):(0,g.sprintf)(
50
  /* translators: %d: number of blocks. */
51
+ (0,g._n)("Change type of %d block","Change type of %d blocks",t.length),t.length),y=i||b||v;return(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(m.ToolbarItem,null,(o=>(0,s.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:k,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Fs,{icon:a,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||h)&&(0,s.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,s.createElement)(zc,{clientId:e}))),toggleProps:{describedBy:_,...o},menuProps:{orientation:"both"}},(({onClose:o})=>y&&(0,s.createElement)("div",{className:"block-editor-block-switcher__container"},v&&(0,s.createElement)(ku,{blocks:t,patterns:d,onSelect:t=>{(t=>{n(e,t)})(t),o()}}),b&&(0,s.createElement)(cu,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:t,onSelect:l=>{(o=>{n(e,(0,r.switchToBlockType)(t,o))})(l),o()}}),i&&(0,s.createElement)(pu,{hoveredBlock:t[0],onSwitch:o})))))))};var yu=({clientIds:e})=>{const t=(0,p.useSelect)((t=>t(Vn).getBlocksByClientId(e)),[e]);return!t.length||t.some((e=>!e))?null:(0,s.createElement)(_u,{clientIds:e,blocks:t})},Eu=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Cu=window.wp.blob;function Su(){const{getBlockName:e}=(0,p.useSelect)(Vn),{getBlockType:t}=(0,p.useSelect)(r.store),{createSuccessNotice:n}=(0,p.useDispatch)(ja.store);return(0,s.useCallback)(((o,r)=>{let l="";if(1===r.length){const n=r[0],{title:i}=t(e(n));l="copy"===o?(0,g.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
52
  (0,g.__)('Copied "%s" to clipboard.'),i):(0,g.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
53
  (0,g.__)('Moved "%s" to clipboard.'),i)}else l="copy"===o?(0,g.sprintf)(// Translators: %d: Number of blocks being copied.
54
  (0,g._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,g.sprintf)(// Translators: %d: Number of blocks being cut.
55
+ (0,g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function wu(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o}=(0,p.useSelect)(Vn),{flashBlock:l,removeBlocks:i,replaceBlocks:s}=(0,p.useDispatch)(Vn),a=Su();return(0,d.useRefEffect)((c=>{function u(u){const d=t();if(0!==d.length){if(!n()){const{target:e}=u,{ownerDocument:t}=e;if("copy"===u.type||"cut"===u.type?(0,Fi.documentHasUncollapsedSelection)(t):(0,Fi.documentHasSelection)(t))return}if(c.contains(u.target.ownerDocument.activeElement)){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){const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(t){try{n=e.getData("Text")}catch(e){return}}const o=(0,Fi.getFilesFromDataTransfer)(e).filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e)));return o.length&&!n&&(n=o.map((e=>`<img src="${(0,Cu.createBlobURL)(e)}">`)).join(""),t=""),{html:n,plainText:t}}(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 Bu=function({children:e}){return(0,s.createElement)("div",{ref:wu()},e)};function Iu({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{canInsertBlockType:o,getBlockRootClientId:l,getBlocksByClientId:i,getTemplateLock:s}=(0,p.useSelect)((e=>e(Vn)),[]),{getDefaultBlockName:a,getGroupingBlockName:c}=(0,p.useSelect)((e=>e(r.store)),[]),d=i(e),m=l(e[0]),f=(0,u.every)(d,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,m))),g=o(a(),m),{removeBlocks:h,replaceBlocks:b,duplicateBlocks:v,insertAfterBlock:k,insertBeforeBlock:_,flashBlock:y,setBlockMovingClientId:E,setNavigationMode:C,selectBlock:S}=(0,p.useDispatch)(Vn),w=Su();return t({canDuplicate:f,canInsertDefaultBlock:g,isLocked:!!s(m),rootClientId:m,blocks:d,onDuplicate:()=>v(e,n),onRemove:()=>h(e,n),onInsertBefore(){_((0,u.first)((0,u.castArray)(e)))},onInsertAfter(){k((0,u.last)((0,u.castArray)(e)))},onMoveTo(){C(!0),S(e[0]),E(e[0])},onGroup(){if(!d.length)return;const t=c(),n=(0,r.switchToBlockType)(d,t);n&&b(e,n)},onUngroup(){if(!d.length)return;const t=d[0].innerBlocks;t.length&&b(e,t)},onCopy(){const e=d.map((({clientId:e})=>e));1===d.length&&y(e[0]),w("copy",e)}})}var xu=(0,d.compose)([(0,p.withSelect)(((e,{clientId:t})=>{const{getBlock:n,getBlockMode:o,getSettings:l}=e(Vn),i=n(t),s=l().codeEditingEnabled;return{mode:o(t),blockType:i?(0,r.getBlockType)(i.name):null,isCodeEditingEnabled:s}})),(0,p.withDispatch)(((e,{onToggle:t=u.noop,clientId:n})=>({onToggleMode(){e(Vn).toggleBlockMode(n),t()}})))])((function({blockType:e,mode:t,onToggleMode:n,small:o=!1,isCodeEditingEnabled:l=!0}){if(!(0,r.hasBlockSupport)(e,"html",!0)||!l)return null;const i="visual"===t?(0,g.__)("Edit as HTML"):(0,g.__)("Edit visually");return(0,s.createElement)(m.MenuItem,{onClick:n},!o&&i)})),Tu=(0,d.compose)((0,p.withSelect)(((e,{clientId:t})=>{const n=e(Vn).getBlock(t);return{block:n,shouldRender:n&&"core/html"===n.name}})),(0,p.withDispatch)(((e,{block:t})=>({onClick:()=>e(Vn).replaceBlocks(t.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(t)}))}))))((function({shouldRender:e,onClick:t,small:n}){if(!e)return null;const o=(0,g.__)("Convert to Blocks");return(0,s.createElement)(m.MenuItem,{onClick:t},!n&&o)}));const{Fill:Nu,Slot:Lu}=(0,m.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Nu.Slot=Lu;var Pu=Nu;function Ru({clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l,onClose:i=(()=>{})}){const{replaceBlocks:a}=(0,p.useDispatch)(Vn);return t||n?(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(m.MenuItem,{onClick:()=>{(()=>{const t=(0,r.switchToBlockType)(o,l);t&&a(e,t)})(),i()}},(0,g._x)("Group","verb")),n&&(0,s.createElement)(m.MenuItem,{onClick:()=>{(()=>{const t=o[0].innerBlocks;t.length&&a(e,t)})(),i()}},(0,g._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}const{Fill:Au,Slot:Mu}=(0,m.createSlotFill)("BlockSettingsMenuControls");function Du({...e}){return(0,s.createElement)(m.__experimentalStyleProvider,{document:document},(0,s.createElement)(Au,e))}Du.Slot=({fillProps:e,clientIds:t=null})=>{const n=(0,p.useSelect)((e=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o}=e(Vn),r=null!==t?t:o();return(0,u.map)((0,u.compact)(n(r)),(e=>e.name))}),[t]),o=function(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,p.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(Vn),{getGroupingBlockName:s}=e(r.store),a=i(),c=s(),u=l(c,null!=a&&a.length?n(a[0]):void 0),d=o(a),m=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:a,isGroupable:u&&d.length&&!m,isUngroupable:m&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}(),{isGroupable:l,isUngroupable:a}=o,c=l||a;return(0,s.createElement)(Mu,{fillProps:{...e,selectedBlocks:n}},(t=>{if((null==t?void 0:t.length)>0||c)return(0,s.createElement)(m.MenuGroup,null,t,(0,s.createElement)(Ru,i({},o,{onClose:null==e?void 0:e.onClose})))}))};var Ou=Du;const Fu={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Vu({blocks:e,onCopy:t}){const n=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(e)),t);return(0,s.createElement)(m.MenuItem,{ref:n},(0,g.__)("Copy"))}var Hu=function({clientIds:e,__experimentalSelectBlock:t,children:n,...o}){const r=(0,u.castArray)(e),l=r.length,a=r[0],c=(0,p.useSelect)((e=>1===e(Vn).getBlockCount()),[]),d=(0,p.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Qs.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")}}),[]),f=(0,s.useCallback)(t?async e=>{const n=await e;n&&n[0]&&t(n[0])}:u.noop,[t]),h=1===l?(0,g.__)("Remove block"):(0,g.__)("Remove blocks");return(0,s.createElement)(Iu,{clientIds:e,__experimentalUpdateSelection:!t},(({canDuplicate:t,canInsertDefaultBlock:r,isLocked:p,onDuplicate:b,onInsertAfter:v,onInsertBefore:k,onRemove:_,onCopy:y,onMoveTo:E,blocks:C})=>(0,s.createElement)(m.DropdownMenu,i({icon:Eu,label:(0,g.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Fu,noIcons:!0},o),(({onClose:o})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.MenuGroup,null,(0,s.createElement)(Pu.Slot,{fillProps:{onClose:o}}),1===l&&(0,s.createElement)(Tu,{clientId:a}),(0,s.createElement)(Vu,{blocks:C,onCopy:y}),t&&(0,s.createElement)(m.MenuItem,{onClick:(0,u.flow)(o,b,f),shortcut:d.duplicate},(0,g.__)("Duplicate")),r&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.MenuItem,{onClick:(0,u.flow)(o,k),shortcut:d.insertBefore},(0,g.__)("Insert before")),(0,s.createElement)(m.MenuItem,{onClick:(0,u.flow)(o,v),shortcut:d.insertAfter},(0,g.__)("Insert after"))),!p&&!c&&(0,s.createElement)(m.MenuItem,{onClick:(0,u.flow)(o,E)},(0,g.__)("Move to")),1===l&&(0,s.createElement)(xu,{clientId:a,onToggle:o})),(0,s.createElement)(Ou.Slot,{fillProps:{onClose:o},clientIds:e}),"function"==typeof n?n({onClose:o}):s.Children.map((e=>(0,s.cloneElement)(e,{onClose:o}))),(0,s.createElement)(m.MenuGroup,null,!p&&(0,s.createElement)(m.MenuItem,{onClick:(0,u.flow)(o,_,f),shortcut:d.remove},h)))))))},zu=function({clientIds:e,...t}){return(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(m.ToolbarItem,null,(n=>(0,s.createElement)(Hu,i({clientIds:e,toggleProps:n},t)))))};function Gu({hideDragHandle:e}){const{blockClientIds:t,blockClientId:n,blockType:o,hasFixedToolbar:l,hasReducedUI:a,isValid:u,isVisual:f}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:s}=e(Vn),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,p.useDispatch)(Vn),h=(0,s.useRef)(),{showMovers:b,gestures:v}=lu({ref:h,onChange(e){e&&a||g(n,e)}}),k=(0,d.useViewportMatch)("medium","<")||l;if(o&&!(0,r.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const _=k||b;if(0===t.length)return null;const y=u&&f,E=t.length>1,C=c()("block-editor-block-toolbar",_&&"is-showing-movers");return(0,s.createElement)("div",{className:C},!E&&!k&&(0,s.createElement)(iu,{clientIds:t}),(0,s.createElement)("div",i({ref:h},v),(y||E)&&(0,s.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,s.createElement)(yu,{clientIds:t}),(0,s.createElement)(tu,{clientIds:t,hideDragHandle:e||a}))),y&&(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)(zu,{clientIds:t}))}var Uu=function({focusOnMount:e,isFixed:t,...n}){const{blockType:o,hasParents:l,showParentSelector:a}=(0,p.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(Vn),{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(o&&!(0,r.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const u=c()("block-editor-block-contextual-toolbar",{"has-parent":l&&a,"is-fixed":t});return(0,s.createElement)(jc,i({focusOnMount:e,className:u
56
+ /* translators: accessibility text for the block toolbar */,"aria-label":(0,g.__)("Block tools")},n),(0,s.createElement)(Gu,{hideDragHandle:t}))};function Wu(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:s}=e(Vn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:s()}}function ju({clientId:e,rootClientId:t,isValid:n,isEmptyDefaultBlock:o,capturingClientId:r,__unstablePopoverSlot:l,__unstableContentRef:i}){const{isNavigationMode:a,isMultiSelecting:u,isTyping:f,isCaretWithinFormattedText:g,hasMultiSelection:h,hasFixedToolbar:b,lastClientId:v}=(0,p.useSelect)(Wu,[]),k=(0,p.useSelect)((t=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=t(Vn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===e}),[e]),_=(0,d.useViewportMatch)("medium"),[y,E]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),{stopTyping:w}=(0,p.useDispatch)(Vn),B=!f&&!a&&o&&n,I=a,x=!a&&!b&&_&&!B&&!u&&(!f||g),T=!(a||x||b||o);(0,Qs.useShortcut)("core/block-editor/focus-toolbar",(0,s.useCallback)((()=>{E(!0),w(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!T}),(0,s.useEffect)((()=>{x||E(!1)}),[x]);const N=(0,s.useRef)(),L=el(e),P=el(v),R=el(r),A=Rc(i);if(!(I||x||y||B))return null;let M=L;if(!M)return null;r&&(M=R);let D=M;if(h){if(!P)return null;D={top:M,bottom:P}}const O=B?"top left right":"top right left",{ownerDocument:F}=M,V=B?void 0:F.defaultView.frameElement||(0,Fi.getScrollContainer)(M)||F.body;return(0,s.createElement)(m.Popover,{ref:A,noArrow:!0,animate:!1,position:O,focusOnMount:!1,anchorRef:D,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstableStickyBoundaryElement:V,__unstableSlotName:l||null,__unstableBoundaryParent:!0,__unstableObserveElement:M,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==i?void 0:i.current},(x||y)&&(0,s.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},(0,s.createElement)(Ic,{clientId:e,rootClientId:t,__experimentalIsQuick:!0})),(x||y)&&(0,s.createElement)(Uu,{focusOnMount:y,__experimentalInitialIndex:N.current,__experimentalOnIndexChange:e=>{N.current=e},key:e}),I&&(0,s.createElement)(Uc,{clientId:e,rootClientId:t,blockElement:M}),B&&(0,s.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,s.createElement)(Ic,{position:"bottom right",rootClientId:t,clientId:e,__experimentalIsQuick:!0})))}function $u(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:s}=e(Vn),a=t()||n();if(!a)return;const{name:c,attributes:d={},isValid:m}=l(a)||{},p=i(a),f=s(p),g=(0,u.find)(p,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:a,rootClientId:o(a),name:c,isValid:m,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:g}}function Ku({__unstablePopoverSlot:e,__unstableContentRef:t}){const n=(0,p.useSelect)($u,[]);if(!n)return null;const{clientId:o,rootClientId:r,name:l,isValid:i,isEmptyDefaultBlock:a,capturingClientId:c}=n;return l?(0,s.createElement)(ju,{clientId:o,rootClientId:r,isValid:i,isEmptyDefaultBlock:a,capturingClientId:c,__unstablePopoverSlot:e,__unstableContentRef:t}):null}function qu({children:e}){const t=(0,s.useContext)(Ac),n=(0,s.useContext)(m.Disabled.Context);return t||n?e:(Nt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools"}),(0,s.createElement)(Dc,{__unstablePopoverSlot:"block-toolbar"},(0,s.createElement)(Ku,{__unstablePopoverSlot:"block-toolbar"}),e))}var Yu=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Un();return(0,s.createElement)(e,i({},t,{clientId:n}))}),"withClientId"),Xu=Yu((({clientId:e,showSeparator:t,isFloating:n,onAddBlock:o})=>(0,s.createElement)(Lc,{rootClientId:e,showSeparator:t,isFloating:n,onAddBlock:o}))),Qu=(0,d.compose)([Yu,(0,p.withSelect)(((e,{clientId:t})=>{const{getBlockOrder:n}=e(Vn),o=n(t);return{lastBlockClientId:(0,u.last)(o)}}))])((({clientId:e,lastBlockClientId:t})=>(0,s.createElement)(xc,{rootClientId:e,lastBlockClientId:t}))),Zu=window.wp.isShallowEqual,Ju=n.n(Zu);const ed=new WeakMap;function td(e,t){const n=(0,p.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,p.useSelect)(Vn),{insertBlocks:s,moveBlocksToPosition:a,updateBlockAttributes:c,clearSelectedBlock:u}=(0,p.useDispatch)(Vn),d=function(e,t,n,o,r,l,i){return s=>{const{srcRootClientId:a,srcClientIds:c,type:u,blocks:d}=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}(s);if("inserter"===u&&(i(),l(d,t,e,!0,null)),"block"===u){const l=n(c[0],a);if(a===e&&l===t)return;if(c.includes(e)||o(c).some((t=>t===e)))return;const i=a===e,s=c.length;r(c,a,e,i&&l<t?t-s:t)}}}(e,t,l,i,a,s,u),m=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,Fi.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?m(t):n?f(n):d(e)}}function nd(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const l=function(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)}(e,t,n);(void 0===o||l<o)&&(o=l,r=n)})),[o,r]}function od({rootClientId:e=""}={}){const[t,n]=(0,s.useState)(null),o=(0,p.useSelect)((t=>{const{getTemplateLock:n}=t(Vn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,p.useSelect)(Vn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,p.useDispatch)(Vn),a=td(e,t),c=(0,d.useThrottle)((0,s.useCallback)(((t,o)=>{var i;const s=function(e,t,n){const o="horizontal"===n?["left","right"]:["top","bottom"],r=(0,g.isRTL)();let l,i;return e.forEach(((e,n)=>{const s=e.getBoundingClientRect(),[a,c]=nd(t,s,o);(void 0===i||a<i)&&(i=a,l=n+("bottom"===c||!r&&"right"===c||r&&"left"===c?1:0))})),l}(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 rd(e){const{clientId:t,allowedBlocks:n,template:o,templateLock:l,wrapperRef:i,templateInsertUpdatesSelection:a,__experimentalCaptureToolbars:c,__experimentalAppenderTagName:d,renderAppender:m,orientation:f,placeholder:g,__experimentalLayout:h}=e;!function(e,t,n,o,r,l){const{updateBlockListSettings:i}=(0,p.useDispatch)(Vn),{blockListSettings:a,parentLock:c}=(0,p.useSelect)((t=>{const n=t(Vn).getBlockRootClientId(e);return{blockListSettings:t(Vn).getBlockListSettings(e),parentLock:t(Vn).getTemplateLock(n)}}),[e]),u=(0,s.useMemo)((()=>t),t);(0,s.useLayoutEffect)((()=>{const t={allowedBlocks:u,templateLock:void 0===n?c:n};if(void 0!==o&&(t.__experimentalCaptureToolbars=o),void 0!==r)t.orientation=r;else{const e=ko(null==l?void 0:l.type);t.orientation=e.getOrientation(l)}Ju()(a,t)||i(e,t)}),[e,a,u,n,c,o,r,i,l])}(t,n,l,c,f,h),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,p.useSelect)(Vn),{replaceInnerBlocks:i}=(0,p.useDispatch)(Vn),a=(0,p.useSelect)((t=>t(Vn).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,o,l,a);const b=(0,p.useSelect)((e=>{const n=e(Vn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){ed.has(t)||ed.set(t,new WeakMap);const n=ed.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)(Hi,{value:b},(0,s.createElement)(fd,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:d,__experimentalLayout:h,wrapperRef:i,placeholder:g}))}function ld(e){return Hs(e),(0,s.createElement)(rd,e)}const id=(0,s.forwardRef)(((e,t)=>{const n=sd({ref:t},e);return(0,s.createElement)("div",{className:"block-editor-inner-blocks"},(0,s.createElement)("div",n))}));function sd(e={},t={}){const{clientId:n}=Un(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:a}=(0,p.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:s}=e(Vn),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,od({rootClientId:n})]),m={__experimentalCaptureToolbars:l,...t},f=m.value&&m.onChange?ld:rd;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":a}),children:n?(0,s.createElement)(f,i({},m,{clientId:n})):(0,s.createElement)(fd,t)}}id.DefaultBlockAppender=Qu,id.ButtonBlockAppender=Xu,id.Content=(0,r.withBlockContentContext)((({BlockContent:e})=>(0,s.createElement)(e,null)));var ad=id;const cd=(0,s.createContext)(),ud=(0,s.createContext)();function dd({className:e,...t}){const[n,o]=(0,s.useState)(),r=(0,d.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:i,isNavigationMode:a}=(0,p.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(Vn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),u=sd({ref:(0,d.useMergeRefs)([Us(),Oc(),o]),className:c()("is-root-container",e,{"is-outline-mode":l,"is-focus-mode":i&&r,"is-navigate-mode":a})},t);return(0,s.createElement)(cd.Provider,{value:n},(0,s.createElement)("div",u))}function md(e){return function(){const e=(0,p.useSelect)((e=>e(Vn).getSettings().__experimentalBlockPatterns),[]);(0,s.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,p.select)(Vn).__experimentalGetParsedPattern(e[n].name),t=Fc(o))};return t=Fc(o),()=>Vc(t)}),[e])}(),(0,s.createElement)(qu,null,(0,s.createElement)(Gn,{value:Hn},(0,s.createElement)(dd,e)))}function pd({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,__experimentalLayout:r=_o}){const[l,i]=(0,s.useState)(new Set),a=(0,s.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{i((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}))}))}),[i]),{order:c,selectedBlocks:u}=(0,p.useSelect)((e=>{const{getBlockOrder:n,getSelectedBlockClientIds:o}=e(Vn);return{order:n(t),selectedBlocks:o()}}),[t]);return(0,s.createElement)(Eo,{value:r},(0,s.createElement)(ud.Provider,{value:a},c.map((e=>(0,s.createElement)(p.AsyncModeProvider,{key:e,value:!l.has(e)&&!u.includes(e)},(0,s.createElement)(Ps,{rootClientId:t,clientId:e}))))),c.length<1&&e,(0,s.createElement)(Pc,{tagName:o,rootClientId:t,renderAppender:n}))}function fd(e){return(0,s.createElement)(p.AsyncModeProvider,{value:!1},(0,s.createElement)(pd,e))}md.__unstableElementContext=cd;const gd=[];function hd(e=[]){const t={r:[],g:[],b:[]};return e.forEach((e=>{const n=Ko()(e);t.r.push(n._r/255),t.g.push(n._g/255),t.b.push(n._b/255)})),t}function bd({selector:e,id:t,values:n}){const o=`\n${e} {\n\tfilter: url( #${t} );\n}\n`;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.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:t},(0,s.createElement)("feColorMatrix",{type:"matrix",values:".299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 0 0 0 1 0"}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}))))),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:o}}))}function vd({attributes:e,setAttributes:t}){var n;const o=null==e?void 0:e.style,r=null==o||null===(n=o.color)||void 0===n?void 0:n.duotone,l=so("color.duotone")||gd,i=so("color.palette")||gd,a=!so("color.custom"),c=!so("color.customDuotone")||0===(null==i?void 0:i.length)&&a;return 0===(null==l?void 0:l.length)&&c?null:(0,s.createElement)(Yn,{group:"block",__experimentalExposeToChildren:!0},(0,s.createElement)(Oi,{duotonePalette:l,colorPalette:i,disableCustomDuotone:c,disableCustomColors:a,value:r,onChange:e=>{const n={...o,color:{...null==o?void 0:o.color,duotone:e}};t({style:n})}}))}const kd=(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)(vd,t))}),"withDuotoneControls"),_d=(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 m=`wp-duotone-filter-${(0,d.useInstanceId)(e)}`,p=a.split(",").map((e=>`.${m} ${e.trim()}`)).join(", "),f=c()(null==t?void 0:t.className,m),g=(0,s.useContext)(md.__unstableElementContext);return(0,s.createElement)(s.Fragment,null,g&&(0,s.createPortal)((0,s.createElement)(bd,{selector:p,id:m,values:hd(u)}),g),(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",kd),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",_d);const yd="__experimentalLayout";function Ed({setAttributes:e,attributes:t,name:n}){const{layout:o}=t,l=so("layout"),i=(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().supportsLayout}),[]),a=(0,r.getBlockSupport)(n,yd,{}),{allowSwitching:c,allowEditing:u=!0,allowInheriting:d=!0,default:f}=a;if(!u)return null;const h=o||f||{},{inherit:b=!1,type:v="default"}=h;if("default"===v&&!i)return null;const k=ko(v),_=t=>e({layout:t});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Go,null,(0,s.createElement)(m.PanelBody,{title:(0,g.__)("Layout")},d&&!!l&&(0,s.createElement)(m.ToggleControl,{label:(0,g.__)("Inherit default layout"),checked:!!b,onChange:()=>e({layout:{inherit:!b}})}),!b&&c&&(0,s.createElement)(Cd,{type:v,onChange:t=>e({layout:{type:t}})}),!b&&k&&(0,s.createElement)(k.inspectorControls,{layout:h,onChange:_,layoutBlockSupport:a}))),!b&&k&&(0,s.createElement)(k.toolBarControls,{layout:h,onChange:_,layoutBlockSupport:a}))}function Cd({type:e,onChange:t}){return(0,s.createElement)(m.ButtonGroup,null,vo.map((({name:n,label:o})=>(0,s.createElement)(m.Button,{key:n,isPressed:e===n,onClick:()=>t(n)},o))))}const Sd=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,yd)&&(0,s.createElement)(Ed,i({key:"layout"},t)),(0,s.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),wd=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,yd),a=(0,d.useInstanceId)(e),u=so("layout")||{},m=(0,s.useContext)(md.__unstableElementContext),{layout:p}=o,{default:f}=(0,r.getBlockSupport)(n,yd)||{},g=null!=p&&p.inherit?u:p||f||{},h=c()(null==t?void 0:t.className,{[`wp-container-${a}`]:l});return(0,s.createElement)(s.Fragment,null,l&&m&&(0,s.createPortal)((0,s.createElement)(Co,{selector:`.wp-container-${a}`,layout:g}),m),(0,s.createElement)(e,i({},t,{className:h})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,yd)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",wd),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",Sd);const Bd=[];function Id({borderColor:e,style:t}){var n;const o=(null==t?void 0:t.border)||{},r=Xo("border-color",e);return{className:c()({[r]:!!r,"has-border-color":e||(null==t||null===(n=t.border)||void 0===n?void 0:n.color)})||void 0,style:Ni({border:o})}}function xd(e){const t=so("color.palette")||Bd,n=Id(e);if(e.borderColor){const o=qo(t,e.borderColor);n.style.borderColor=o.color}return n}const Td=[];function Nd(e){var t,n,o,r,l,i;const{backgroundColor:s,textColor:a,gradient:u,style:d}=e,m=Xo("background-color",s),p=Xo("color",a),f=Zo(u),g=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(p,f,{[m]:!g&&!!m,"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:Ni({color:(null==d?void 0:d.color)||{}})}}function Ld(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=so("color.palette")||Td,l=so("color.gradients")||Td,i=Nd(e);if(t){const e=qo(r,t);i.style.backgroundColor=e.color}if(o&&(i.style.background=Jo(l,o)),n){const e=qo(r,n);i.style.color=e.color}return i}function Pd(e){const{style:t}=e;return{style:Ni({spacing:(null==t?void 0:t.spacing)||{}})}}const Rd=[];function Ad(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){return Ko().mostReadable(t,(0,u.map)(e,"color")).toHexString()}(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=Yo(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return(0,u.reduce)(n,((n,r,l)=>{const i=qo(t,e[l],e[`custom${(0,u.upperFirst)(l)}`]),s=o[l];return(null==s?void 0:s.color)===i.color&&s?n[l]=s:n[l]={...i,class:Xo(r,i.slug)},n}),{})}render(){return(0,s.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Md(e){return(...t)=>{const n=(e=>(0,d.createHigherOrderComponent)((t=>n=>(0,s.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"))(e);return(0,d.createHigherOrderComponent)(Ad(t,n),"withCustomColors")}}function Dd(...e){const t=(0,d.createHigherOrderComponent)((e=>t=>{const n=so("color.palette")||Rd;return(0,s.createElement)(e,i({},t,{colors:n}))}),"withEditorColorPalette");return(0,d.createHigherOrderComponent)(Ad(e,t),"withColors")}const Od=[];var Fd=(...e)=>{const t=(0,u.reduce)(e,((e,t)=>(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=so("typography.fontSizes")||Od;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)(t,((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({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!(0,u.some)(t,r))return null;const l=(0,u.reduce)((0,u.pickBy)(t,r),((t,o,r)=>{const l=e[r],i=ql(n,l,e[o]);return t[r]={...i,class:Xl(l)},t}),{});return{...o,...l}}render(){return(0,s.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")},Vd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"})),Hd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"})),zd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const Gd=[{icon:Vd,title:(0,g.__)("Align text left"),align:"left"},{icon:Hd,title:(0,g.__)("Align text center"),align:"center"},{icon:zd,title:(0,g.__)("Align text right"),align:"right"}],Ud={position:"bottom right",isAlternate:!0};var Wd=function({value:e,onChange:t,alignmentControls:n=Gd,label:o=(0,g.__)("Align"),describedBy:r=(0,g.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:a}){function c(n){return()=>t(e===n?void 0:n)}const d=(0,u.find)(n,(t=>t.align===e)),p=a?m.ToolbarGroup:m.ToolbarDropdownMenu,f=a?{isCollapsed:l}:{};return(0,s.createElement)(p,i({icon:d?d.icon:(0,g.isRTL)()?zd:Vd,label:o,toggleProps:{describedBy:r},popoverProps:Ud,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:l?"menuitemradio":void 0,onClick:c(n)}}))},f))};function jd(e){return(0,s.createElement)(Wd,i({},e,{isToolbar:!1}))}function $d(e){return(0,s.createElement)(Wd,i({},e,{isToolbar:!0}))}var Kd={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(Vn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=Ha(t,u.noop),i=(0,s.useMemo)((()=>(e.trim()?fc(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)(Fs,{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 qd=[];function Yd({completers:e=qd}){const{name:t}=Un();return(0,s.useMemo)((()=>{let n=e;return t===(0,r.getDefaultBlockName)()&&(n=n.concat([Kd])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map(u.clone)),n=(0,l.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}var Xd=function(e){return(0,s.createElement)(m.Autocomplete,i({},e,{completers:Yd(e)}))},Qd=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),Zd=function({isActive:e,label:t=(0,g.__)("Toggle full height"),onToggle:n,isDisabled:o}){return(0,s.createElement)(m.ToolbarButton,{isActive:e,icon:Qd,label:t,onClick:()=>n(!e),disabled:o})},Jd=function(e){const{label:t=(0,g.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,s.createElement)(m.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",a=`${i}__popover`;return(0,s.createElement)(m.Dropdown,{position:"bottom right",className:i,popoverProps:{className:a,isAlternate:!0},renderToggle:({onToggle:e,isOpen:n})=>(0,s.createElement)(m.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==xl.DOWN||(t.preventDefault(),e())},label:t,icon:l,showTooltip:!0,disabled:r}),renderContent:()=>(0,s.createElement)(m.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})},em=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})),tm=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,p.useDispatch)(Vn),{clientId:o,parents:r,hasSelection:l}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(Vn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),i=e||(0,g.__)("Document");return(0,s.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,g.__)("Block breadcrumb")},(0,s.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,s.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:n},i),!l&&i,!!o&&(0,s.createElement)(bo,{icon:em,className:"block-editor-block-breadcrumb__separator"})),r.map((e=>(0,s.createElement)("li",{key:e},(0,s.createElement)(m.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>t(e)},(0,s.createElement)(zc,{clientId:e})),(0,s.createElement)(bo,{icon:em,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,s.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,s.createElement)(zc,{clientId:o})))};function nm({clientId:e,tagName:t="div",wrapperProps:n,className:o}){const[r,l]=(0,s.useState)(!0),[a,u]=(0,s.useState)(!1),{isParentSelected:d,hasChildSelected:m,isDraggingBlocks:f,isParentHighlighted:g}=(0,p.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=t(Vn);return{isParentSelected:n(e),hasChildSelected:o(e,!0),isDraggingBlocks:r(),isParentHighlighted:l(e)}}),[e]),h=c()("block-editor-block-content-overlay",null==n?void 0:n.className,o,{"overlay-active":r,"parent-highlighted":g,"is-dragging-blocks":f});return(0,s.useEffect)((()=>{d||m||r||l(!0),d&&!a&&r&&l(!1),m&&r&&l(!1)}),[d,m,r,a]),(0,s.createElement)(t,i({},n,{className:h,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onMouseUp:r?()=>l(!1):void 0}),null==n?void 0:n.children)}const om=()=>(0,s.createElement)(m.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,s.createElement)(m.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"})),rm=({style:e,className:t})=>(0,s.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,s.createElement)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e},(0,s.createElement)(om,null))),lm=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(m.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,g.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==xl.DOWN||(e.preventDefault(),n())},icon:(0,s.createElement)(t,null,(0,s.createElement)(e,null,(0,s.createElement)(rm,null)))}));var im=({children:e,...t})=>(0,s.createElement)(m.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:lm(t),renderContent:()=>e}),sm=(0,s.createElement)(F.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(F.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const am=(0,rs.q)(m.__experimentalTreeGridRow);function cm({isSelected:e,position:t,level:n,rowCount:o,children:r,className:l,path:a,...u}){const d=ss({isSelected:e,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:a.join("_")});return(0,s.createElement)(am,i({ref:d,className:c()("block-editor-list-view-leaf",l),level:n,positionInSet:t,setSize:o},u),r)}const um=(0,s.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),dm=()=>(0,s.useContext)(um),mm=(e,t,n)=>(0,g.sprintf)(
57
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
58
+ (0,g.__)("Block %1$d of %2$d, Level %3$d"),e,t,n),pm=(e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e;function fm({onClick:e}){return(0,s.createElement)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true"},(0,s.createElement)(bo,{icon:em}))}var gm=(0,s.forwardRef)((function e({className:t,block:{clientId:n},isSelected:o,onClick:r,onToggleExpanded:l,position:i,siblingBlockCount:a,level:u,tabIndex:p,onFocus:f,onDragStart:h,onDragEnd:b,draggable:v},k){const _=Hc(n),y=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,E=mm(i,a,u);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.Button,{className:c()("block-editor-list-view-block-select-button",t),onClick:r,"aria-describedby":y,ref:k,tabIndex:p,onFocus:f,onDragStart:h,onDragEnd:b,draggable:v},(0,s.createElement)(fm,{onClick:l}),(0,s.createElement)(Fs,{icon:null==_?void 0:_.icon,showColors:!0}),(0,s.createElement)(zc,{clientId:n}),(null==_?void 0:_.anchor)&&(0,s.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},_.anchor),o&&(0,s.createElement)(m.VisuallyHidden,null,(0,g.__)("(selected block)"))),(0,s.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:y},E))}));const hm=e=>`ListViewBlock-${e}`;var bm=(0,s.forwardRef)((function e(t,n){const{clientId:o}=t.block,{name:l}=(0,p.useSelect)((e=>e(Vn).getBlockName(o)),[o]),a=(0,d.useInstanceId)(e);return(0,s.createElement)(m.Slot,{name:hm(o)},(e=>{if(!e.length)return(0,s.createElement)(gm,i({ref:n},t));const{className:o,isSelected:u,position:d,siblingBlockCount:p,level:f,tabIndex:h,onFocus:b,onToggleExpanded:v}=t,k=(0,r.getBlockType)(l),_=`list-view-block-slot__${a}`,y=mm(d,p,f),E={tabIndex:h,onFocus:b,ref:n,"aria-describedby":_};return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:c()("block-editor-list-view-block-slot",o)},(0,s.createElement)(fm,{onClick:v}),(0,s.createElement)(Fs,{icon:k.icon,showColors:!0}),s.Children.map(e,(e=>(0,s.cloneElement)(e,{...e.props,...E}))),u&&(0,s.createElement)(m.VisuallyHidden,null,(0,g.__)("(selected block)")),(0,s.createElement)("div",{className:"block-editor-list-view-block-slot__description",id:_},y)))}))}));const vm=e=>{const{clientId:t}=(0,s.useContext)(xs);return(0,s.createElement)(m.Fill,i({},e,{name:hm(t)}))};var km=(0,s.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:l,level:a,...u},d)=>{const{__experimentalFeatures:m}=dm(),{clientId:f}=n,{blockMovingClientId:g,selectedBlockInBlockEditor:h}=(0,p.useSelect)((e=>{const{getBlockRootClientId:t,hasBlockMovingClientId:n,getSelectedBlockClientId:o}=e(Vn);return{rootClientId:t(f)||"",blockMovingClientId:n(),selectedBlockInBlockEditor:o()}}),[f]),b=g&&h===f,v=c()("block-editor-list-view-block-contents",{"is-dropping-before":b});return(0,s.createElement)(Gc,{clientIds:[n.clientId]},(({draggable:c,onDragStart:p,onDragEnd:f})=>m?(0,s.createElement)(bm,i({ref:d,className:v,block:n,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:l,level:a,draggable:c&&m,onDragStart:p,onDragEnd:f},u)):(0,s.createElement)(gm,i({ref:d,className:v,block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:l,level:a,draggable:c,onDragStart:p,onDragEnd:f},u))))}));function _m({block:e,isSelected:t,isBranchSelected:n,isLastOfSelectedBranch:o,onClick:r,onToggleExpanded:l,position:i,level:a,rowCount:u,siblingBlockCount:d,showBlockMovers:f,path:h,isExpanded:b}){const v=(0,s.useRef)(null),[k,_]=(0,s.useState)(!1),{clientId:y}=e,{isDragging:E,blockParents:C}=(0,p.useSelect)((e=>{const{isBlockBeingDragged:t,isAncestorBeingDragged:n,getBlockParents:o}=e(Vn);return{isDragging:t(y)||n(y),blockParents:o(y)}}),[y]),{selectBlock:S,toggleBlockHighlight:w}=(0,p.useDispatch)(Vn),B=f&&d>0,I=c()("block-editor-list-view-block__mover-cell",{"is-visible":k}),{__experimentalFeatures:x,__experimentalPersistentListViewFeatures:T,isTreeGridMounted:N}=dm(),L=c()("block-editor-list-view-block__menu-cell",{"is-visible":k});(0,s.useEffect)((()=>{T&&!N&&t&&v.current.focus()}),[]),(0,s.useEffect)((()=>{x&&t&&v.current.focus()}),[x,t]);const P=T?w:()=>{},R=()=>{_(!0),P(y,!0)},A=()=>{_(!1),P(y,!1)},M=c()({"is-selected":t,"is-branch-selected":T&&n,"is-last-of-selected-branch":T&&o,"is-dragging":E});return(0,s.createElement)(cm,{className:M,onMouseEnter:R,onMouseLeave:A,onFocus:R,onBlur:A,level:a,position:i,rowCount:u,path:h,id:`list-view-block-${y}`,"data-block":y,isExpanded:b},(0,s.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:B?void 0:2,ref:v},(({ref:n,tabIndex:o,onFocus:c})=>(0,s.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,s.createElement)(km,{block:e,onClick:r,onToggleExpanded:l,isSelected:t,position:i,siblingBlockCount:d,level:a,ref:n,tabIndex:o,onFocus:c})))),B&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__experimentalTreeGridCell,{className:I,withoutGridItem:!0},(0,s.createElement)(m.__experimentalTreeGridItem,null,(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)(Jc,{orientation:"vertical",clientIds:[y],ref:e,tabIndex:t,onFocus:n}))),(0,s.createElement)(m.__experimentalTreeGridItem,null,(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)(eu,{orientation:"vertical",clientIds:[y],ref:e,tabIndex:t,onFocus:n}))))),x&&(0,s.createElement)(m.__experimentalTreeGridCell,{className:L},(({ref:e,tabIndex:t,onFocus:n})=>(0,s.createElement)(Hu,{clientIds:[y],icon:Eu,toggleProps:{ref:e,tabIndex:t,onFocus:n},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(({onClose:e})=>(0,s.createElement)(m.MenuGroup,null,(0,s.createElement)(m.MenuItem,{onClick:async()=>{if(C.length)for(const e of C)await S(e);else await S(null);await S(y),e()}},(0,g.__)("Go to block"))))))))}function ym({parentBlockClientId:e,position:t,level:n,rowCount:o,path:r}){const l=(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isAncestorBeingDragged:o}=t(Vn);return n(e)||o(e)}),[e]),i=`list-view-appender-row__description_${(0,d.useInstanceId)(ym)}`,a=(0,g.sprintf)(
59
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
60
+ (0,g.__)("Add block at position %1$d, Level %2$d"),t,n);return(0,s.createElement)(cm,{className:c()({"is-dragging":l}),level:n,position:t,rowCount:o,path:r},(0,s.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-list-view-appender__cell",colSpan:"3"},(({ref:t,tabIndex:n,onFocus:o})=>(0,s.createElement)("div",{className:"block-editor-list-view-appender__container"},(0,s.createElement)(Ic,{rootClientId:e,__experimentalIsQuick:!0,"aria-describedby":i,toggleProps:{ref:t,tabIndex:n,onFocus:o}}),(0,s.createElement)("div",{className:"block-editor-list-view-appender__description",id:i},a)))))}function Em(e){const{blocks:t,selectBlock:n,selectedBlockClientIds:o,showAppender:r,showBlockMovers:l,showNestedBlocks:i,parentBlockClientId:a,level:c=1,terminatedLevels:d=[],path:m=[],isBranchSelected:p=!1,isLastOfBranch:f=!1}=e,g=!a,h=(0,u.compact)(t),b=e=>r&&!g&&pm(e,o),v=b(a),k=h.length,_=v?k+1:k,y=_,{expandedState:E,expand:C,collapse:S}=dm();return(0,s.createElement)(s.Fragment,null,(0,u.map)(h,((e,t)=>{var a;const{clientId:u,innerBlocks:g}=e,h=t+1,v=_===h?[...d,c]:d,y=[...m,h],w=i&&!!g&&!!g.length,B=b(u),I=w||B,x=pm(u,o),T=p||x&&I,N=t===k-1,L=x||f&&N,P=f&&!I&&N,R=I?null===(a=E[u])||void 0===a||a:void 0;return(0,s.createElement)(s.Fragment,{key:u},(0,s.createElement)(_m,{block:e,onClick:e=>{e.stopPropagation(),n(u)},onToggleExpanded:e=>{e.stopPropagation(),!0===R?S(u):!1===R&&C(u)},isSelected:x,isBranchSelected:T,isLastOfSelectedBranch:P,level:c,position:h,rowCount:_,siblingBlockCount:k,showBlockMovers:l,terminatedLevels:d,path:y,isExpanded:R}),I&&R&&(0,s.createElement)(Em,{blocks:g,selectedBlockClientIds:o,selectBlock:n,isBranchSelected:T,isLastOfBranch:L,showAppender:r,showBlockMovers:l,showNestedBlocks:i,parentBlockClientId:u,level:c+1,terminatedLevels:v,path:y}))})),v&&(0,s.createElement)(ym,{parentBlockClientId:a,position:_,rowCount:y,level:c,terminatedLevels:d,path:[...m,y]}))}function Cm({listViewRef:e,blockDropTarget:t}){const{rootClientId:n,clientId:o,dropPosition:r}=t||{},[l,i]=(0,s.useMemo)((()=>e.current?[n?e.current.querySelector(`[data-block="${n}"]`):void 0,o?e.current.querySelector(`[data-block="${o}"]`):void 0]:[]),[n,o]),a=i||l,c=(0,s.useCallback)((()=>{if(!l)return 0;const e=a.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,a]),u=(0,s.useMemo)((()=>{if(!a)return{};const e=c();return{width:a.offsetWidth-e}}),[c,a]),d=(0,s.useCallback)((()=>{if(!a)return{};const e=a.ownerDocument,t=a.getBoundingClientRect(),n=c(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===r?{...o,top:t.top,bottom:t.top}:"bottom"===r||"inside"===r?{...o,top:t.bottom,bottom:t.bottom}:{}}),[a,r,c]);return a?(0,s.createElement)(m.Popover,{noArrow:!0,animate:!1,getAnchorRect:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,s.createElement)("div",{style:u,className:"block-editor-list-view-drop-indicator__line"})):null}function Sm(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}Em.defaultProps={selectBlock:()=>{}};const wm=["top","bottom"];const Bm=()=>{},Im=(e,t)=>{switch(t.type){case"expand":return{...e,[t.clientId]:!0};case"collapse":return{...e,[t.clientId]:!1};default:return e}};var xm=(0,s.forwardRef)((function({blocks:e,showOnlyCurrentHierarchy:t,onSelect:n=Bm,__experimentalFeatures:o,__experimentalPersistentListViewFeatures:r,...l},a){const{clientIdsTree:c,selectedClientIds:u}=function(e,t,n){const o=(e=>(0,p.useSelect)((t=>{const{getSelectedBlockClientId:n,getSelectedBlockClientIds:o}=t(Vn);return e?o():n()}),[e]))(n);return{clientIdsTree:((e,t,n)=>(0,p.useSelect)((o=>{const{getBlockHierarchyRootClientId:r,__unstableGetClientIdsTree:l,__unstableGetClientIdWithClientIdsTree:i}=o(Vn);if(e)return e;const s=t&&!Array.isArray(t);if(!n||!s)return l();const a=i(r(t));return a&&(!pm(a.clientId,t)||a.innerBlocks&&0!==a.innerBlocks.length)?[a]:l()}),[e,t,n]))(e,o,t),selectedClientIds:o}}(e,t,r),{selectBlock:f}=(0,p.useDispatch)(Vn),h=(0,s.useCallback)((e=>{f(e),n(e)}),[f,n]),[b,v]=(0,s.useReducer)(Im,{}),{ref:k,target:_}=function(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,p.useSelect)(Vn),[l,i]=(0,s.useState)(),{rootClientId:a,blockIndex:c}=l||{},u=td(a,c),m=o(),f=(0,d.useThrottle)((0,s.useCallback)(((o,l)=>{const s={x:o.clientX,y:o.clientY},a=!(null==m||!m.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]=nd(t,s,wm),u=Sm(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&&m.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!a||r(m,i),canInsertDraggedBlocksAsChild:!a||r(m,l)}})),s);c&&i(c)}),[m]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}(),y=(0,s.useRef)(),E=(0,d.useMergeRefs)([y,k,a]),C=(0,s.useRef)(!1);(0,s.useEffect)((()=>{C.current=!0}),[]);const S=e=>{e&&v({type:"expand",clientId:e})},w=e=>{e&&v({type:"collapse",clientId:e})},B=(0,s.useMemo)((()=>({__experimentalFeatures:o,__experimentalPersistentListViewFeatures:r,isTreeGridMounted:C.current,expandedState:b,expand:S,collapse:w})),[o,r,C.current,b,S,w]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Cm,{listViewRef:y,blockDropTarget:_}),(0,s.createElement)(m.__experimentalTreeGrid,{className:"block-editor-list-view-tree","aria-label":(0,g.__)("Block navigation structure"),ref:E,onCollapseRow:e=>{var t;w(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)},onExpandRow:e=>{var t;S(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}},(0,s.createElement)(um.Provider,{value:B},(0,s.createElement)(Em,i({blocks:c,selectBlock:h,selectedBlockClientIds:u},l)))))}));function Tm({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,s.createElement)(m.Button,i({},r,{ref:o,icon:sm,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0
61
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e}))}var Nm=(0,s.forwardRef)((function({isDisabled:e,__experimentalFeatures:t,...n},o){const r=(0,p.useSelect)((e=>!!e(Vn).getBlockCount()),[])&&!e;return(0,s.createElement)(m.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(Tm,i({},n,{innerRef:o,isOpen:e,onToggle:t,isEnabled:r})),renderContent:()=>(0,s.createElement)("div",{className:"block-editor-block-navigation__container"},(0,s.createElement)("p",{className:"block-editor-block-navigation__label"},(0,g.__)("List view")),(0,s.createElement)(xm,{showNestedBlocks:!0,showOnlyCurrentHierarchy:!0,__experimentalFeatures:t}))})})),Lm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),Pm=function({icon:e=Lm,label:t=(0,g.__)("Choose variation"),instructions:n=(0,g.__)("Select a variation to start with."),variations:o,onSelect:r,allowSkip:l}){const i=c()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,s.createElement)(m.Placeholder,{icon:e,label:t,instructions:n,className:i},(0,s.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,g.__)("Block variations")},o.map((e=>(0,s.createElement)("li",{key:e.name},(0,s.createElement)(m.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>r(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))))),l&&(0,s.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,s.createElement)(m.Button,{variant:"link",onClick:()=>r()},(0,g.__)("Skip"))))},Rm=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 Am="carousel",Mm="grid",Dm=({onStartBlank:e,onBlockPatternSelect:t})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,s.createElement)(m.Button,{onClick:e},(0,g.__)("Start blank")),(0,s.createElement)(m.Button,{variant:"primary",onClick:t},(0,g.__)("Choose"))),Om=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,s.createElement)(m.Button,{icon:Kc,label:(0,g.__)("Previous pattern"),onClick:e,disabled:0===n}),(0,s.createElement)(m.Button,{icon:$c,label:(0,g.__)("Next pattern"),onClick:t,disabled:n===o-1}));var Fm=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l,onBlockPatternSelect:i,onStartBlank:a})=>{const c=e===Am,u=(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,s.createElement)(m.Button,{icon:eo,label:(0,g.__)("Carousel view"),onClick:()=>t(Am),isPressed:c}),(0,s.createElement)(m.Button,{icon:Rm,label:(0,g.__)("Grid view"),onClick:()=>t(Mm),isPressed:e===Mm}));return(0,s.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},c&&(0,s.createElement)(Om,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:l}),u,c&&(0,s.createElement)(Dm,{onBlockPatternSelect:i,onStartBlank:a}))};const Vm=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o})=>{const r=(0,m.__unstableUseCompositeState)(),l="block-editor-block-pattern-setup__container";if(e===Am){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,s.createElement)("div",{className:l},(0,s.createElement)("ul",{className:"carousel-container"},n.map(((t,n)=>(0,s.createElement)(zm,{className:e.get(n)||"",key:t.name,pattern:t})))))}return(0,s.createElement)(m.__unstableComposite,i({},r,{role:"listbox",className:l,"aria-label":(0,g.__)("Patterns list")}),n.map((e=>(0,s.createElement)(Hm,{key:e.name,pattern:e,onSelect:o,composite:r}))))};function Hm({pattern:e,onSelect:t,composite:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,title:l,description:a,viewportWidth:c=700}=e,u=(0,d.useInstanceId)(Hm,`${o}__item-description`);return(0,s.createElement)("div",{className:`${o}__list-item`,"aria-label":e.title,"aria-describedby":e.description?u:void 0},(0,s.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},n,{className:`${o}__item`,onClick:()=>t(r)}),(0,s.createElement)(Ia,{blocks:r,viewportWidth:c}),(0,s.createElement)("div",{className:`${o}__item-title`},l)),!!a&&(0,s.createElement)(m.VisuallyHidden,{id:u},a))}function zm({className:e,pattern:t}){const{blocks:n,title:o,description:r}=t,l=(0,d.useInstanceId)(zm,"block-editor-block-pattern-setup-list__item-description");return(0,s.createElement)("li",{className:`pattern-slide ${e}`,"aria-label":o,"aria-describedby":r?l:void 0},(0,s.createElement)(Ia,{blocks:n,__experimentalLive:!0}),!!r&&(0,s.createElement)(m.VisuallyHidden,{id:l},r))}var Gm=({clientId:e,blockName:t,filterPatternsFn:n,startBlankComponent:o,onBlockPatternSelect:l})=>{const[i,a]=(0,s.useState)(Am),[c,u]=(0,s.useState)(0),[d,m]=(0,s.useState)(!1),{replaceBlock:f}=(0,p.useDispatch)(Vn),g=function(e,t,n){return(0,p.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(Vn),s=r(e);return n?i(s).filter(n):l(t,s)}),[e,t,n])}(e,t,n);if(null==g||!g.length||d)return o;const h=l||(t=>{const n=t.map((e=>(0,r.cloneBlock)(e)));f(e,n)});return(0,s.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${i}`},(0,s.createElement)(Fm,{viewMode:i,setViewMode:a,activeSlide:c,totalSlides:g.length,handleNext:()=>{u((e=>e+1))},handlePrevious:()=>{u((e=>e-1))},onBlockPatternSelect:()=>{h(g[c].blocks)},onStartBlank:()=>{m(!0)}}),(0,s.createElement)(Vm,{viewMode:i,activeSlide:c,patterns:g,onBlockPatternSelect:h}))};const Um=(e,t)=>{if(!t||!e)return;const n=t.filter((({attributes:t})=>!(!t||!Object.keys(t).length)&&(0,u.isMatch)(e,t)));return 1===n.length?n[0]:void 0};var Wm=function({blockClientId:e}){const[t,n]=(0,s.useState)(),{updateBlockAttributes:o}=(0,p.useDispatch)(Vn),{variations:l,blockAttributes:i}=(0,p.useSelect)((t=>{const{getBlockVariations:n}=t(r.store),{getBlockName:o,getBlockAttributes:l}=t(Vn),i=e&&o(e);return{variations:i&&n(i,"transform"),blockAttributes:l(e)}}),[e]);if((0,s.useEffect)((()=>{var e;n(null===(e=Um(i,l))||void 0===e?void 0:e.name)}),[i,l]),null==l||!l.length)return null;const a=l.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n}))),c=t=>{o(e,{...l.find((({name:e})=>e===t)).attributes})},u="block-editor-block-variation-transforms";return(0,s.createElement)(m.DropdownMenu,{className:u,label:(0,g.__)("Transform to variation"),text:(0,g.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${u}__popover`},icon:Yc,toggleProps:{iconPosition:"right"}},(()=>(0,s.createElement)("div",{className:`${u}__container`},(0,s.createElement)(m.MenuGroup,null,(0,s.createElement)(m.MenuItemsChoice,{choices:a,value:t,onSelect:c})))))};const jm=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),$m=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Km={top:{icon:(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,g._x)("Align top","Block vertical alignment setting")},center:{icon:$m,title:(0,g._x)("Align middle","Block vertical alignment setting")},bottom:{icon:jm,title:(0,g._x)("Align bottom","Block vertical alignment setting")}},qm=["top","center","bottom"],Ym={isAlternate:!0};var Xm=function({value:e,onChange:t,controls:n=qm,isCollapsed:o=!0,isToolbar:r}){const l=Km[e],a=Km.top,c=r?m.ToolbarGroup:m.ToolbarDropdownMenu,u=r?{isCollapsed:o}:{};return(0,s.createElement)(c,i({popoverProps:Ym,icon:l?l.icon:a.icon,label:(0,g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...Km[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r}))},u))};function Qm(e){return(0,s.createElement)(Xm,i({},e,{isToolbar:!1}))}function Zm(e){return(0,s.createElement)(Xm,i({},e,{isToolbar:!0}))}var Jm=(0,d.createHigherOrderComponent)((e=>t=>{const n=so("color.palette"),o=!so("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"),ep=Jm(m.ColorPalette);function tp({onChange:e,value:t,...n}){return(0,s.createElement)(cr,i({},n,{onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0}))}const np=[25,50,75,100];function op({imageWidth:e,imageHeight:t,imageSizeOptions:n=[],isResizable:o=!0,slug:r,width:l,height:i,onChange:a,onChangeImage:c=u.noop}){const{currentHeight:d,currentWidth:p,updateDimension:f,updateDimensions:h}=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]),{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})}}}(i,l,t,e,a);return(0,s.createElement)(s.Fragment,null,!(0,u.isEmpty)(n)&&(0,s.createElement)(m.SelectControl,{label:(0,g.__)("Image size"),value:r,options:n,onChange:c}),o&&(0,s.createElement)("div",{className:"block-editor-image-size-control"},(0,s.createElement)("p",{className:"block-editor-image-size-control__row"},(0,g.__)("Image dimensions")),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,g.__)("Width"),value:p,min:1,onChange:e=>f("width",e)}),(0,s.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,g.__)("Height"),value:d,min:1,onChange:e=>f("height",e)})),(0,s.createElement)("div",{className:"block-editor-image-size-control__row"},(0,s.createElement)(m.ButtonGroup,{"aria-label":(0,g.__)("Image size presets")},np.map((n=>{const o=Math.round(e*(n/100)),r=Math.round(t*(n/100)),l=p===o&&d===r;return(0,s.createElement)(m.Button,{key:n,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>h(r,o)},n,"%")}))),(0,s.createElement)(m.Button,{isSmall:!0,onClick:()=>h()},(0,g.__)("Reset")))))}var rp=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(F.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"})),lp=({value:e,onChange:t=u.noop,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((t=>(0,s.createElement)(m.ToggleControl,{className:"block-editor-link-control__setting",key:t.id,label:t.title,onChange:o(t),checked:!!e&&!!e[t.id]})));return(0,s.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,s.createElement)(m.VisuallyHidden,{as:"legend"},(0,g.__)("Currently selected link settings")),r)};class ip 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}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Es()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value!==o&&this.shouldShowInitialSuggestions()&&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(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!(e&&e.length);if(!o&&(e.length<2||!n&&(0,Za.isURL)(e)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((e=>{this.suggestionsRequest===r&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,g.sprintf)(
62
  /* translators: %s: number of results. */
63
+ (0,g._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,g.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===r&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=r}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case xl.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case xl.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case xl.ENTER:this.props.onSubmit&&this.props.onSubmit()}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case xl.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case xl.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case xl.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,g.__)("Link selected.")));break;case xl.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l)):this.props.onSubmit&&this.props.onSubmit()}}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({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let l=r;const i=e&&e.length;return o||i||(l=!1),!0===n&&(l=!1),{showSuggestions:l,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}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,g.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:a,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:p,suggestionOptionIdPrefix:f}=this.state,h={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},b={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,g.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":p,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(h,b,a):(0,s.createElement)(m.BaseControl,h,(0,s.createElement)("input",b),a&&(0,s.createElement)(m.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,suggestionsListboxId:d,suggestionOptionIdPrefix:p,loading:f}=this.state,g={id:d,ref:this.autocompleteRef,role:"listbox"},h=(e,t)=>({role:"option",tabIndex:"-1",id:`${p}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===a});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:a,suggestionsListProps:g,buildSuggestionItemProps:h,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,s.createElement)(m.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,s.createElement)("div",i({},g,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,s.createElement)(m.Button,i({},h(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===a}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var sp=(0,d.compose)(d.withSafeTimeout,m.withSpokenMessages,d.withInstanceId,(0,p.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(Vn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(ip),ap=({searchTerm:e,onClick:t,itemProps:n,isSelected:o,buttonText:r})=>{if(!e)return null;let l;return l=r?(0,u.isFunction)(r)?r(e):r:(0,s.createInterpolateElement)((0,g.sprintf)(
64
  /* translators: %s: search term. */
65
+ (0,g.__)("Create: <mark>%s</mark>"),e),{mark:(0,s.createElement)("mark",null)}),(0,s.createElement)(m.Button,i({},n,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:t}),(0,s.createElement)(bo,{className:"block-editor-link-control__search-item-icon",icon:As}),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,s.createElement)("span",{className:"block-editor-link-control__search-item-title"},l)))},cp=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,s.createElement)(F.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),up=({itemProps:e,suggestion:t,isSelected:n=!1,onClick:o,isURL:r=!1,searchTerm:l="",shouldShowType:a=!1})=>(0,s.createElement)(m.Button,i({},e,{onClick:o,className:c()("block-editor-link-control__search-item",{"is-selected":n,"is-url":r,"is-entity":!r})}),r&&(0,s.createElement)(bo,{className:"block-editor-link-control__search-item-icon",icon:cp}),(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)(m.TextHighlight,{text:t.title,highlight:l})),(0,s.createElement)("span",{"aria-hidden":!r,className:"block-editor-link-control__search-item-info"},!r&&((0,Za.filterURLForDisplay)((0,Za.safeDecodeURI)(t.url))||""),r&&(0,g.__)("Press ENTER to add this link"))),a&&t.type&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===t.type?"tag":t.type));const dp="__CREATE__",mp=[{id:"opensInNewTab",title:(0,g.__)("Open in new tab")}];function pp({instanceId:e,withCreateSuggestion:t,currentInputValue:n,handleSuggestionClick:o,suggestionsListProps:r,buildSuggestionItemProps:l,suggestions:a,selectedSuggestion:u,isLoading:d,isInitialSuggestions:p,createSuggestionButtonText:f,suggestionsQuery:h}){const b=c()("block-editor-link-control__search-results",{"is-loading":d}),v=["url","mailto","tel","internal"],k=1===a.length&&v.includes(a[0].type.toLowerCase()),_=t&&!k&&!p,y=!(null!=h&&h.type),E=`block-editor-link-control-search-results-label-${e}`,C=p?(0,g.__)("Recently updated"):(0,g.sprintf)(
66
  /* translators: %s: search term. */
67
+ (0,g.__)('Search results for "%s"'),n),S=(0,s.createElement)(p?s.Fragment:m.VisuallyHidden,{},(0,s.createElement)("span",{className:"block-editor-link-control__search-results-label",id:E},C));return(0,s.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,s.createElement)("div",i({},r,{className:b,"aria-labelledby":E}),a.map(((e,t)=>_&&dp===e.type?(0,s.createElement)(ap,{searchTerm:n,buttonText:f,onClick:()=>o(e),key:e.type,itemProps:l(e,t),isSelected:t===u}):dp===e.type?null:(0,s.createElement)(up,{key:`${e.id}-${e.type}`,itemProps:l(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===u,isURL:v.includes(e.type.toLowerCase()),searchTerm:n,shouldShowType:y})))))}function fp(e){const t=(0,u.startsWith)(e,"#");return(0,Za.isURL)(e)||e&&e.includes("www.")||t}const gp=()=>Promise.resolve([]),hp=e=>{let t="URL";const n=(0,Za.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,Za.prependHTTP)(e):e,type:t}])};const bp=()=>Promise.resolve([]),vp=(0,s.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:l=!1,onCreateSuggestion:i=u.noop,onChange:a=u.noop,onSelect:c=u.noop,showSuggestions:m=!0,renderSuggestions:f=(e=>(0,s.createElement)(pp,e)),fetchSuggestions:h=null,allowDirectEntry:b=!0,showInitialSuggestions:v=!1,suggestionsQuery:k={},withURLSuggestion:_=!0,createSuggestionButtonText:y},E)=>{const C=function(e,t,n,o){const{fetchSearchSuggestions:r}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn);return{fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?hp:gp;return(0,s.useCallback)(((t,{isInitialSuggestions:i})=>fp(t)?l(t,{isInitialSuggestions:i}):(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||fp(e)||!r?s:s.concat({title:e,url:e,type:dp})})(t,{...e,isInitialSuggestions:i},r,l,n,o)),[l,r,n])}(k,b,l,_),S=m?h||C:bp,w=(0,d.useInstanceId)(vp),[B,I]=(0,s.useState)(),x=async e=>{let t=e;if(dp!==e.type)(b||t&&Object.keys(t).length>=1)&&c({...(0,u.omit)(n,"id","url"),...t},t);else try{var o;t=await i(e.title),null!==(o=t)&&void 0!==o&&o.url&&c(t)}catch(e){}};return(0,s.createElement)("div",null,(0,s.createElement)(sp,{className:o,value:e,onChange:(e,t)=>{a(e),I(t)},placeholder:null!=r?r:(0,g.__)("Search or type url"),__experimentalRenderSuggestions:m?t=>f({...t,instanceId:w,withCreateSuggestion:l,currentInputValue:e,createSuggestionButtonText:y,suggestionsQuery:k,handleSuggestionClick:e=>{t.handleSuggestionClick&&t.handleSuggestionClick(e),x(e)}}):null,__experimentalFetchLinkSuggestions:S,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:v,onSubmit:t=>{x(t||B||{url:e})},ref:E}),t)}));var kp=vp;const{Slot:_p,Fill:yp}=(0,m.createSlotFill)("BlockEditorLinkControlViewer");function Ep(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 Cp({value:e,onEditClick:t,hasRichPreviews:n=!1}){const o=n?null==e?void 0:e.url:null,{richData:r,isFetching:l}=function(e){const[t,n]=(0,s.useReducer)(Ep,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn);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}(o),i=r&&Object.keys(r).length,a=e&&(0,Za.filterURLForDisplay)((0,Za.safeDecodeURI)(e.url),16)||"";return(0,s.createElement)("div",{"aria-label":(0,g.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":i,"is-fetching":!!l,"is-preview":!0})},(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==r?void 0:r.icon})},null!=r&&r.icon?(0,s.createElement)("img",{src:null==r?void 0:r.icon,alt:""}):(0,s.createElement)(bo,{icon:cp})),(0,s.createElement)("span",{className:"block-editor-link-control__search-item-details"},(0,s.createElement)(m.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url},(null==r?void 0:r.title)||(null==e?void 0:e.title)||a),(null==e?void 0:e.url)&&(0,s.createElement)("span",{className:"block-editor-link-control__search-item-info"},a))),(0,s.createElement)(m.Button,{variant:"secondary",onClick:()=>t(),className:"block-editor-link-control__search-item-action"},(0,g.__)("Edit")),(0,s.createElement)(_p,{fillProps:e})),(i&&((null==r?void 0:r.image)||(null==r?void 0:r.description))||l)&&(0,s.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==r?void 0:r.image)||l)&&(0,s.createElement)("div",{"aria-hidden":!(null!=r&&r.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=r&&r.image)})},(null==r?void 0:r.image)&&(0,s.createElement)("img",{src:null==r?void 0:r.image,alt:""})),((null==r?void 0:r.description)||l)&&(0,s.createElement)("div",{"aria-hidden":!(null!=r&&r.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=r&&r.description)})},(null==r?void 0:r.description)&&(0,s.createElement)(m.__experimentalText,{truncate:!0,numberOfLines:"2"},r.description))))}function Sp({searchInputPlaceholder:e,value:t,settings:n=mp,onChange:o=u.noop,onRemove:r,noDirectEntry:l=!1,showSuggestions:i=!0,showInitialSuggestions:a,forceIsEditingLink:c,createSuggestion:d,withCreateSuggestion:p,inputValue:f="",suggestionsQuery:h={},noURLSuggestion:b=!1,createSuggestionButtonText:v,hasRichPreviews:k=!1}){void 0===p&&d&&(p=!0);const _=(0,s.useRef)(!0),y=(0,s.useRef)(),[E,C]=(0,s.useState)(t&&t.url||""),S=f||E,[w,B]=(0,s.useState)(void 0!==c?c:!t||!t.url),I=(0,s.useRef)(!1);function x(){var e;I.current=!(null===(e=y.current)||void 0===e||!e.contains(y.current.ownerDocument.activeElement)),B(!1)}(0,s.useEffect)((()=>{void 0!==c&&c!==w&&B(c)}),[c]),(0,s.useEffect)((()=>{_.current?_.current=!1:((Fi.focus.focusable.find(y.current)[0]||y.current).focus(),I.current=!1)}),[w]);const{createPage:T,isCreatingPage:N,errorMessage:L}=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,g.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(d),P=()=>{S!==(null==t?void 0:t.url)&&o({url:S}),x()},R=r&&t&&!w&&!N,A=!(null==n||!n.length);return(0,s.createElement)("div",{tabIndex:-1,ref:y,className:"block-editor-link-control"},N&&(0,s.createElement)("div",{className:"block-editor-link-control__loading"},(0,s.createElement)(m.Spinner,null)," ",(0,g.__)("Creating"),"…"),(w||!t)&&!N&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},(0,s.createElement)(kp,{currentLink:t,className:"block-editor-link-control__search-input",placeholder:e,value:S,withCreateSuggestion:p,onCreateSuggestion:T,onChange:C,onSelect:e=>{o(e),x()},showInitialSuggestions:a,allowDirectEntry:!l,showSuggestions:i,suggestionsQuery:h,withURLSuggestion:!b,createSuggestionButtonText:v},(0,s.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,s.createElement)(m.Button,{onClick:()=>P(),onKeyDown:e=>{const{keyCode:t}=e;t===xl.ENTER&&(e.preventDefault(),P())},label:(0,g.__)("Submit"),icon:rp,className:"block-editor-link-control__search-submit"})))),L&&(0,s.createElement)(m.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},L)),t&&!w&&!N&&(0,s.createElement)(Cp,{key:null==t?void 0:t.url,value:t,onEditClick:()=>B(!0),hasRichPreviews:k}),(A||R)&&(0,s.createElement)("div",{className:"block-editor-link-control__tools"},(0,s.createElement)(lp,{value:t,settings:n,onChange:o}),R&&(0,s.createElement)(m.Button,{className:"block-editor-link-control__unlink",isDestructive:!0,variant:"link",onClick:r},(0,g.__)("Unlink"))))}Sp.ViewerFill=yp;var wp=Sp;const Bp={position:"bottom right",isAlternate:!0};var Ip=()=>(0,s.createElement)(s.Fragment,null,["bold","italic","link","text-color"].map((e=>(0,s.createElement)(m.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,s.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(e=>0!==e.length&&(0,s.createElement)(m.ToolbarItem,null,(t=>(0,s.createElement)(m.DropdownMenu,{icon:Yc
68
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("More"),toggleProps:t,controls:(0,u.orderBy)(e.map((([{props:e}])=>e)),"title"),popoverProps:Bp})))))),xp=({inline:e,anchorRef:t})=>e?(0,s.createElement)(m.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:t,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)(m.ToolbarGroup,null,(0,s.createElement)(Ip,null)))):(0,s.createElement)(Yn,{group:"inline"},(0,s.createElement)(Ip,null));function Tp(){const{didAutomaticChange:e,getSettings:t}=(0,p.useSelect)(Vn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==xl.DELETE&&o!==xl.BACKSPACE&&o!==xl.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function Np(e){return e.filter((({type:e})=>/^image\/(?:jpe?g|png|gif)$/.test(e))).map((e=>`<img src="${(0,Cu.createBlobURL)(e)}">`)).join("")}var Lp=window.wp.shortcode;function Pp(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function Rp(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Ap({allowedFormats:e,formattingControls:t,disableFormats:n}){return n?Ap.EMPTY_ARRAY:e||t?e||(Nt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),t.map((e=>`core/${e}`))):void 0}function Mp({value:e,pastedBlocks:t=[],onReplace:n,onSplit:o,onSplitMiddle:r,multilineTag:l}){if(!n||!o)return;const i=[],[s,a]=(0,xt.split)(e),c=t.length>0;let u=-1;const d=(0,xt.isEmpty)(s)&&!(0,xt.isEmpty)(a);c&&(0,xt.isEmpty)(s)||(i.push(o((0,xt.toHTMLString)({value:s,multilineTag:l}),!d)),u+=1),c?(i.push(...t),u+=t.length):r&&i.push(r()),(c||r)&&(0,xt.isEmpty)(a)||i.push(o((0,xt.toHTMLString)({value:a,multilineTag:l}),d)),n(i,c?u:1,c?-1:0)}function Dp(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:m,multilineTag:p,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return void e.preventDefault();const{clipboardData:h}=e;let b="",v="";try{b=h.getData("text/plain"),v=h.getData("text/html")}catch(e){try{v=h.getData("Text")}catch(e){return}}if(v=function(e){return e.replace(/.*<!--StartFragment-->/s,"").replace(/<!--EndFragment-->.*/s,"")}(v),e.preventDefault(),window.console.log("Received HTML:\n\n",v),window.console.log("Received plain text:\n\n",b),o)return void l((0,xt.insert)(i,b));const k=s.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:v,plainText:b})),e)),i);if(k!==i)return void l(k);const _=[...(0,Fi.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=(0,xt.create)({html:v,multilineTag:p,multilineWrapperTags:"li"===p?["ul","ol"]:void 0,preserveWhiteSpace:f});return Pp(e,i.activeFormats),void l((0,xt.insert)(i,e))}if(g)return void l((0,xt.insert)(i,(0,xt.create)({text:b})));if(_&&_.length&&!v){const e=(0,r.pasteHandler)({HTML:Np(_),mode:"BLOCKS",tagName:a,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(c&&(0,xt.isEmpty)(i)?c(e):Mp({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:p}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,xt.isEmpty)(i)&&(E=b,(0,Lp.regexp)(".*").test(E))&&(y="BLOCKS"),m&&(0,xt.isEmpty)(i)&&(0,Za.isURL)(b.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:v,plainText:b,mode:y,tagName:a,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,xt.create)({html:C});Pp(e,i.activeFormats),p&&(e=(0,xt.replace)(e,/\n+/g,xt.__UNSTABLE_LINE_SEPARATOR)),l((0,xt.insert)(i,e))}else C.length>0&&(c&&(0,xt.isEmpty)(i)?c(C,C.length-1,-1):Mp({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:p}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function Op(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,p.useDispatch)(Vn),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((({type:e})=>"prefix"===e)),c=(0,r.findTransform)(a,(({prefix:e})=>s===e));if(!c)return;const u=(0,xt.toHTMLString)({value:(0,xt.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,{__unstableInputRule:t})=>(t&&(e=t(e)),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 Fp(e){const{__unstableMarkAutomaticChange:t}=(0,p.useDispatch)(Vn),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:m}=n.current;if(e.keyCode!==xl.ENTER)return;e.preventDefault();const p={...l};p.formats=o(l);const f=i&&s;if(i){const e=(0,r.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),n=(0,r.findTransform)(e,(e=>e.regExp.test(p.text)));n&&(i([n.transform({content:p.text})]),t())}if(c)e.shiftKey?d||u((0,xt.insert)(p,"\n")):f&&(0,xt.__unstableIsEmptyLine)(p)?Mp({value:p,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c}):u((0,xt.__unstableInsertLineSeparator)(p));else{const{text:t,start:n,end:o}=p,r=m&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,xt.insert)(p,"\n")):!f&&r?m():f&&Mp({value:p,onReplace:i,onSplit:s,onSplitMiddle:a,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function Vp(e){return e(xt.store).getFormatTypes()}Ap.EMPTY_ARRAY=[];const Hp=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function zp(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 Gp(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 Up({formatTypes:e,onChange:t,onFocus:n,value:o,forwardedRef:r}){return e.map((e=>{const{name:l,edit:i}=e;if(!i)return null;const a=(0,xt.getActiveFormat)(o,l),c=void 0!==a,u=(0,xt.getActiveObject)(o),d=void 0!==u&&u.type===l;return(0,s.createElement)(i,{key:l,isActive:c,activeAttributes:c&&a.attributes||{},isObjectActive:d,activeObjectAttributes:d&&u.attributes||{},value:o,onChange:t,onFocus:n,contentRef:r})}))}const Wp=(0,s.createContext)(),jp=(0,s.createContext)(),$p=(0,s.forwardRef)((function e({children:t,tagName:n="div",value:o="",onChange:l,isSelected:a,multiline:f,inlineToolbar:g,wrapperClassName:h,autocompleters:b,onReplace:v,placeholder:k,allowedFormats:_,formattingControls:y,withoutInteractiveFormatting:E,onRemove:C,onMerge:S,onSplit:w,__unstableOnSplitAtEnd:B,__unstableOnSplitMiddle:I,identifier:x,preserveWhiteSpace:T,__unstablePastePlainText:N,__unstableEmbedURLOnPaste:L,__unstableDisableFormats:P,disableLineBreaks:R,unstableOnFocus:A,__unstableAllowPrefixTransformations:M,...D},O){const F=(0,d.useInstanceId)(e);x=x||F,D=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(D);const V=(0,s.useRef)(),{clientId:H}=Un(),{selectionStart:z,selectionEnd:G,isSelected:U,disabled:W}=(0,p.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n,isMultiSelecting:o,hasMultiSelection:r}=e(Vn),l=t(),i=n();let s;return void 0===a?s=l.clientId===H&&l.attributeKey===x:a&&(s=l.clientId===H),{selectionStart:s?l.offset:void 0,selectionEnd:s?i.offset:void 0,isSelected:s,disabled:o()||r()}})),{selectionChange:j}=(0,p.useDispatch)(Vn),$=Rp(f),K=Ap({allowedFormats:_,formattingControls:y,disableFormats:P}),q=!K||K.length>0;let Y=o,X=l;Array.isArray(o)&&(Y=r.children.toHTML(o),X=e=>l(r.children.fromDOM((0,xt.__unstableCreateElement)(document,e).childNodes)));const Q=(0,s.useCallback)(((e,t)=>{j(H,x,e,t)}),[H,x]),{formatTypes:Z,prepareHandlers:J,valueHandlers:ee,changeHandlers:te,dependencies:ne}=function({clientId:e,identifier:t,withoutInteractiveFormatting:n,allowedFormats:o}){const r=(0,p.useSelect)(Vp,[]),l=(0,s.useMemo)((()=>r.filter((({name:e,tagName:t})=>!(o&&!o.includes(e)||n&&Hp.has(t))))),[r,o,Hp]),i=(0,p.useSelect)((n=>l.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e})),o)),{})),[l,e,t]),a=(0,p.useDispatch)(),c=[],u=[],d=[],m=[];return l.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=i[n.name],r=n.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(r):c.push(r);for(const e in o)m.push(o[e])}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e})),d.push(n.__experimentalCreateOnChangeEditableValue({...i[n.name]||{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:l,prepareHandlers:c,valueHandlers:u,changeHandlers:d,dependencies:m}}({clientId:H,identifier:x,withoutInteractiveFormatting:E,allowedFormats:K});function oe(e){return Z.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,xt.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:re,onChange:le,ref:ie}=(0,xt.__unstableUseRichText)({value:Y,onChange(e,{__unstableFormats:t,__unstableText:n}){X(e),Object.values(te).forEach((e=>{e(t,n)}))},selectionStart:z,selectionEnd:G,onSelectionChange:Q,placeholder:k,__unstableIsSelected:U,__unstableMultilineTag:$,__unstableDisableFormats:P,preserveWhiteSpace:T,__unstableDependencies:[...ne,n],__unstableAfterParse:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:oe,__unstableAddInvisibleFormats:function(e){return J.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,m.__unstableUseAutocompleteProps)({...e,completers:Yd(e)})}({onReplace:v,completers:b,record:re,onChange:le});!function({value:e}){const t=e.activeFormats&&!!e.activeFormats.length,{isCaretWithinFormattedText:n}=(0,p.useSelect)(Vn),{enterFormattedText:o,exitFormattedText:r}=(0,p.useDispatch)(Vn);(0,s.useEffect)((()=>{t?n()||o():n()&&r()}),[t])}({value:re}),function({html:e,value:t}){const n=(0,s.useRef)(),o=t.activeFormats&&!!t.activeFormats.length,{__unstableMarkLastChangeAsPersistent:r}=(0,p.useDispatch)(Vn);(0,s.useLayoutEffect)((()=>{if(n.current){if(n.current!==t.text){const e=window.setTimeout((()=>{r()}),1e3);return n.current=t.text,()=>{window.clearTimeout(e)}}r()}else n.current=t.text}),[e,o])}({html:Y,value:re});const ae=(0,s.useRef)(new Set),ce=(0,s.useRef)(new Set);function ue(){V.current.focus()}const de=n,me=(0,s.createElement)(s.Fragment,null,U&&(0,s.createElement)(Wp.Provider,{value:ae},(0,s.createElement)(jp.Provider,{value:ce},t&&t({value:re,onChange:le,onFocus:ue}),(0,s.createElement)(Up,{value:re,onChange:le,onFocus:ue,formatTypes:Z,forwardedRef:V}))),U&&q&&(0,s.createElement)(xp,{inline:g,anchorRef:V.current}),(0,s.createElement)(de,i({role:"textbox","aria-multiline":!0,"aria-label":k},D,se,{ref:(0,d.useMergeRefs)([se.ref,D.ref,ie,Op({value:re,onChange:le,__unstableAllowPrefixTransformations:M,formatTypes:Z,onReplace:v}),(0,d.useRefEffect)((e=>{function t(e){(xl.isKeyboardEvent.primary(e,"z")||xl.isKeyboardEvent.primary(e,"y")||xl.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),zp(ae),Gp(ce),Tp(),Dp({isSelected:U,disableFormats:P,onChange:le,value:re,formatTypes:Z,tagName:n,onReplace:v,onSplit:w,onSplitMiddle:I,__unstableEmbedURLOnPaste:L,multilineTag:$,preserveWhiteSpace:T,pastePlainText:N}),Fp({removeEditorOnlyFormats:oe,value:re,onReplace:v,onSplit:w,onSplitMiddle:I,multilineTag:$,onChange:le,disableLineBreaks:R,onSplitAtEnd:B}),V,O]),contentEditable:!W||void 0,suppressContentEditableWarning:!W,className:c()("block-editor-rich-text__editable",D.className,"rich-text"),onFocus:A,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===xl.DELETE||t===xl.BACKSPACE)){const{start:n,end:o,text:r}=re,l=t===xl.BACKSPACE,i=re.activeFormats&&!!re.activeFormats.length;if(!(0,xt.isCollapsed)(re)||i||l&&0!==n||!l&&o!==r.length)return;S&&S(!l),C&&(0,xt.isEmpty)(re)&&l&&C(!l),e.preventDefault()}}})));if(!h)return me;Nt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"});const pe=c()("block-editor-rich-text",h);return(0,s.createElement)("div",{className:pe},me)}));$p.Content=({value:e,tagName:t,multiline:n,...o})=>{Array.isArray(e)&&(e=r.children.toHTML(e));const l=Rp(n);!e&&l&&(e=`<${l}></${l}>`);const i=(0,s.createElement)(s.RawHTML,null,e);return t?(0,s.createElement)(t,(0,u.omit)(o,["format"]),i):i},$p.isEmpty=e=>!e||0===e.length;var Kp=$p;function qp({value:e,onChange:t}){return(0,s.createElement)(vm,null,(0,s.createElement)(Kp,{value:e,onChange:t,placeholder:(0,g.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Yp=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),Xp=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"})),Qp=(0,m.withFilters)("editor.MediaUpload")((()=>null)),Zp=function({fallback:e=null,children:t}){return(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn);return!!t().mediaUpload}),[])?t:e},Jp=(0,d.compose)([(0,p.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(ja.store);return{createNotice:t,removeNotice:n}})),(0,m.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,allowedTypes:n,accept:o,onSelect:r,onSelectURL:l,onFilesUpload:i=u.noop,name:a=(0,g.__)("Replace"),createNotice:c,removeNotice:d})=>{const[f,h]=(0,s.useState)(e),b=(0,p.useSelect)((e=>e(Vn).getSettings().mediaUpload),[]),v=(0,s.createRef)(),k=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),_=e=>{const t=document.createElement("div");t.innerHTML=(0,s.renderToString)(e);const n=t.textContent||t.innerText||"";setTimeout((()=>{c("error",n,{speak:!0,id:k,isDismissible:!0})}),1e3)},y=e=>{r(e),h(e.url),(0,It.speak)((0,g.__)("The media file has been replaced")),d(k)},E=e=>{e.keyCode===xl.DOWN&&(e.preventDefault(),e.target.click())};return(0,s.createElement)(m.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>(0,s.createElement)(m.ToolbarButton,{ref:v,"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:E},a),renderContent:({onClose:e})=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,s.createElement)(Qp,{value:t,onSelect:e=>y(e),allowedTypes:n,render:({open:e})=>(0,s.createElement)(m.MenuItem,{icon:Yp,onClick:e},(0,g.__)("Open Media Library"))}),(0,s.createElement)(Zp,null,(0,s.createElement)(m.FormFileUpload,{onChange:e=>{(e=>{const t=e.target.files;i(t),b({allowedTypes:n,filesList:t,onFileChange:([e])=>{y(e)},onError:_})})(e)},accept:o,render:({openFileDialog:e})=>(0,s.createElement)(m.MenuItem,{icon:Xp,onClick:()=>{e()}},(0,g.__)("Upload"))}))),l&&(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,g.__)("Current media URL:")),(0,s.createElement)(wp,{value:{url:f},settings:[],showSuggestions:!1,onChange:({url:e})=>{h(e),l(e),v.current.focus()}})))})})),ef=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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"}));function tf({url:e,urlLabel:t,className:n}){const o=c()(n,"block-editor-url-popover__link-viewer-url");return e?(0,s.createElement)(m.ExternalLink,{className:o,href:e},t||(0,Za.filterURLForDisplay)((0,Za.safeDecodeURI)(e))):(0,s.createElement)("span",{className:o})}function nf({additionalControls:e,children:t,renderSettings:n,position:o="bottom center",focusOnMount:r="firstElement",...l}){const[a,c]=(0,s.useState)(!1),u=!!n&&a;return(0,s.createElement)(m.Popover,i({className:"block-editor-url-popover",focusOnMount:r,position:o},l),(0,s.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,s.createElement)("div",{className:"block-editor-url-popover__row"},t,!!n&&(0,s.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:Yc,label:(0,g.__)("Link settings"),onClick:()=>{c(!a)},"aria-expanded":a})),u&&(0,s.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},n())),e&&!u&&(0,s.createElement)("div",{className:"block-editor-url-popover__additional-controls"},e))}nf.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,s.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",t)},r),(0,s.createElement)(sp,{value:o,onChange:n,autocompleteRef:e}),(0,s.createElement)(m.Button,{icon:rp,label:(0,g.__)("Apply"),type:"submit"}))},nf.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...l}){return(0,s.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",e)},l),(0,s.createElement)(tf,{url:o,urlLabel:r,className:t}),n&&(0,s.createElement)(m.Button,{icon:ef,label:(0,g.__)("Edit"),onClick:n}))};var of=nf;const rf=({src:e,onChange:t,onSubmit:n,onClose:o})=>(0,s.createElement)(of,{onClose:o},(0,s.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n},(0,s.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,g.__)("URL"),placeholder:(0,g.__)("Paste or type URL"),onChange:t,value:e}),(0,s.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:rp,label:(0,g.__)("Apply"),type:"submit"})));var lf=(0,m.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:l,notices:i,isAppender:a,accept:d,addToGallery:f,multiple:h=!1,handleUpload:b=!0,dropZoneUIOnly:v,disableDropZone:k,disableMediaButtons:_,onError:y,onSelect:E,onCancel:C,onSelectURL:S,onDoubleClick:w,onFilesPreUpload:B=u.noop,onHTMLDrop:I=u.noop,children:x}){const T=(0,p.useSelect)((e=>{const{getSettings:t}=e(Vn);return t().mediaUpload}),[]),[N,L]=(0,s.useState)(""),[P,R]=(0,s.useState)(!1);(0,s.useEffect)((()=>{var t;L(null!==(t=null==e?void 0:e.src)&&void 0!==t?t:"")}),[null==e?void 0:e.src]);const A=e=>{L(e.target.value)},M=()=>{R(!0)},D=()=>{R(!1)},O=e=>{e.preventDefault(),N&&S&&(S(N),D())},F=n=>{if(!b)return E(n);let o;if(B(n),h)if(f){let t=[];o=n=>{const o=(null!=e?e:[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));E(o.concat(n)),t=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=E;else o=([e])=>E(e);T({allowedTypes:t,filesList:n,onFileChange:o,onError:y})},V=e=>{F(e.target.files)},H=(e,u)=>{let{instructions:d,title:p}=r;if(T||S||(d=(0,g.__)("To edit this block, you need permission to upload media.")),void 0===d||void 0===p){const e=null!=t?t:[],[n]=e,o=1===e.length,r=o&&"audio"===n,l=o&&"image"===n,i=o&&"video"===n;void 0===d&&T&&(d=(0,g.__)("Upload a media file or pick one from your media library."),r?d=(0,g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?d=(0,g.__)("Upload an image file, pick one from your media library, or add one with a URL."):i&&(d=(0,g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===p&&(p=(0,g.__)("Media"),r?p=(0,g.__)("Audio"):l?p=(0,g.__)("Image"):i&&(p=(0,g.__)("Video")))}const f=c()("block-editor-media-placeholder",n,{"is-appender":a});return(0,s.createElement)(m.Placeholder,{icon:o,label:p,instructions:d,className:f,notices:i,onClick:u,onDoubleClick:w,preview:l},e,x)},z=()=>k?null:(0,s.createElement)(m.DropZone,{onFilesDrop:F,onHTMLDrop:I}),G=()=>C&&(0,s.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,g.__)("Cancel"),variant:"link",onClick:C},(0,g.__)("Cancel")),U=()=>S&&(0,s.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,s.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:M,isPressed:P,variant:"tertiary"},(0,g.__)("Insert from URL")),P&&(0,s.createElement)(rf,{src:N,onChange:A,onSubmit:O,onClose:D}));return v||_?(v&&Nt()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),(0,s.createElement)(Zp,null,z())):(0,s.createElement)(Zp,{fallback:H(U())},(()=>{const n=(0,s.createElement)(Qp,{addToGallery:f,gallery:h&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:E,allowedTypes:t,value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:({open:e})=>(0,s.createElement)(m.Button,{variant:"tertiary",onClick:()=>{e()}},(0,g.__)("Media Library"))});if(T&&a)return(0,s.createElement)(s.Fragment,null,z(),(0,s.createElement)(m.FormFileUpload,{onChange:V,accept:d,multiple:h,render:({openFileDialog:e})=>{const t=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},(0,g.__)("Upload")),n,U(),G());return H(t,e)}}));if(T){const e=(0,s.createElement)(s.Fragment,null,z(),(0,s.createElement)(m.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:V,accept:d,multiple:h},(0,g.__)("Upload")),n,U(),G());return H(e)}return H(n)})())})),sf=({colorSettings:e,...t})=>{const n=e.map((({value:e,onChange:t,...n})=>({...n,colorValue:e,onColorChange:t})));return(0,s.createElement)(Kr,i({settings:n,gradients:[],disableCustomGradients:!0},t))};const af=(0,s.forwardRef)(((e,t)=>(0,s.createElement)(Kp,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));af.Content=({value:e="",tagName:t="div",...n})=>(0,s.createElement)(t,n,e);var cf=af,uf=(0,s.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,s.createElement)(cf,i({ref:n},t));const{className:o,onChange:r,...l}=t;return(0,s.createElement)(ns.Z,i({ref:n,className:c()("block-editor-plain-text",o),onChange:e=>r(e.target.value)},l))}));function df({property:e,viewport:t,desc:n}){const o=(0,d.useInstanceId)(df),r=n||(0,g.sprintf)(
69
  /* translators: 1: property name. 2: viewport name. */
70
+ (0,g._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."),e,t.label);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},t.label),(0,s.createElement)(m.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},r))}var mf=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:a=!1,defaultLabel:u={id:"all",
71
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
72
+ label:(0,g.__)("All")},viewports:d=[{id:"small",label:(0,g.__)("Small screens")},{id:"medium",label:(0,g.__)("Medium screens")},{id:"large",label:(0,g.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const p=o||(0,g.sprintf)(
73
  /* 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) */
74
+ (0,g.__)("Use the same %s on all screensizes."),n),f=(0,g.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=l((0,s.createElement)(df,{property:n,viewport:u}),u);
75
+ /* 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)(m.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:p,checked:!a,onChange:r,help:f}),(0,s.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":a})},!a&&h,a&&(i?i(d):d.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},l((0,s.createElement)(df,{property:n,viewport:e}),e))))))))};function pf({character:e,type:t,onUse:n}){const o=(0,s.useContext)(Wp),r=(0,s.useRef)();return r.current=n,(0,s.useEffect)((()=>{function n(n){xl.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function ff({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,l="RichText.ToolbarControls";return e&&(l+=`.${e}`),t&&n&&(r=xl.displayShortcut[t](n)),(0,s.createElement)(m.Fill,{name:l},(0,s.createElement)(m.ToolbarButton,i({},o,{shortcut:r})))}function gf({inputType:e,onInput:t}){const n=(0,s.useContext)(jp),o=(0,s.useRef)();return o.current=t,(0,s.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}const hf=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,s.createElement)(m.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 bf=(0,s.forwardRef)((function(e,t){const n=(0,p.useSelect)((e=>e(Vn).isNavigationMode()),[]),{setNavigationMode:o}=(0,p.useDispatch)(Vn),r=e=>{o("edit"!==e)};return(0,s.createElement)(m.Dropdown,{renderToggle:({isOpen:o,onToggle:r})=>(0,s.createElement)(m.Button,i({},e,{ref:t,icon:n?hf:ef,"aria-expanded":o,"aria-haspopup":"true",onClick:r
76
+ /* translators: button label text should, if possible, be under 16 characters. */,label:(0,g.__)("Tools")})),position:"bottom right",renderContent:()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.NavigableMenu,{role:"menu","aria-label":(0,g.__)("Tools")},(0,s.createElement)(m.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(bo,{icon:ef}),(0,g.__)("Edit"))},{value:"select",label:(0,s.createElement)(s.Fragment,null,hf,(0,g.__)("Select"))}]})),(0,s.createElement)("div",{className:"block-editor-tool-selector__help"},(0,g.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function vf({units:e,...t}){const n=(0,m.__experimentalUseCustomUnits)({availableUnits:so("spacing.units")||["%","px","em","rem","vw"],units:e});return(0,s.createElement)(m.__experimentalUnitControl,i({units:n},t))}var kf=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 _f 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,g.__)("Edit link"):(0,g.__)("Insert link");return(0,s.createElement)("div",{className:"block-editor-url-input__button"},(0,s.createElement)(m.Button,{icon:Er,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)(m.Button,{className:"block-editor-url-input__back",icon:kf,label:(0,g.__)("Close"),onClick:this.toggle}),(0,s.createElement)(sp,{value:e||"",onChange:t}),(0,s.createElement)(m.Button,{icon:rp,label:(0,g.__)("Submit"),type:"submit"}))))}}var yf=_f,Ef=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.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 Cf="none",Sf="custom",wf="media",Bf="attachment",If=["noreferrer","noopener"],xf=(0,s.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,s.createElement)(m.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)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Tf=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:l,linkTarget:i,linkClass:a,rel:c})=>{const[d,p]=(0,s.useState)(!1),f=(0,s.useCallback)((()=>{p(!0)})),[h,b]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),_=(0,s.useRef)(null),y=(0,s.useCallback)((()=>{e!==wf&&e!==Bf||k(""),b(!0)})),E=(0,s.useCallback)((()=>{b(!1)})),C=(0,s.useCallback)((()=>{k(null),E(),p(!1)})),S=e=>{let t=e;return void 0===e||(0,u.isEmpty)(t)||(0,u.isEmpty)(t)||((0,u.each)(If,(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},w=(0,s.useCallback)((()=>e=>{const t=_.current;t&&t.contains(e.target)||(p(!1),k(null),E())})),B=(0,s.useCallback)((()=>e=>{if(v){var n;const e=(null===(n=x().find((e=>e.url===v)))||void 0===n?void 0:n.linkDestination)||Sf;t({href:v,linkDestination:e})}E(),k(null),e.preventDefault()})),I=(0,s.useCallback)((()=>{t({linkDestination:Cf,href:""})})),x=()=>{const e=[{linkDestination:wf,title:(0,g.__)("Media File"),url:"image"===o?r:void 0,icon:xf}];return"image"===o&&l&&e.push({linkDestination:Bf,title:(0,g.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,s.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,s.createElement)(m.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},T=(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.ToggleControl,{label:(0,g.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;return n=t||c?S(c):void 0,{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===i}),(0,s.createElement)(m.TextControl,{label:(0,g.__)("Link Rel"),value:S(c)||"",onChange:e=>{t({rel:e})}}),(0,s.createElement)(m.TextControl,{label:(0,g.__)("Link CSS Class"),value:a||"",onChange:e=>{t({linkClass:e})}})),N=null!==v?v:n,L=((0,u.find)(x(),["linkDestination",e])||{}).title;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.ToolbarButton,{icon:Er,className:"components-toolbar__control",label:n?(0,g.__)("Edit link"):(0,g.__)("Insert link"),"aria-expanded":d,onClick:f}),d&&(0,s.createElement)(of,{onFocusOutside:w(),onClose:C,renderSettings:()=>T,additionalControls:!N&&(0,s.createElement)(m.NavigableMenu,null,(0,u.map)(x(),(e=>(0,s.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{k(null),(e=>{const n=x();let o;o=e?((0,u.find)(n,(t=>t.url===e))||{linkDestination:Sf}).linkDestination:Cf,t({linkDestination:o,href:e})})(e.url),E()}},e.title))))},(!n||h)&&(0,s.createElement)(of.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:N,onChangeInputValue:k,onSubmit:B(),autocompleteRef:_}),n&&!h&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(of.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:y,urlLabel:L}),(0,s.createElement)(m.Button,{icon:Ef,label:(0,g.__)("Remove link"),onClick:I}))))};var Nf=(0,s.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(F.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function Lf({children:e,className:t,isEnabled:n=!0,deviceType:o,setDeviceType:r}){if((0,d.useViewportMatch)("small","<"))return null;const l={className:c()(t,"block-editor-post-preview__dropdown-content"),position:"bottom left"},i={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!n,
77
  /* translators: button label text should, if possible, be under 16 characters. */
78
+ children:(0,g.__)("Preview")};return(0,s.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:l,toggleProps:i,icon:null},(()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.MenuGroup,null,(0,s.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Desktop"),icon:"Desktop"===o&&Nf},(0,g.__)("Desktop")),(0,s.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Tablet"),icon:"Tablet"===o&&Nf},(0,g.__)("Tablet")),(0,s.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>r("Mobile"),icon:"Mobile"===o&&Nf},(0,g.__)("Mobile"))),e)))}function Pf(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 Rf=(0,p.withSelect)((e=>({selectedBlockClientId:e(Vn).getBlockSelectionStart()})))((({selectedBlockClientId:e})=>{const t=Jr(e);return e?(0,s.createElement)(m.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current.focus()}},(0,g.__)("Skip to the selected block")):null})),Af=window.wp.wordcount,Mf=(0,p.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(Vn);return{blocks:t()}}))((function({blocks:e}){const t=(0,Af.count)((0,r.serialize)(e),"words");return(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,s.createElement)(Fs,{icon:su,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,g.sprintf)(
79
  /* translators: %d: number of blocks */
80
+ (0,g._n)("%d block","%d blocks",e.length),e.length)),(0,s.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,g.sprintf)(
81
  /* translators: %d: number of words */
82
+ (0,g._n)("%d word","%d words",t),t))))}));function Df({blockName:e}){const{preferredStyle:t,onUpdatePreferredStyleVariations:n,styles:o}=(0,p.useSelect)((t=>{var n,o;const l=t(Vn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[e],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:t(r.store).getBlockStyles(e)}}),[e]),l=(0,s.useMemo)((()=>[{label:(0,g.__)("Not set"),value:""},...o.map((({label:e,name:t})=>({label:e,value:t})))]),[o]),i=(0,s.useCallback)((t=>{n(e,t)}),[e,n]);return n&&(0,s.createElement)(m.SelectControl,{options:l,value:t||"",label:(0,g.__)("Default Style"),onChange:i})}const Of=({clientId:e,blockName:t,hasBlockStyles:n,bubblesVirtually:o})=>{const l=Hc(e);return(0,s.createElement)("div",{className:"block-editor-block-inspector"},(0,s.createElement)(Vs,l),(0,s.createElement)(Wm,{blockClientId:e}),n&&(0,s.createElement)("div",null,(0,s.createElement)(m.PanelBody,{title:(0,g.__)("Styles")},(0,s.createElement)(mu,{clientId:e}),(0,r.hasBlockSupport)(t,"defaultStylePicker",!0)&&(0,s.createElement)(Df,{blockName:t}))),(0,s.createElement)(Go.Slot,{bubblesVirtually:o}),(0,s.createElement)("div",null,(0,s.createElement)(Ff,{bubblesVirtually:o})),(0,s.createElement)(Rf,{key:"back"}))},Ff=({bubblesVirtually:e})=>{const t=(0,m.__experimentalUseSlot)(zo.slotName);return Boolean(t.fills&&t.fills.length)?(0,s.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,g.__)("Advanced"),initialOpen:!1},(0,s.createElement)(Go.Slot,{__experimentalGroup:"advanced",bubblesVirtually:e})):null};var Vf=({showNoBlockSelectedMessage:e=!0,bubblesVirtually:t=!0})=>{const{count:n,hasBlockStyles:o,selectedBlockName:l,selectedBlockClientId:i,blockType:a}=(0,p.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(Vn),{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)(Mf,null),(0,s.createElement)(Go.Slot,{bubblesVirtually:t}));const c=l===(0,r.getUnregisteredTypeHandlerName)();return a&&i&&!c?(0,s.createElement)(Of,{clientId:i,blockName:a.name,hasBlockStyles:o,bubblesVirtually:t}):e?(0,s.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,g.__)("No block selected.")):null};function Hf({children:e,__unstableContentRef:t,...n}){const o=(0,d.useViewportMatch)("medium"),r=(0,p.useSelect)((e=>e(Vn).getSettings().hasFixedToolbar),[]),l=(0,Qs.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:a,getBlockRootClientId:c}=(0,p.useSelect)(Vn),{duplicateBlocks:f,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,moveBlocksUp:k,moveBlocksDown:_}=(0,p.useDispatch)(Vn);return(0,s.createElement)("div",i({},n,{onKeyDown:function(e){if(l("core/block-editor/move-up",e)){const t=a();if(t.length){e.preventDefault();const n=c((0,u.first)(t));k(t,n)}}else if(l("core/block-editor/move-down",e)){const t=a();if(t.length){e.preventDefault();const n=c((0,u.first)(t));_(t,n)}}else if(l("core/block-editor/duplicate",e)){const t=a();t.length&&(e.preventDefault(),f(t))}else if(l("core/block-editor/remove",e)){const t=a();t.length&&(e.preventDefault(),g(t))}else if(l("core/block-editor/insert-after",e)){const t=a();t.length&&(e.preventDefault(),h((0,u.last)(t)))}else if(l("core/block-editor/insert-before",e)){const t=a();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(l("core/block-editor/delete-multi-selection",e)){const t=a();t.length>1&&(e.preventDefault(),g(t))}else l("core/block-editor/unselect",e)&&a().length>1&&(e.preventDefault(),v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}),(0,s.createElement)(Dc,{__unstableContentRef:t},(r||!o)&&(0,s.createElement)(Uu,{isFixed:!0}),(0,s.createElement)(Ku,{__unstableContentRef:t}),(0,s.createElement)(m.Popover.Slot,{name:"block-toolbar",ref:Rc(t)}),e))}var zf=function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:l,onSelect:i=u.noop,shouldFocusBlock:a=!1}){const c=(0,p.useSelect)((n=>{const{getBlockRootClientId:o}=n(Vn);return e||o(t)||void 0}),[t,e]);return(0,s.createElement)(Cc,{onSelect:i,rootClientId:c,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:l,shouldFocusBlock:a})};function Gf(){return null}Gf.Register=function(){const{registerShortcut:e}=(0,p.useDispatch)(Qs.store);return(0,s.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,g.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,g.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,g.__)("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,g.__)("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,g.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,g.__)("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,g.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,g.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,g.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,g.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Uf=Gf;function Wf(){return Nt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}const jf=new Set([xl.UP,xl.RIGHT,xl.DOWN,xl.LEFT,xl.ENTER,xl.BACKSPACE]);function $f(){const e=(0,p.useSelect)((e=>e(Vn).isTyping())),{stopTyping:t}=(0,p.useDispatch)(Vn);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 Kf(){const e=(0,p.useSelect)((e=>e(Vn).isTyping())),{startTyping:t,stopTyping:n}=(0,p.useDispatch)(Vn),o=$f(),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,Fi.isTextField)(o)||n()}))}function i(e){const{keyCode:t}=e;t!==xl.ESCAPE&&t!==xl.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,Fi.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&jf.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 qf=function({children:e}){return(0,s.createElement)("div",{ref:Kf()},e)};function Yf(){return Nt()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}const Xf=-1!==window.navigator.userAgent.indexOf("Trident"),Qf=new Set([xl.UP,xl.DOWN,xl.LEFT,xl.RIGHT]);function Zf(){const e=(0,p.useSelect)((e=>e(Vn).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((()=>{m(),r=null})))}function a(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c({keyCode:e}){if(!p())return;const r=(0,Fi.computeCaretRect)(o);if(!r)return;if(!i)return void(i=r);if(Qf.has(e))return void(i=r);const l=r.top-i.top;if(0===l)return;const s=(0,Fi.getScrollContainer)(t);if(!s)return;const a=s===n.body,c=a?o.scrollY:s.scrollTop,u=a?0:s.getBoundingClientRect().top,d=a?i.top/o.innerHeight:(i.top-u)/(o.innerHeight-u);if(0===c&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=r);const m=a?o.innerHeight:s.clientHeight;i.top+i.height>u+m||i.top<u?i=r:a?o.scrollBy(0,l):s.scrollTop+=l}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),m()}function m(){p()&&(i=(0,Fi.computeCaretRect)(o))}function p(){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 Jf=Xf?e=>e.children:function({children:e}){return(0,s.createElement)("div",{ref:Zf(),className:"block-editor__typewriter"},e)};const eg=(0,u.overEvery)([Fi.isTextField,Fi.focus.tabbable.isTabbableIndex]);function tg(){return(0,d.useRefEffect)((e=>{function t(t){if(t.target!==e)return;const n=Fi.focus.focusable.find(e),o=(0,u.findLast)(n,eg);if(!o)return;const{bottom:r}=o.getBoundingClientRect();t.clientY<r||((0,Fi.placeCaretAtHorizontalEdge)(o,!0),t.preventDefault())}return e.addEventListener("mousedown",t),()=>{e.addEventListener("mousedown",t)}}),[])}const ng=(0,s.createContext)({});function og(e,t=""){var n;const o=(0,s.useContext)(ng),{name:r}=Un();t=t||r;const l=Boolean(null===(n=o[t])||void 0===n?void 0:n.has(e)),i=(0,s.useMemo)((()=>function(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}(o,t,e)),[o,t,e]);return[l,(0,s.useCallback)((({children:e})=>(0,s.createElement)(ng.Provider,{value:i},e)),[i])]}function rg(e){if(void 0===e)e=b.colors;else{const t=e.filter((e=>e.color));0===t.length?e=b.colors:t.length<e.length&&(e=t)}return e}function lg(e){if(void 0===e)e=b.gradients;else{const t=e.filter((e=>e.gradient));0===t.length?e=b.gradients:t.length<e.length&&(e=t)}return e}}(),(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-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}.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{animation:block-editor-inserter__toggle__fade-in-animation-delayed .3s ease;animation-fill-mode:forwards;background:var(--wp-admin-theme-color);position:absolute}@media (prefers-reduced-motion:reduce){.block-editor-block-list__insertion-point-indicator{animation-delay:0s;animation-duration:1ms}}.block-editor-block-list__insertion-point.is-vertical>.block-editor-block-list__insertion-point-indicator{height:1px;left:0;right:0;top:50%}.block-editor-block-list__insertion-point.is-horizontal>.block-editor-block-list__insertion-point-indicator{height:100%;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-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation:block-editor-inserter__toggle__fade-in-animation-delayed .3s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation-delay:0s;animation-duration:1ms}}@keyframes block-editor-inserter__toggle__fade-in-animation-delayed{0%{opacity:0}60%{opacity:0}to{opacity:1}}.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}.block-editor-block-list__block .block-list-appender{align-self:center;list-style:none;margin-bottom:revert;padding:0}.block-editor-block-list__block .block-list-appender.wp-block{max-width:none}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender{margin:8px 0}.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{margin-right:8px;opacity:1;padding:0;transform:scale(1);transition:all .1s ease}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-list-appender:first-of-type .block-list-appender__toggle{margin-right:0}.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}.is-dragging{display: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}.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-top:16px}.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{border:1px solid transparent;border-radius:2px;height:100%;position:relative;transition:all .05s ease-in-out}.block-editor-block-patterns-list__item:hover{border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus{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-title{font-size:12px;padding:4px;text-align:center}.block-editor-block-preview__container{overflow:hidden;position:relative;width:100%}.block-editor-block-preview__container.editor-styles-wrapper{margin:0;padding:0}.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{display:none}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__layout.is-root-container{padding-left:0;padding-right:0}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.wp-block[data-align=full]{margin-left:0;margin-right:0}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles{display:flex;flex-wrap:wrap;justify-content:space-between}.block-editor-block-styles__item{border-radius:2px;cursor:pointer;display:flex;flex-direction:column;flex-shrink:0;margin:4px 0;overflow:hidden;padding:6px;width:calc(50% - 4px)}.block-editor-block-styles__item:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-styles__item:hover .block-editor-block-styles__item-preview{border-color:var(--wp-admin-theme-color)}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-label{font-weight:700}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-preview{border:2px solid #1e1e1e;margin:0}.block-editor-block-styles__item .block-editor-block-preview__container{cursor:inherit}.block-editor-block-styles__item-preview{align-items:center;background:#fff;border-radius:2px;display:flex;flex-grow:1;margin:2px;max-height:160px;min-height:80px;outline:1px solid transparent;overflow:hidden;padding:0}.block-editor-block-switcher__styles__menugroup{position:relative}.block-editor-block-styles__item-label{padding:4px 0;text-align:center}.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;margin-left:-4px;margin-right:-4px;overflow:hidden;padding:4px}.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-range-control,.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 .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.2;padding-bottom:4px}.components-border-style-control .components-border-style-control__buttons{display:inline-flex;margin-bottom:24px}.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-button-block-appender.block-list-appender__toggle{box-shadow:none;display:flex;flex-direction:row;height:24px;width:24px}.block-editor-button-block-appender.block-list-appender__toggle>svg{background-color:#1e1e1e;border-radius:2px;color:#fff;flex:1 0 auto;width:24px}.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{margin-bottom:12px}.block-editor-color-gradient-control .block-editor-color-gradient-control__button-tabs{display:block;margin-bottom:12px}.block-editor-panel-color-gradient-settings .component-color-indicator{vertical-align:text-bottom}.block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:inline-block}.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{margin-left:0}.block-editor-panel-color-gradient-settings .components-circular-option-picker__option-wrapper{margin-left:calc(20% - 33.6px)}.block-editor-panel-color-gradient-settings .components-circular-option-picker__option-wrapper:nth-child(6n+6){margin-left:0}}.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{height:32px;position:absolute;top:0}.block-editor-block-list__empty-block-inserter.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle,.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle{margin-left:0}@media (min-width:600px){.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender .block-editor-inserter{display:flex;height:100%}}.block-editor-block-list__empty-block-inserter:disabled,.block-editor-default-block-appender .block-editor-inserter:disabled{display:none}.block-editor-block-list__empty-block-inserter,.block-editor-default-block-appender.has-visible-prompt .block-editor-inserter{left:0}.block-editor-duotone-control__popover .components-popover__content{border:1px solid #1e1e1e;min-width:214px}.block-editor-duotone-control__popover .components-circular-option-picker{padding:12px}.block-editor-duotone-control__popover .components-menu-group__label{box-sizing:border-box;padding:12px 12px 0;width:100%}.block-editor-duotone-control__popover>.components-popover__content{width:334px}.block-editor-duotone-control__popover:not([data-y-axis=middle][data-x-axis=right])>.components-popover__content{margin-right:-14px}.components-font-appearance-control__select{margin-bottom:24px}.components-font-appearance-control__select ul li{color:#1e1e1e;text-transform:capitalize}.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}@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-wrapper{position:relative}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input 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:16px;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 .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]{font-size:13px;line-height:normal}}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-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-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.block-editor-link-control .block-editor-link-control__search-input.block-editor-link-control__search-input input[type=text]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.block-editor-link-control .block-editor-link-control__search-input .components-base-control__field{margin-bottom:0}.block-editor-link-control__search-error{margin:-8px 16px 16px}.block-editor-link-control__search-actions{left:19px;position:absolute;top:19px}.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:5px;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:#ddd}.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{word-wrap:break-word;align-items:flex-start;display:block;flex-direction:row;margin-left:8px;overflow:hidden;white-space:pre-wrap}.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 .block-editor-link-control__search-item-details{overflow:hidden}.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 .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:#000;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-type{background-color:#f0f0f0;border-radius:2px;display:block;font-size:.9em;margin-right:auto;padding:3px 8px}.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,.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-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-line-height-control{margin-bottom:24px}.block-editor-line-height-control input{display:block;max-width:60px}.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:-14px;content:"";left:-14px;position:absolute;right:-14px;top:-14px;z-index:60}[data-align=full] .has-overlay:after{left:0;right:0}.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:1px solid 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{border-color:var(--wp-admin-theme-color);color:var(--wp-admin-theme-color)!important}.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}.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 .block-editor-list-view-block-contents{background:var(--wp-admin-theme-color);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{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.is-dragging-components-draggable .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents:focus{box-shadow:none}.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{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));border-radius:0}.block-editor-list-view-leaf.is-branch-selected.is-last-of-selected-branch .block-editor-list-view-block-contents{border-radius:0 0 2px 2px}.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:focus,.block-editor-list-view-leaf .block-editor-list-view-block-contents:hover{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block-contents:focus,.is-dragging-components-draggable .block-editor-list-view-leaf .block-editor-list-view-block-contents:hover{box-shadow:none}.block-editor-list-view-leaf .block-editor-list-view-block-contents:focus{z-index:1}.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.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:top;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-top:8px}.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,.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: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,.block-editor-list-view-block-slot__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}.modal-open .block-editor-media-replace-flow__options{display:none}.block-editor-media-replace-flow__options .components-popover__content>div{padding-top:16px}.block-editor-media-replace-flow__indicator{margin-right:4px}.block-editor-media-flow__url-input{border-top:1px solid #1e1e1e;margin-left:-12px;margin-right:-12px;margin-top:12px;padding:12px 24px 0}.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;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-decoration-and-transform{display:flex}.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 -12px -12px;min-width:280px;padding:12px 20px}.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]{font-size:13px;width:300px}}.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-block-list__block .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.block-editor-block-list__block .block-editor-url-input.is-full-width__suggestions,.block-editor-url-input.is-full-width,.block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.block-editor-url-input.is-full-width__suggestions,.components-popover .block-editor-url-input.is-full-width,.components-popover .block-editor-url-input.is-full-width .block-editor-url-input__input[type=text],.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__border-controls .block-editor-hooks__border-controls-row{display:flex;justify-content:space-between}.block-editor-hooks__border-controls .block-editor-hooks__border-controls-row>*{width:calc(50% - 8px)}.block-editor-hooks__border-controls .components-unit-control-wrapper{margin-bottom:24px}.block-editor-hooks__border-controls .components-unit-control-wrapper:last-child{margin-bottom:8px}.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;position:sticky;top:0;z-index:1}.block-editor-inserter__search .components-search-control__icon{left:20px}.block-editor-inserter__tabs{display:flex;flex-direction:column;margin-top:-8px}.block-editor-inserter__tabs .components-tab-panel__tabs{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:72px;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{line-height:1.2}.block-editor-inserter__panel-dropdown select{border:none}.block-editor-inserter__block-list{flex-grow:1;position:relative}.block-editor-inserter__popover .block-editor-block-types-list{margin:-8px}.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{margin-top:64px;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{float:right;height:0;padding:0}.block-editor-inserter__quick-inserter.has-expand .block-editor-inserter__panel-content,.block-editor-inserter__quick-inserter.has-search .block-editor-inserter__panel-content{padding:16px}.block-editor-inserter__quick-inserter-patterns .block-editor-block-patterns-list{grid-gap:8px;display:grid;grid-template-columns:1fr 1fr}.block-editor-inserter__quick-inserter-separator{border-top:1px solid #ddd}.block-editor-inserter__popover.is-quick>.components-popover__content>div{padding:0}.block-editor-inserter__quick-inserter-expand.components-button{background:#1e1e1e;border-radius:0;color:#fff;display:block;height:44px;width:100%}.block-editor-inserter__quick-inserter-expand.components-button:hover{color:#fff}.block-editor-inserter__quick-inserter-expand.components-button:active{color:#ccc}.block-editor-inserter__quick-inserter-expand.components-button:focus:not(:disabled){box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 0 0 3px #fff}.block-editor-post-preview__dropdown{padding:0}.block-editor-post-preview__button-resize.block-editor-post-preview__button-resize{padding-right:40px}.block-editor-post-preview__button-resize.block-editor-post-preview__button-resize.has-icon{padding-right:8px}.block-editor-post-preview__dropdown-content .components-popover__content{overflow-y:visible}.block-editor-post-preview__dropdown-content.edit-post-post-preview-dropdown .components-menu-group:first-child{padding-bottom:8px}.block-editor-post-preview__dropdown-content.edit-post-post-preview-dropdown .components-menu-group:last-child{margin-bottom:0}.block-editor-post-preview__dropdown-content .components-menu-group+.components-menu-group{padding:8px}@media (min-width:600px){.edit-post-header__settings .editor-post-preview,.edit-site-header__actions .editor-post-preview{display:none}.edit-post-header.has-reduced-ui .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-saved-state{transition:opacity .1s linear}}@media (min-width:600px) and (prefers-reduced-motion:reduce){.edit-post-header.has-reduced-ui .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui .edit-post-header__settings .editor-post-saved-state{transition-delay:0s;transition-duration:0s}}@media (min-width:600px){.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .block-editor-post-preview__button-toggle,.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .editor-post-save-draft,.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .editor-post-saved-state{opacity:0}.edit-post-header.has-reduced-ui:not(:hover) .edit-post-header__settings .block-editor-post-preview__button-toggle.is-opened{opacity:1}}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color--rgb:0,133,186;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-10--rgb:0,115,161;--wp-admin-theme-color-darker-20:#006187;--wp-admin-theme-color-darker-20--rgb:0,97,135;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-light{--wp-admin-border-width-focus:1.5px}}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33,69,230;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:24,58,214;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-modern{--wp-admin-border-width-focus:1.5px}}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color--rgb:9,100,132;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-10--rgb:7,82,108;--wp-admin-theme-color-darker-20:#064054;--wp-admin-theme-color-darker-20--rgb:6,64,84;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-blue{--wp-admin-border-width-focus:1.5px}}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color--rgb:70,64,60;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-10--rgb:56,51,48;--wp-admin-theme-color-darker-20:#2b2724;--wp-admin-theme-color-darker-20--rgb:43,39,36;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-coffee{--wp-admin-border-width-focus:1.5px}}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color--rgb:82,63,109;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-10--rgb:70,54,93;--wp-admin-theme-color-darker-20:#3a2c4d;--wp-admin-theme-color-darker-20--rgb:58,44,77;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ectoplasm{--wp-admin-border-width-focus:1.5px}}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color--rgb:225,77,67;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-10--rgb:221,56,45;--wp-admin-theme-color-darker-20:#d02c21;--wp-admin-theme-color-darker-20--rgb:208,44,33;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-midnight{--wp-admin-border-width-focus:1.5px}}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color--rgb:98,124,131;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-10--rgb:87,110,116;--wp-admin-theme-color-darker-20:#4c6066;--wp-admin-theme-color-darker-20--rgb:76,96,102;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-ocean{--wp-admin-border-width-focus:1.5px}}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color--rgb:221,130,59;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-10--rgb:217,116,38;--wp-admin-theme-color-darker-20:#c36922;--wp-admin-theme-color-darker-20--rgb:195,105,34;--wp-admin-border-width-focus:2px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){body.admin-color-sunrise{--wp-admin-border-width-focus:1.5px}}
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-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}.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{animation:block-editor-inserter__toggle__fade-in-animation-delayed .3s ease;animation-fill-mode:forwards;background:var(--wp-admin-theme-color);position:absolute}@media (prefers-reduced-motion:reduce){.block-editor-block-list__insertion-point-indicator{animation-delay:0s;animation-duration:1ms}}.block-editor-block-list__insertion-point.is-vertical>.block-editor-block-list__insertion-point-indicator{height:1px;left:0;right:0;top:50%}.block-editor-block-list__insertion-point.is-horizontal>.block-editor-block-list__insertion-point-indicator{height:100%;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-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation:block-editor-inserter__toggle__fade-in-animation-delayed .3s ease;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block-popover-inserter .block-editor-inserter__toggle.components-button,.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle.components-button{animation-delay:0s;animation-duration:1ms}}@keyframes block-editor-inserter__toggle__fade-in-animation-delayed{0%{opacity:0}60%{opacity:0}to{opacity:1}}.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}.block-editor-block-list__block .block-list-appender{align-self:center;list-style:none;margin-bottom:revert;padding:0}.block-editor-block-list__block .block-list-appender.wp-block{max-width:none}.block-editor-block-list__block .block-list-appender .block-editor-default-block-appender{margin:8px 0}.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{margin-right:8px;opacity:1;padding:0;transform:scale(1);transition:all .1s ease}@media (prefers-reduced-motion:reduce){.block-editor-block-list__block .block-list-appender .block-list-appender__toggle{transition-delay:0s;transition-duration:0s}}.block-editor-block-list__block .block-list-appender:first-of-type .block-list-appender__toggle{margin-right:0}.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}.is-dragging{display: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}.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-top:16px}.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{border:1px solid transparent;border-radius:2px;height:100%;position:relative;transition:all .05s ease-in-out}.block-editor-block-patterns-list__item:hover{border:1px solid var(--wp-admin-theme-color)}.block-editor-block-patterns-list__item:focus{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-title{font-size:12px;padding:4px;text-align:center}.block-editor-block-preview__container{overflow:hidden;position:relative;width:100%}.block-editor-block-preview__container.editor-styles-wrapper{margin:0;padding:0}.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{display:none}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__layout.is-root-container{padding-left:0;padding-right:0}.block-editor-block-preview__container .block-editor-block-preview__content .block-editor-block-list__layout.is-root-container>.wp-block[data-align=full]{margin-left:0;margin-right:0}.block-editor-block-settings-menu__popover .components-dropdown-menu__menu{padding:0}.block-editor-block-styles{display:flex;flex-wrap:wrap;justify-content:space-between}.block-editor-block-styles__item{border-radius:2px;cursor:pointer;display:flex;flex-direction:column;flex-shrink:0;margin:4px 0;overflow:hidden;padding:6px;width:calc(50% - 4px)}.block-editor-block-styles__item:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.block-editor-block-styles__item:hover .block-editor-block-styles__item-preview{border-color:var(--wp-admin-theme-color)}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-label{font-weight:700}.block-editor-block-styles__item.is-active .block-editor-block-styles__item-preview{border:2px solid #1e1e1e;margin:0}.block-editor-block-styles__item .block-editor-block-preview__container{cursor:inherit}.block-editor-block-styles__item-preview{align-items:center;background:#fff;border-radius:2px;display:flex;flex-grow:1;margin:2px;max-height:160px;min-height:80px;outline:1px solid transparent;overflow:hidden;padding:0}.block-editor-block-switcher__styles__menugroup{position:relative}.block-editor-block-styles__item-label{padding:4px 0;text-align:center}.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;margin-left:-4px;margin-right:-4px;overfl