From 0d21ceb6695c683c6ecaadcd13e97e2e9b53bab4 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 24 Jun 2024 15:18:23 +0000 Subject: [PATCH] Grouped Backports to the 6.2 branch. - Editor: Fix Path Traversal issue on Windows in Template-Part Block. - Editor: Sanitize Template Part HTML tag on save. - HTML API: Run URL attributes through `esc_url()`. Merges [58470], [58471], [58472] and [58473] to the 6.2 branch. Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz, dmsnell, gziolo. Built from https://develop.svn.wordpress.org/branches/6.2@58479 git-svn-id: http://core.svn.wordpress.org/branches/6.2@57928 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../assets/script-loader-packages.min.php | 2 +- wp-includes/assets/script-loader-packages.php | 2 +- wp-includes/blocks.php | 36 +++- wp-includes/blocks/template-part.php | 2 +- wp-includes/formatting.php | 3 +- wp-includes/functions.php | 3 + .../html-api/class-wp-html-tag-processor.php | 9 +- wp-includes/js/dist/block-directory.js | 18 +- wp-includes/js/dist/block-directory.min.js | 2 +- wp-includes/js/dist/block-editor.js | 23 +- wp-includes/js/dist/block-editor.min.js | 4 +- wp-includes/js/dist/block-library.js | 18 +- wp-includes/js/dist/block-library.min.js | 2 +- wp-includes/js/dist/components.js | 200 ++++++++++++------ wp-includes/js/dist/components.min.js | 4 +- wp-includes/js/dist/compose.js | 18 +- wp-includes/js/dist/compose.min.js | 2 +- wp-includes/js/dist/customize-widgets.js | 18 +- wp-includes/js/dist/customize-widgets.min.js | 2 +- wp-includes/js/dist/data.js | 43 ++-- wp-includes/js/dist/data.min.js | 2 +- wp-includes/js/dist/edit-post.js | 18 +- wp-includes/js/dist/edit-post.min.js | 2 +- wp-includes/js/dist/edit-site.js | 18 +- wp-includes/js/dist/edit-site.min.js | 2 +- wp-includes/js/dist/edit-widgets.js | 18 +- wp-includes/js/dist/edit-widgets.min.js | 2 +- wp-includes/js/dist/editor.js | 19 +- wp-includes/js/dist/editor.min.js | 2 +- wp-includes/js/dist/keyboard-shortcuts.js | 18 +- wp-includes/js/dist/keyboard-shortcuts.min.js | 2 +- wp-includes/js/dist/plugins.js | 18 +- wp-includes/js/dist/plugins.min.js | 2 +- wp-includes/js/dist/server-side-render.js | 18 +- wp-includes/js/dist/server-side-render.min.js | 2 +- wp-includes/js/dist/viewport.js | 18 +- wp-includes/js/dist/viewport.min.js | 2 +- 37 files changed, 312 insertions(+), 262 deletions(-) diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php index 2fb330ba5c..611fe57a44 100644 --- a/wp-includes/assets/script-loader-packages.min.php +++ b/wp-includes/assets/script-loader-packages.min.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e7b4ea96175a89b263e2'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '9c45b8d28fc867ceed45'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '7e87c7eac7ce74210f6b'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'cb9908eec52e0738fb8b'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'db4d7166612dd5d7c55f'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '1cc3f22544ddc4f33398'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '7d5916e3b2ef0ea01400'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fc0de6bb17aa25caf698'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'd349266a512043b44d45'), 'data.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'bea61b540e751202b72b'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'b49d8d73e4d1439f54c6'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'e03c89e1dd68aee1cb3a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '979fbbc4193328107591'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '812e218289a72978cf08'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'a449dc89cfd5d1992ccf'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'b8f865aaa9ea6fb409a4'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b3bda690cfc516378771'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cd4a10ec005e2f001978'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'b696c16720133edfc065'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '184b321fa2d3bc7fd173'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '6ba78be26d660b6af113'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f837b6298c83612cd6f6'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '0d1b90278bae7df6ecf9'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'c66e137a7e588dab54c3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '0d09a26d73a3168867f7'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f247ed2bc3571743bba'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'bc3e989c53f7707d8c31'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'a7367a6154c724b51b31'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '9307ec04c67d79b6e813'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'd1bc93277666143a3f5e'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '528e6cf281ffc9b7bd3c'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '16185fce2fb043a0cfed'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '4f6bd168b2b8b45c8a6b'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'ab0988b60557e62d52b1'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'ecce20f002eda4c19664'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '1720fc5d5c76f53a1740'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'bc0029ca2c943aec5311'), 'autop.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43197d709df445ccf849'), 'blob.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e7b4ea96175a89b263e2'), 'block-directory.min.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '227c11b6eb748592b6b6'), 'block-editor.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'f3e018a41538d4e3440c'), 'block-library.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'd445864ffde8538fadbc'), 'block-serialization-default-parser.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '30ffd7e7e199f10b2a6d'), 'blocks.min.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'db4d7166612dd5d7c55f'), 'components.min.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'afc30fcab1ba126ba0fc'), 'compose.min.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => 'e6696709310303823358'), 'core-data.min.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fc0de6bb17aa25caf698'), 'customize-widgets.min.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'a70ea1b5d3ee369ec7fa'), 'data.min.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'd1a755ff331dc3fc3100'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'e10d473d392daa8501e8'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'b49d8d73e4d1439f54c6'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '6c963cb9494ba26b77eb'), 'dom.min.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'e03c89e1dd68aee1cb3a'), 'dom-ready.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '392bdd43726760d1f3ca'), 'edit-post.min.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '5bcc9c747402c0fe9242'), 'edit-site.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '9b22ccf518ace42c0ab2'), 'edit-widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '918c5d8ec820294e5b8b'), 'editor.min.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2dbde93c02bed4fc2b4b'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b3bda690cfc516378771'), 'escape-html.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '03e27a7b6ae14f7afaa6'), 'format-library.min.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cd4a10ec005e2f001978'), 'hooks.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4169d3cf8e8d95a3d6d5'), 'html-entities.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '36a4a255da7dd2e1bf8e'), 'i18n.min.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9e794f35a71bb98672ae'), 'is-shallow-equal.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '20c2b06ecf04afb14fee'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '74c1d7a0d985f4165827'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => '184b321fa2d3bc7fd173'), 'list-reusable-blocks.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '6ba78be26d660b6af113'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f837b6298c83612cd6f6'), 'notices.min.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '9c1575b7a31659f45a45'), 'nux.min.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '038c48e26a91639ae8ab'), 'plugins.min.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '68484fe54596184c186b'), 'preferences.min.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'c66e137a7e588dab54c3'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'c5543628aa7ff5bd5be4'), 'primitives.min.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '0d09a26d73a3168867f7'), 'priority-queue.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '422e19e9d48b269c5219'), 'private-apis.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6f247ed2bc3571743bba'), 'redux-routine.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'bc3e989c53f7707d8c31'), 'reusable-blocks.min.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'a7367a6154c724b51b31'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '9307ec04c67d79b6e813'), 'server-side-render.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '9c952020b55648b555fb'), 'shortcode.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7539044b04e6bca57f2e'), 'style-engine.min.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '528e6cf281ffc9b7bd3c'), 'token-list.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f2cf0bb3ae80de227e43'), 'url.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '16185fce2fb043a0cfed'), 'viewport.min.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '96d854b02cfef8dfce60'), 'warning.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4acee5fc2fd9a24cefc2'), 'widgets.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'ab0988b60557e62d52b1'), 'wordcount.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'feb9569307aec24292f2')); diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php index 2f9a37d245..9b378651e3 100644 --- a/wp-includes/assets/script-loader-packages.php +++ b/wp-includes/assets/script-loader-packages.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4358553d8083f2393262'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f0a8770c8b4a8ec390b9'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '656a37f6e5e88863405a'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'd4b4469173b25871a6db'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '659c02a916d332d198d3'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '6691fd6bf3441568cfb5'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '66181ec0b40a7b6cfae7'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '931b797529818d5ec638'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '60feb4306fe9534bc937'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '0d5e999c633b18150b49'), 'data.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'e20538c005aae6958a33'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '979f2f6cd48deabfe6fc'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'b93565ec9d5379c780ad'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '81bed7a8a7e5c0f06863'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '8f9fe72ec7e6422ffb61'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'd95b48d7df6f8d365aad'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '1dceeacb1da222dd0c7c'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '0cad38f6457224436f2c'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cf8adce62678d9a64c60'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => 'd9997e5c243ce7427d4e'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'e05b6bffe500867f27e8'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1f2da3834fe510c12e67'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b53823237263f9d526b5'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '86345f1b98bd487fb760'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'b68672fbcc78e405d114'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'd4082da1f03df7787408'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '1ea1a5ed229b34eccaa0'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1d62738f06e87528f62'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18f3ef9ff9519ffbb0b6'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '726e7becac7ccbe45a51'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7ae393123206d036f3d9'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '3a2ed21adf680fa0a881'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'a92cb36becaeba47ce44'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51bfa0ce50c94567c1d2'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '41dca70fa912251373d1'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51470de6b529e717152a'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '2769d3f5d7462b726ba8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'a2e3a11191d864ad6f2c'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '0ee61caf926b8a5c5f27'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '4d49f11a15c40df3bf3c'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '68af4ed41fa8a1b94f61'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '9dfc70c5ecb460ef802d'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4358553d8083f2393262'), 'block-directory.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7656f59bccfc16e59c9f'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '826089f222b5a1fd7571'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '23cd4122233bf681dddb'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '659c02a916d332d198d3'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '6691fd6bf3441568cfb5'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => 'e74c61cd223d16259c7b'), 'compose.js' => array('dependencies' => array('react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '095a0241333a3316a998'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '60feb4306fe9534bc937'), 'customize-widgets.js' => array('dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '4f9ce3d3caaa9e384e0c'), 'data.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'ce70b348dbb1cf46e8e9'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => 'a9db8689c0dc134496f2'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => '979f2f6cd48deabfe6fc'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '9a578dedacc95dee5274'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'b93565ec9d5379c780ad'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7c25017459f1da90355d'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-widgets'), 'version' => '0ab7f2c8ee78eb629f9d'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'b236aa47d01fca1ceca2'), 'edit-widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '01876b1d44c7b0eaa495'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'fe3dc8401b4beba2f4b8'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '0cad38f6457224436f2c'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6cf743ecc1ac531a8ee6'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'cf8adce62678d9a64c60'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3ad9b2919ff3fc96ce63'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87ef261e846b76e5a37b'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '0343553cc8c879477a4a'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b8f723a062b0818425f1'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '7902f55ff8178d87d2e4'), 'keycodes.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill'), 'version' => 'e05b6bffe500867f27e8'), 'list-reusable-blocks.js' => array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '1f2da3834fe510c12e67'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b53823237263f9d526b5'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '72014f2e1361090a48e0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cd90e6b2a9140895480a'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => 'ba2ea69f904fb82fd8bf'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'b68672fbcc78e405d114'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'd4082da1f03df7787408'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '1ea1a5ed229b34eccaa0'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1d62738f06e87528f62'), 'private-apis.js' => array('dependencies' => array('wp-polyfill'), 'version' => '18f3ef9ff9519ffbb0b6'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '726e7becac7ccbe45a51'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7ae393123206d036f3d9'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => '3a2ed21adf680fa0a881'), 'server-side-render.js' => array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '9f77a71e9f3d21256840'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51bfa0ce50c94567c1d2'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '41dca70fa912251373d1'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0aa873f736c379f28e78'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => '51470de6b529e717152a'), 'viewport.js' => array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'a6543f6f78d3e9460f78'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aa73c6d9a1563e863795'), 'widgets.js' => array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => 'a2e3a11191d864ad6f2c'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27e23086e41dbb80f874')); diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index cb4048f88d..5dfaad318f 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -839,7 +839,7 @@ function _filter_block_content_callback( $matches ) { * @return array The filtered and sanitized block object result. */ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) { - $block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols ); + $block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols, $block ); if ( is_array( $block['innerBlocks'] ) ) { foreach ( $block['innerBlocks'] as $i => $inner_block ) { @@ -855,6 +855,7 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() * non-allowable HTML. * * @since 5.3.1 + * @since 6.5.5 Added the `$block_context` parameter. * * @param string[]|string $value The attribute value to filter. * @param array[]|string $allowed_html An array of allowed HTML elements and attributes, @@ -862,13 +863,18 @@ function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() * for the list of accepted context names. * @param string[] $allowed_protocols Optional. Array of allowed URL protocols. * Defaults to the result of wp_allowed_protocols(). + * @param array $block_context Optional. The block the attribute belongs to, in parsed block array format. * @return string[]|string The filtered and sanitized result. */ -function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) { +function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array(), $block_context = null ) { if ( is_array( $value ) ) { foreach ( $value as $key => $inner_value ) { - $filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols ); - $filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols ); + $filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols, $block_context ); + $filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols, $block_context ); + + if ( isset( $block_context['blockName'] ) && 'core/template-part' === $block_context['blockName'] ) { + $filtered_value = filter_block_core_template_part_attributes( $filtered_value, $filtered_key, $allowed_html ); + } if ( $filtered_key !== $key ) { unset( $value[ $key ] ); @@ -883,6 +889,28 @@ function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = ar return $value; } +/** + * Sanitizes the value of the Template Part block's `tagName` attribute. + * + * @since 6.5.5 + * + * @param string $attribute_value The attribute value to filter. + * @param string $attribute_name The attribute name. + * @param array[]|string $allowed_html An array of allowed HTML elements and attributes, + * or a context name such as 'post'. See wp_kses_allowed_html() + * for the list of accepted context names. + * @return string The sanitized attribute value. + */ +function filter_block_core_template_part_attributes( $attribute_value, $attribute_name, $allowed_html ) { + if ( empty( $attribute_value ) || 'tagName' !== $attribute_name ) { + return $attribute_value; + } + if ( ! is_array( $allowed_html ) ) { + $allowed_html = wp_kses_allowed_html( $allowed_html ); + } + return isset( $allowed_html[ $attribute_value ] ) ? $attribute_value : ''; +} + /** * Parses blocks out of a content string, and renders those appropriate for the excerpt. * diff --git a/wp-includes/blocks/template-part.php b/wp-includes/blocks/template-part.php index 6f41f2a793..e0c826235a 100644 --- a/wp-includes/blocks/template-part.php +++ b/wp-includes/blocks/template-part.php @@ -155,7 +155,7 @@ function render_block_core_template_part( $attributes ) { global $wp_embed; $content = $wp_embed->autoembed( $content ); - if ( empty( $attributes['tagName'] ) ) { + if ( empty( $attributes['tagName'] ) || tag_escape( $attributes['tagName'] ) !== $attributes['tagName'] ) { $area_tag = 'div'; if ( $area_definition && isset( $area_definition['area_tag'] ) ) { $area_tag = $area_definition['area_tag']; diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 6f5f30b974..8b746f6dcf 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4720,12 +4720,13 @@ EOF; * Escapes an HTML tag name. * * @since 2.5.0 + * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements). * * @param string $tag_name * @return string */ function tag_escape( $tag_name ) { - $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) ); + $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) ); /** * Filters a string cleaned and escaped for output as an HTML tag. * diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 9f39f612c6..f955a091d3 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6001,6 +6001,9 @@ function validate_file( $file, $allowed_files = array() ) { return 0; } + // Normalize path for Windows servers + $file = wp_normalize_path( $file ); + // `../` on its own is not allowed: if ( '../' === $file ) { return 1; diff --git a/wp-includes/html-api/class-wp-html-tag-processor.php b/wp-includes/html-api/class-wp-html-tag-processor.php index 7edb67f9f0..6ef58d8b16 100644 --- a/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1867,7 +1867,14 @@ class WP_HTML_Tag_Processor { if ( true === $value ) { $updated_attribute = $name; } else { - $escaped_new_value = esc_attr( $value ); + $comparable_name = strtolower( $name ); + + /* + * Escape URL attributes. + * + * @see https://html.spec.whatwg.org/#attributes-3 + */ + $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes() ) ? esc_url( $value ) : esc_attr( $value ); $updated_attribute = "{$name}=\"{$escaped_new_value}\""; } diff --git a/wp-includes/js/dist/block-directory.js b/wp-includes/js/dist/block-directory.js index 5b664907a6..1add7d0328 100644 --- a/wp-includes/js/dist/block-directory.js +++ b/wp-includes/js/dist/block-directory.js @@ -1220,19 +1220,15 @@ var external_wp_components_namespaceObject = window["wp"]["components"]; var external_wp_coreData_namespaceObject = window["wp"]["coreData"]; ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - return target; - }; - return _extends.apply(this, arguments); + return n; + }, _extends.apply(null, arguments); } + ;// CONCATENATED MODULE: external ["wp","htmlEntities"] var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js diff --git a/wp-includes/js/dist/block-directory.min.js b/wp-includes/js/dist/block-directory.min.js index fe1fd110aa..9f935d99dc 100644 --- a/wp-includes/js/dist/block-directory.min.js +++ b/wp-includes/js/dist/block-directory.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(){"use strict";var e={n:function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,{a:l}),l},d:function(t,l){for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{store:function(){return G}});var l={};e.r(l),e.d(l,{getDownloadableBlocks:function(){return k},getErrorNoticeForBlock:function(){return h},getErrorNotices:function(){return E},getInstalledBlockTypes:function(){return g},getNewBlockTypes:function(){return f},getUnusedBlockTypes:function(){return _},isInstalling:function(){return w},isRequestingDownloadableBlocks:function(){return b}});var n={};e.r(n),e.d(n,{addInstalledBlockType:function(){return D},clearErrorNotice:function(){return x},fetchDownloadableBlocks:function(){return S},installBlockType:function(){return C},receiveDownloadableBlocks:function(){return O},removeInstalledBlockType:function(){return R},setErrorNotice:function(){return M},setIsInstalling:function(){return P},uninstallBlockType:function(){return A}});var r={};e.r(r),e.d(r,{getDownloadableBlocks:function(){return Y}});var o=window.wp.element,a=window.wp.plugins,i=window.wp.hooks,c=window.wp.blocks,s=window.wp.data,d=window.wp.editor;var u=(0,s.combineReducers)({downloadableBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},blockManagement:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter((e=>e.name!==t.item.name))};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},errorNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":const{[t.blockId]:l,...n}=e;return n}return e}}),m=window.wp.blockEditor;function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((t=>{let{name:l}=t;return l===e.name})))return!0;for(let l=0;lt=>{const l=e(m.store).getBlocks();return g(t).filter((e=>p(e,l)))})),_=(0,s.createRegistrySelector)((e=>t=>{const l=e(m.store).getBlocks();return g(t).filter((e=>!p(e,l)))}));function w(e,t){return e.blockManagement.isInstalling[t]||!1}function E(e){return e.errorNotices}function h(e,t){return e.errorNotices[t]}var y=window.wp.i18n,v=window.wp.apiFetch,B=e.n(v),I=window.wp.notices,N=window.wp.url;const T=e=>new Promise(((t,l)=>{const n=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((t=>{e[t]&&(n[t]=e[t])})),e.innerHTML&&n.appendChild(document.createTextNode(e.innerHTML)),n.onload=()=>t(!0),n.onerror=()=>l(new Error("Error loading asset.")),document.body.appendChild(n),("link"===n.nodeName.toLowerCase()||"script"===n.nodeName.toLowerCase()&&!n.src)&&t()}));function L(e){if(!e)return!1;const t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}function S(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function O(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}const C=e=>async t=>{let{registry:l,dispatch:n}=t;const{id:r,name:o}=e;let a=!1;n.clearErrorNotice(r);try{n.setIsInstalling(r,!0);const t=L(e);let i={};if(t)await B()({method:"PUT",url:t,data:{status:"active"}});else{i=(await B()({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links}n.addInstalledBlockType({...e,links:{...e.links,...i}});const s=["api_version","title","category","parent","icon","description","keywords","attributes","provides_context","uses_context","supports","styles","example","variations"];await B()({path:(0,N.addQueryArgs)(`/wp/v2/block-types/${o}`,{_fields:s})}).catch((()=>{})).then((e=>{e&&(0,c.unstable__bootstrapServerSideBlockDefinitions)({[o]:Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return s.includes(t)})))})})),await async function(){const e=await B()({url:document.location.href,parse:!1}),t=await e.text(),l=(new window.DOMParser).parseFromString(t,"text/html"),n=Array.from(l.querySelectorAll('link[rel="stylesheet"],script')).filter((e=>e.id&&!document.getElementById(e.id)));for(const e of n)await T(e)}();if(!l.select(c.store).getBlockTypes().some((e=>e.name===o)))throw new Error((0,y.__)("Error registering block. Try reloading the page."));l.dispatch(I.store).createInfoNotice((0,y.sprintf)((0,y.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),a=!0}catch(e){let t=e.message||(0,y.__)("An error occurred."),o=e instanceof Error;const a={folder_exists:(0,y.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,y.__)("Error installing block. You can reload the page and try again.")};a[e.code]&&(o=!0,t=a[e.code]),n.setErrorNotice(r,t,o),l.dispatch(I.store).createErrorNotice(t,{speak:!0,isDismissible:!0})}return n.setIsInstalling(r,!1),a},A=e=>async t=>{let{registry:l,dispatch:n}=t;try{const t=L(e);await B()({method:"PUT",url:t,data:{status:"inactive"}}),await B()({method:"DELETE",url:t}),n.removeInstalledBlockType(e)}catch(e){l.dispatch(I.store).createErrorNotice(e.message||(0,y.__)("An error occurred."))}};function D(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function R(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function P(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function M(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:l}}function x(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var F=function(){return F=Object.assign||function(e){for(var t,l=1,n=arguments.length;l0&&l>="0"&&l<="9"?"_"+l+n:""+l.toUpperCase()+n}function K(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var l=t.splitRegexp,n=void 0===l?V:l,r=t.stripRegexp,o=void 0===r?H:r,a=t.transform,i=void 0===a?j:a,c=t.delimiter,s=void 0===c?" ":c,d=$($(e,n,"$1\0$2"),o,"\0"),u=0,m=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(m-1);)m--;return d.slice(u,m).split("\0").map(i).join(s)}(e,F({delimiter:"",transform:z},t))}function U(e,t){return 0===t?e.toLowerCase():z(e,t)}const Y=e=>async t=>{let{dispatch:l}=t;if(e)try{l(S(e));const t=await B()({path:`wp/v2/block-directory/search?term=${e}`});l(O(t.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,l]=e;return[(n=t,void 0===r&&(r={}),K(n,F({transform:U},r))),l];var n,r}))))),e))}catch{}},q={reducer:u,selectors:l,actions:n,resolvers:r},G=(0,s.createReduxStore)("core/block-directory",q);function W(){const{uninstallBlockType:e}=(0,s.useDispatch)(G),t=(0,s.useSelect)((e=>{const{isAutosavingPost:t,isSavingPost:l}=e(d.store);return l()&&!t()}),[]),l=(0,s.useSelect)((e=>e(G).getUnusedBlockTypes()),[]);return(0,o.useEffect)((()=>{t&&l.length&&l.forEach((t=>{e(t),(0,c.unregisterBlockType)(t.name)}))}),[t]),null}(0,s.register)(G);var Z=window.wp.compose,Q=window.wp.components,J=window.wp.coreData;function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,o.createElement)(te,{key:`full_stars_${t}`,className:"block-directory-block-ratings__star-full",icon:ne,size:16}))),Array.from({length:r}).map(((e,t)=>(0,o.createElement)(te,{key:`half_stars_${t}`,className:"block-directory-block-ratings__star-half-full",icon:re,size:16}))),Array.from({length:a}).map(((e,t)=>(0,o.createElement)(te,{key:`empty_stars_${t}`,className:"block-directory-block-ratings__star-empty",icon:oe,size:16}))))};var ie=e=>{let{rating:t}=e;return(0,o.createElement)("span",{className:"block-directory-block-ratings"},(0,o.createElement)(ae,{rating:t}))};var ce=function(e){let{icon:t}=e;const l="block-directory-downloadable-block-icon";return null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?(0,o.createElement)("img",{className:l,src:t,alt:""}):(0,o.createElement)(m.BlockIcon,{className:l,icon:t,showColors:!0})};var se=e=>{let{block:t}=e;const l=(0,s.useSelect)((e=>e(G).getErrorNoticeForBlock(t.id)),[t]);return l?(0,o.createElement)("div",{className:"block-directory-downloadable-block-notice"},(0,o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},l.message,l.isFatal?" "+(0,y.__)("Try reloading the page."):null)):null};function de(e,t){let{title:l,rating:n,ratingCount:r}=e,{hasNotice:o,isInstalled:a,isInstalling:i}=t;const c=.5*Math.round(n/.5);return!a&&o?(0,y.sprintf)("Retry installing %s.",(0,ee.decodeEntities)(l)):a?(0,y.sprintf)("Add %s.",(0,ee.decodeEntities)(l)):i?(0,y.sprintf)("Installing %s.",(0,ee.decodeEntities)(l)):r<1?(0,y.sprintf)("Install %s.",(0,ee.decodeEntities)(l)):(0,y.sprintf)((0,y._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",r),(0,ee.decodeEntities)(l),c,r)}var ue=function(e){let{composite:t,item:l,onClick:n}=e;const{author:r,description:a,icon:i,rating:d,title:u}=l,m=!!(0,c.getBlockType)(l.name),{hasNotice:p,isInstalling:b,isInstallable:k}=(0,s.useSelect)((e=>{const{getErrorNoticeForBlock:t,isInstalling:n}=e(G),r=t(l.id),o=r&&r.isFatal;return{hasNotice:!!r,isInstalling:n(l.id),isInstallable:!o}}),[l]);let g="";return m?g=(0,y.__)("Installed!"):b&&(g=(0,y.__)("Installing…")),(0,o.createElement)(Q.__unstableCompositeItem,X({__experimentalIsFocusable:!0,role:"option",as:Q.Button},t,{className:"block-directory-downloadable-block-list-item",onClick:e=>{e.preventDefault(),n()},isBusy:b,disabled:b||!k,label:de(l,{hasNotice:p,isInstalled:m,isInstalling:b}),showTooltip:!0,tooltipPosition:"top center"}),(0,o.createElement)("div",{className:"block-directory-downloadable-block-list-item__icon"},(0,o.createElement)(ce,{icon:i,title:u}),b?(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__spinner"},(0,o.createElement)(Q.Spinner,null)):(0,o.createElement)(ie,{rating:d})),(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__details"},(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__title"},(0,o.createInterpolateElement)((0,y.sprintf)((0,y.__)("%1$s by %2$s"),(0,ee.decodeEntities)(u),r),{span:(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__author"})})),p?(0,o.createElement)(se,{block:l}):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__desc"},g||(0,ee.decodeEntities)(a)),k&&!(m||b)&&(0,o.createElement)(Q.VisuallyHidden,null,(0,y.__)("Install block")))))};const me=()=>{};var pe=function(e){let{items:t,onHover:l=me,onSelect:n}=e;const r=(0,Q.__unstableUseCompositeState)(),{installBlockType:a}=(0,s.useDispatch)(G);return t.length?(0,o.createElement)(Q.__unstableComposite,X({},r,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,y.__)("Blocks available for install")}),t.map((e=>(0,o.createElement)(ue,{key:e.id,composite:r,onClick:()=>{(0,c.getBlockType)(e.name)?n(e):a(e).then((t=>{t&&n(e)})),l(null)},onHover:l,item:e})))):null},be=window.wp.a11y;var ke=function(e){let{children:t,downloadableItems:l,hasLocalBlocks:n}=e;const r=l.length;return(0,o.useEffect)((()=>{(0,be.speak)((0,y.sprintf)((0,y._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))}),[r]),(0,o.createElement)(o.Fragment,null,!n&&(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,y.__)("No results available from your installed blocks.")),(0,o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel"},(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel__header"},(0,o.createElement)("h2",{className:"block-directory-downloadable-blocks-panel__title"},(0,y.__)("Available to install")),(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},(0,y.__)("Select a block to install and add it to your post."))),t))};var ge=(0,o.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(le.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"}));var fe=function(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"block-editor-inserter__no-results"},(0,o.createElement)(te,{className:"block-editor-inserter__no-results-icon",icon:ge}),(0,o.createElement)("p",null,(0,y.__)("No results found."))),(0,o.createElement)("div",{className:"block-editor-inserter__tips"},(0,o.createElement)(Q.Tip,null,(0,y.__)("Interested in creating your own block?"),(0,o.createElement)("br",null),(0,o.createElement)(Q.ExternalLink,{href:"https://developer.wordpress.org/block-editor/"},(0,y.__)("Get started here"),"."))))};var _e=(0,Z.compose)([(0,s.withSelect)(((e,t)=>{let{filterValue:l,rootClientId:n=null}=t;const{getDownloadableBlocks:r,isRequestingDownloadableBlocks:o}=e(G),{canInsertBlockType:a}=e(m.store),i=e(J.store).canUser("read","block-directory/search");return{downloadableItems:i?r(l).filter((e=>a(e,n,!0))):[],hasPermission:i,isLoading:o(l)}}))])((function(e){let{downloadableItems:t,onSelect:l,onHover:n,hasLocalBlocks:r,hasPermission:a,isLoading:i,isTyping:c}=e;return void 0===a||i||c?(0,o.createElement)(o.Fragment,null,a&&!r&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,y.__)("No results available from your installed blocks.")),(0,o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"})),(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading"},(0,o.createElement)(Q.Spinner,null))):!1===a?r?null:(0,o.createElement)(fe,null):t.length?(0,o.createElement)(ke,{downloadableItems:t,hasLocalBlocks:r},(0,o.createElement)(pe,{items:t,onSelect:l,onHover:n})):!r&&(0,o.createElement)(fe,null)}));var we,Ee,he,ye=function(){const[e,t]=(0,o.useState)(""),l=(0,Z.debounce)(t,400);return(0,o.createElement)(m.__unstableInserterMenuExtension,null,(t=>{let{onSelect:n,onHover:r,filterValue:a,hasItems:i,rootClientId:c}=t;return e!==a&&l(a),e?(0,o.createElement)(_e,{onSelect:n,onHover:r,rootClientId:c,filterValue:e,hasLocalBlocks:i,isTyping:a!==e}):null}))};function ve(e){let{items:t}=e;return t.length?(0,o.createElement)("ul",{className:"block-directory-compact-list"},t.map((e=>{let{icon:t,id:l,title:n,author:r}=e;return(0,o.createElement)("li",{key:l,className:"block-directory-compact-list__item"},(0,o.createElement)(ce,{icon:t,title:n}),(0,o.createElement)("div",{className:"block-directory-compact-list__item-details"},(0,o.createElement)("div",{className:"block-directory-compact-list__item-title"},n),(0,o.createElement)("div",{className:"block-directory-compact-list__item-author"},(0,y.sprintf)((0,y.__)("By %s"),r))))}))):null}const{PluginPrePublishPanel:Be}=null!==(we=null===(Ee=window)||void 0===Ee||null===(he=Ee.wp)||void 0===he?void 0:he.editPost)&&void 0!==we?we:{};function Ie(){const e=(0,s.useSelect)((e=>e(G).getNewBlockTypes()),[]);return e.length?(0,o.createElement)(Be,{icon:ge,title:(0,y.sprintf)((0,y._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},(0,o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},(0,y._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),(0,o.createElement)(ve,{items:e})):null}function Ne(e){let{attributes:t,block:l,clientId:n}=e;const r=(0,s.useSelect)((e=>e(G).isInstalling(l.id)),[l.id]),{installBlockType:a}=(0,s.useDispatch)(G),{replaceBlock:i}=(0,s.useDispatch)(m.store);return(0,o.createElement)(Q.Button,{onClick:()=>a(l).then((e=>{if(e){const e=(0,c.getBlockType)(l.name),[r]=(0,c.parse)(t.originalContent);r&&e&&i(n,(0,c.createBlock)(e.name,r.attributes,r.innerBlocks))}})),disabled:r,isBusy:r,variant:"primary"},(0,y.sprintf)((0,y.__)("Install %s"),l.title))}const Te=e=>{let{originalBlock:t,...l}=e;const{originalName:n,originalUndelimitedContent:r,clientId:a}=l.attributes,{replaceBlock:i}=(0,s.useDispatch)(m.store),d=()=>{i(l.clientId,(0,c.createBlock)("core/html",{content:r}))},u=!!r,p=(0,s.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:l}=e(m.store);return t("core/html",l(a))}),[a]);let b=(0,y.sprintf)((0,y.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),t.title||n);const k=[(0,o.createElement)(Ne,{key:"install",block:t,attributes:l.attributes,clientId:l.clientId})];return u&&p&&(b=(0,y.sprintf)((0,y.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||n),k.push((0,o.createElement)(Q.Button,{key:"convert",onClick:d,variant:"tertiary"},(0,y.__)("Keep as HTML")))),(0,o.createElement)("div",(0,m.useBlockProps)(),(0,o.createElement)(m.Warning,{actions:k},b),(0,o.createElement)(o.RawHTML,null,r))};var Le=e=>t=>{const{originalName:l}=t.attributes,{block:n,hasPermission:r}=(0,s.useSelect)((e=>{const{getDownloadableBlocks:t}=e(G),n=t("block:"+l).filter((e=>{let{name:t}=e;return l===t}));return{hasPermission:e(J.store).canUser("read","block-directory/search"),block:n.length&&n[0]}}),[l]);return r&&n?(0,o.createElement)(Te,X({},t,{originalBlock:n})):(0,o.createElement)(e,t)};(0,a.registerPlugin)("block-directory",{render(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(W,null),(0,o.createElement)(ye,null),(0,o.createElement)(Ie,null))}}),(0,i.addFilter)("blocks.registerBlockType","block-directory/fallback",((e,t)=>("core/missing"!==t||(e.edit=Le(e.edit)),e))),(window.wp=window.wp||{}).blockDirectory=t}(); \ No newline at end of file +!function(){"use strict";var e={n:function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,{a:l}),l},d:function(t,l){for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{store:function(){return G}});var l={};e.r(l),e.d(l,{getDownloadableBlocks:function(){return k},getErrorNoticeForBlock:function(){return h},getErrorNotices:function(){return E},getInstalledBlockTypes:function(){return g},getNewBlockTypes:function(){return f},getUnusedBlockTypes:function(){return _},isInstalling:function(){return w},isRequestingDownloadableBlocks:function(){return b}});var n={};e.r(n),e.d(n,{addInstalledBlockType:function(){return D},clearErrorNotice:function(){return x},fetchDownloadableBlocks:function(){return S},installBlockType:function(){return C},receiveDownloadableBlocks:function(){return O},removeInstalledBlockType:function(){return R},setErrorNotice:function(){return M},setIsInstalling:function(){return P},uninstallBlockType:function(){return A}});var r={};e.r(r),e.d(r,{getDownloadableBlocks:function(){return Y}});var o=window.wp.element,a=window.wp.plugins,i=window.wp.hooks,c=window.wp.blocks,s=window.wp.data,d=window.wp.editor;var u=(0,s.combineReducers)({downloadableBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},blockManagement:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter((e=>e.name!==t.item.name))};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},errorNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":const{[t.blockId]:l,...n}=e;return n}return e}}),m=window.wp.blockEditor;function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((t=>{let{name:l}=t;return l===e.name})))return!0;for(let l=0;lt=>{const l=e(m.store).getBlocks();return g(t).filter((e=>p(e,l)))})),_=(0,s.createRegistrySelector)((e=>t=>{const l=e(m.store).getBlocks();return g(t).filter((e=>!p(e,l)))}));function w(e,t){return e.blockManagement.isInstalling[t]||!1}function E(e){return e.errorNotices}function h(e,t){return e.errorNotices[t]}var y=window.wp.i18n,v=window.wp.apiFetch,B=e.n(v),I=window.wp.notices,N=window.wp.url;const T=e=>new Promise(((t,l)=>{const n=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((t=>{e[t]&&(n[t]=e[t])})),e.innerHTML&&n.appendChild(document.createTextNode(e.innerHTML)),n.onload=()=>t(!0),n.onerror=()=>l(new Error("Error loading asset.")),document.body.appendChild(n),("link"===n.nodeName.toLowerCase()||"script"===n.nodeName.toLowerCase()&&!n.src)&&t()}));function L(e){if(!e)return!1;const t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}function S(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function O(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}const C=e=>async t=>{let{registry:l,dispatch:n}=t;const{id:r,name:o}=e;let a=!1;n.clearErrorNotice(r);try{n.setIsInstalling(r,!0);const t=L(e);let i={};if(t)await B()({method:"PUT",url:t,data:{status:"active"}});else{i=(await B()({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links}n.addInstalledBlockType({...e,links:{...e.links,...i}});const s=["api_version","title","category","parent","icon","description","keywords","attributes","provides_context","uses_context","supports","styles","example","variations"];await B()({path:(0,N.addQueryArgs)(`/wp/v2/block-types/${o}`,{_fields:s})}).catch((()=>{})).then((e=>{e&&(0,c.unstable__bootstrapServerSideBlockDefinitions)({[o]:Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return s.includes(t)})))})})),await async function(){const e=await B()({url:document.location.href,parse:!1}),t=await e.text(),l=(new window.DOMParser).parseFromString(t,"text/html"),n=Array.from(l.querySelectorAll('link[rel="stylesheet"],script')).filter((e=>e.id&&!document.getElementById(e.id)));for(const e of n)await T(e)}();if(!l.select(c.store).getBlockTypes().some((e=>e.name===o)))throw new Error((0,y.__)("Error registering block. Try reloading the page."));l.dispatch(I.store).createInfoNotice((0,y.sprintf)((0,y.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),a=!0}catch(e){let t=e.message||(0,y.__)("An error occurred."),o=e instanceof Error;const a={folder_exists:(0,y.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,y.__)("Error installing block. You can reload the page and try again.")};a[e.code]&&(o=!0,t=a[e.code]),n.setErrorNotice(r,t,o),l.dispatch(I.store).createErrorNotice(t,{speak:!0,isDismissible:!0})}return n.setIsInstalling(r,!1),a},A=e=>async t=>{let{registry:l,dispatch:n}=t;try{const t=L(e);await B()({method:"PUT",url:t,data:{status:"inactive"}}),await B()({method:"DELETE",url:t}),n.removeInstalledBlockType(e)}catch(e){l.dispatch(I.store).createErrorNotice(e.message||(0,y.__)("An error occurred."))}};function D(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function R(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function P(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function M(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:l}}function x(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var F=function(){return F=Object.assign||function(e){for(var t,l=1,n=arguments.length;l0&&l>="0"&&l<="9"?"_"+l+n:""+l.toUpperCase()+n}function K(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var l=t.splitRegexp,n=void 0===l?j:l,r=t.stripRegexp,o=void 0===r?H:r,a=t.transform,i=void 0===a?V:a,c=t.delimiter,s=void 0===c?" ":c,d=$($(e,n,"$1\0$2"),o,"\0"),u=0,m=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(m-1);)m--;return d.slice(u,m).split("\0").map(i).join(s)}(e,F({delimiter:"",transform:z},t))}function U(e,t){return 0===t?e.toLowerCase():z(e,t)}const Y=e=>async t=>{let{dispatch:l}=t;if(e)try{l(S(e));const t=await B()({path:`wp/v2/block-directory/search?term=${e}`});l(O(t.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,l]=e;return[(n=t,void 0===r&&(r={}),K(n,F({transform:U},r))),l];var n,r}))))),e))}catch{}},q={reducer:u,selectors:l,actions:n,resolvers:r},G=(0,s.createReduxStore)("core/block-directory",q);function W(){const{uninstallBlockType:e}=(0,s.useDispatch)(G),t=(0,s.useSelect)((e=>{const{isAutosavingPost:t,isSavingPost:l}=e(d.store);return l()&&!t()}),[]),l=(0,s.useSelect)((e=>e(G).getUnusedBlockTypes()),[]);return(0,o.useEffect)((()=>{t&&l.length&&l.forEach((t=>{e(t),(0,c.unregisterBlockType)(t.name)}))}),[t]),null}(0,s.register)(G);var Z=window.wp.compose,Q=window.wp.components,J=window.wp.coreData;function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,o.createElement)(te,{key:`full_stars_${t}`,className:"block-directory-block-ratings__star-full",icon:ne,size:16}))),Array.from({length:r}).map(((e,t)=>(0,o.createElement)(te,{key:`half_stars_${t}`,className:"block-directory-block-ratings__star-half-full",icon:re,size:16}))),Array.from({length:a}).map(((e,t)=>(0,o.createElement)(te,{key:`empty_stars_${t}`,className:"block-directory-block-ratings__star-empty",icon:oe,size:16}))))};var ie=e=>{let{rating:t}=e;return(0,o.createElement)("span",{className:"block-directory-block-ratings"},(0,o.createElement)(ae,{rating:t}))};var ce=function(e){let{icon:t}=e;const l="block-directory-downloadable-block-icon";return null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?(0,o.createElement)("img",{className:l,src:t,alt:""}):(0,o.createElement)(m.BlockIcon,{className:l,icon:t,showColors:!0})};var se=e=>{let{block:t}=e;const l=(0,s.useSelect)((e=>e(G).getErrorNoticeForBlock(t.id)),[t]);return l?(0,o.createElement)("div",{className:"block-directory-downloadable-block-notice"},(0,o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},l.message,l.isFatal?" "+(0,y.__)("Try reloading the page."):null)):null};function de(e,t){let{title:l,rating:n,ratingCount:r}=e,{hasNotice:o,isInstalled:a,isInstalling:i}=t;const c=.5*Math.round(n/.5);return!a&&o?(0,y.sprintf)("Retry installing %s.",(0,ee.decodeEntities)(l)):a?(0,y.sprintf)("Add %s.",(0,ee.decodeEntities)(l)):i?(0,y.sprintf)("Installing %s.",(0,ee.decodeEntities)(l)):r<1?(0,y.sprintf)("Install %s.",(0,ee.decodeEntities)(l)):(0,y.sprintf)((0,y._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",r),(0,ee.decodeEntities)(l),c,r)}var ue=function(e){let{composite:t,item:l,onClick:n}=e;const{author:r,description:a,icon:i,rating:d,title:u}=l,m=!!(0,c.getBlockType)(l.name),{hasNotice:p,isInstalling:b,isInstallable:k}=(0,s.useSelect)((e=>{const{getErrorNoticeForBlock:t,isInstalling:n}=e(G),r=t(l.id),o=r&&r.isFatal;return{hasNotice:!!r,isInstalling:n(l.id),isInstallable:!o}}),[l]);let g="";return m?g=(0,y.__)("Installed!"):b&&(g=(0,y.__)("Installing…")),(0,o.createElement)(Q.__unstableCompositeItem,X({__experimentalIsFocusable:!0,role:"option",as:Q.Button},t,{className:"block-directory-downloadable-block-list-item",onClick:e=>{e.preventDefault(),n()},isBusy:b,disabled:b||!k,label:de(l,{hasNotice:p,isInstalled:m,isInstalling:b}),showTooltip:!0,tooltipPosition:"top center"}),(0,o.createElement)("div",{className:"block-directory-downloadable-block-list-item__icon"},(0,o.createElement)(ce,{icon:i,title:u}),b?(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__spinner"},(0,o.createElement)(Q.Spinner,null)):(0,o.createElement)(ie,{rating:d})),(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__details"},(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__title"},(0,o.createInterpolateElement)((0,y.sprintf)((0,y.__)("%1$s by %2$s"),(0,ee.decodeEntities)(u),r),{span:(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__author"})})),p?(0,o.createElement)(se,{block:l}):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"block-directory-downloadable-block-list-item__desc"},g||(0,ee.decodeEntities)(a)),k&&!(m||b)&&(0,o.createElement)(Q.VisuallyHidden,null,(0,y.__)("Install block")))))};const me=()=>{};var pe=function(e){let{items:t,onHover:l=me,onSelect:n}=e;const r=(0,Q.__unstableUseCompositeState)(),{installBlockType:a}=(0,s.useDispatch)(G);return t.length?(0,o.createElement)(Q.__unstableComposite,X({},r,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,y.__)("Blocks available for install")}),t.map((e=>(0,o.createElement)(ue,{key:e.id,composite:r,onClick:()=>{(0,c.getBlockType)(e.name)?n(e):a(e).then((t=>{t&&n(e)})),l(null)},onHover:l,item:e})))):null},be=window.wp.a11y;var ke=function(e){let{children:t,downloadableItems:l,hasLocalBlocks:n}=e;const r=l.length;return(0,o.useEffect)((()=>{(0,be.speak)((0,y.sprintf)((0,y._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))}),[r]),(0,o.createElement)(o.Fragment,null,!n&&(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,y.__)("No results available from your installed blocks.")),(0,o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel"},(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel__header"},(0,o.createElement)("h2",{className:"block-directory-downloadable-blocks-panel__title"},(0,y.__)("Available to install")),(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},(0,y.__)("Select a block to install and add it to your post."))),t))};var ge=(0,o.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(le.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"}));var fe=function(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"block-editor-inserter__no-results"},(0,o.createElement)(te,{className:"block-editor-inserter__no-results-icon",icon:ge}),(0,o.createElement)("p",null,(0,y.__)("No results found."))),(0,o.createElement)("div",{className:"block-editor-inserter__tips"},(0,o.createElement)(Q.Tip,null,(0,y.__)("Interested in creating your own block?"),(0,o.createElement)("br",null),(0,o.createElement)(Q.ExternalLink,{href:"https://developer.wordpress.org/block-editor/"},(0,y.__)("Get started here"),"."))))};var _e=(0,Z.compose)([(0,s.withSelect)(((e,t)=>{let{filterValue:l,rootClientId:n=null}=t;const{getDownloadableBlocks:r,isRequestingDownloadableBlocks:o}=e(G),{canInsertBlockType:a}=e(m.store),i=e(J.store).canUser("read","block-directory/search");return{downloadableItems:i?r(l).filter((e=>a(e,n,!0))):[],hasPermission:i,isLoading:o(l)}}))])((function(e){let{downloadableItems:t,onSelect:l,onHover:n,hasLocalBlocks:r,hasPermission:a,isLoading:i,isTyping:c}=e;return void 0===a||i||c?(0,o.createElement)(o.Fragment,null,a&&!r&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,y.__)("No results available from your installed blocks.")),(0,o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"})),(0,o.createElement)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading"},(0,o.createElement)(Q.Spinner,null))):!1===a?r?null:(0,o.createElement)(fe,null):t.length?(0,o.createElement)(ke,{downloadableItems:t,hasLocalBlocks:r},(0,o.createElement)(pe,{items:t,onSelect:l,onHover:n})):!r&&(0,o.createElement)(fe,null)}));var we,Ee,he,ye=function(){const[e,t]=(0,o.useState)(""),l=(0,Z.debounce)(t,400);return(0,o.createElement)(m.__unstableInserterMenuExtension,null,(t=>{let{onSelect:n,onHover:r,filterValue:a,hasItems:i,rootClientId:c}=t;return e!==a&&l(a),e?(0,o.createElement)(_e,{onSelect:n,onHover:r,rootClientId:c,filterValue:e,hasLocalBlocks:i,isTyping:a!==e}):null}))};function ve(e){let{items:t}=e;return t.length?(0,o.createElement)("ul",{className:"block-directory-compact-list"},t.map((e=>{let{icon:t,id:l,title:n,author:r}=e;return(0,o.createElement)("li",{key:l,className:"block-directory-compact-list__item"},(0,o.createElement)(ce,{icon:t,title:n}),(0,o.createElement)("div",{className:"block-directory-compact-list__item-details"},(0,o.createElement)("div",{className:"block-directory-compact-list__item-title"},n),(0,o.createElement)("div",{className:"block-directory-compact-list__item-author"},(0,y.sprintf)((0,y.__)("By %s"),r))))}))):null}const{PluginPrePublishPanel:Be}=null!==(we=null===(Ee=window)||void 0===Ee||null===(he=Ee.wp)||void 0===he?void 0:he.editPost)&&void 0!==we?we:{};function Ie(){const e=(0,s.useSelect)((e=>e(G).getNewBlockTypes()),[]);return e.length?(0,o.createElement)(Be,{icon:ge,title:(0,y.sprintf)((0,y._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},(0,o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},(0,y._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),(0,o.createElement)(ve,{items:e})):null}function Ne(e){let{attributes:t,block:l,clientId:n}=e;const r=(0,s.useSelect)((e=>e(G).isInstalling(l.id)),[l.id]),{installBlockType:a}=(0,s.useDispatch)(G),{replaceBlock:i}=(0,s.useDispatch)(m.store);return(0,o.createElement)(Q.Button,{onClick:()=>a(l).then((e=>{if(e){const e=(0,c.getBlockType)(l.name),[r]=(0,c.parse)(t.originalContent);r&&e&&i(n,(0,c.createBlock)(e.name,r.attributes,r.innerBlocks))}})),disabled:r,isBusy:r,variant:"primary"},(0,y.sprintf)((0,y.__)("Install %s"),l.title))}const Te=e=>{let{originalBlock:t,...l}=e;const{originalName:n,originalUndelimitedContent:r,clientId:a}=l.attributes,{replaceBlock:i}=(0,s.useDispatch)(m.store),d=()=>{i(l.clientId,(0,c.createBlock)("core/html",{content:r}))},u=!!r,p=(0,s.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:l}=e(m.store);return t("core/html",l(a))}),[a]);let b=(0,y.sprintf)((0,y.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),t.title||n);const k=[(0,o.createElement)(Ne,{key:"install",block:t,attributes:l.attributes,clientId:l.clientId})];return u&&p&&(b=(0,y.sprintf)((0,y.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||n),k.push((0,o.createElement)(Q.Button,{key:"convert",onClick:d,variant:"tertiary"},(0,y.__)("Keep as HTML")))),(0,o.createElement)("div",(0,m.useBlockProps)(),(0,o.createElement)(m.Warning,{actions:k},b),(0,o.createElement)(o.RawHTML,null,r))};var Le=e=>t=>{const{originalName:l}=t.attributes,{block:n,hasPermission:r}=(0,s.useSelect)((e=>{const{getDownloadableBlocks:t}=e(G),n=t("block:"+l).filter((e=>{let{name:t}=e;return l===t}));return{hasPermission:e(J.store).canUser("read","block-directory/search"),block:n.length&&n[0]}}),[l]);return r&&n?(0,o.createElement)(Te,X({},t,{originalBlock:n})):(0,o.createElement)(e,t)};(0,a.registerPlugin)("block-directory",{render(){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(W,null),(0,o.createElement)(ye,null),(0,o.createElement)(Ie,null))}}),(0,i.addFilter)("blocks.registerBlockType","block-directory/fallback",((e,t)=>("core/missing"!==t||(e.edit=Le(e.edit)),e))),(window.wp=window.wp||{}).blockDirectory=t}(); \ No newline at end of file diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index b2e7e307ed..e46bca9e9d 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -13138,7 +13138,10 @@ module.exports = function inspect_(obj, options, depth, seen) { if (typeof window !== 'undefined' && obj === window) { return '{ [object Window] }'; } - if (obj === __webpack_require__.g) { + if ( + (typeof globalThis !== 'undefined' && obj === globalThis) + || (typeof __webpack_require__.g !== 'undefined' && obj === __webpack_require__.g) + ) { return '{ [object globalThis] }'; } if (!isDate(obj) && !isRegExp(obj)) { @@ -17768,19 +17771,15 @@ function migrateLightBlockWrapper(settings) { ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - return target; - }; - return _extends.apply(this, arguments); + return n; + }, _extends.apply(null, arguments); } + ;// CONCATENATED MODULE: external ["wp","element"] var external_wp_element_namespaceObject = window["wp"]["element"]; // EXTERNAL MODULE: ./node_modules/classnames/index.js diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index eb3d9df070..964c480727 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -18,12 +18,12 @@ * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT - */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint: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:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("᠎"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="᠎";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?y(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function v(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e1?arguments[1]:g,this.value=e}function b(e){var t=arguments.length>1?arguments[1]:g;return new v(e,t)}v.prototype.get=function(e){for(var t=this.value,n=0;t&&n-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),m=n(1586),y=n(817),g=n(3842),h=n(6740),v=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var b,_=n.length,k=p(e);b=k===-1/0?0:k<0?a(_+k,0):s(k,_);var E,S=void 0===t?_:p(t);E=S===-1/0?0:S<0?a(_+S,0):s(S,_);var w=a(E-b,0),C=y(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(m(n)===m(C))for(var I=h(n),A=h(C),x=f(n),B=b*x+v(n),P=v(C),T=P+w*x;P-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,C=Array.prototype.slice,I=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-I(-e):I(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var R=n(5794),F=R.custom,L=V(F)?F:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return b.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return _?M(t,E):E}if("bigint"==typeof t){var I=String(t)+"n";return _?M(t,I):I}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var F=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=C.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return F&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+Z(ie,F)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(S.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&y){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:x-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,F)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,F)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return J(G(A.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(m.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?v.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":F?fe+"{"+Z(ce,F)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return y.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+r}return D(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?t:"Object"===t&&function(e){var t=!1;return r(y,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(y,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t0&&!o.call(e,0))for(var y=0;y0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint: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:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8198)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5467:function(e,t,n){"use strict";var r=n(7998),o=n(6245),i=n(6907)("String.prototype.replace"),l=/^\s$/.test("᠎"),a=l?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=l?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),s,"")}},4113:function(e,t,n){"use strict";var r=n(7618),o=n(5213),i=n(7998),l=n(5467),a=n(5626),s=n(1029),c=r(a()),u=function(e){return i(e),c(e)};o(u,{getPolyfill:a,implementation:l,shim:s}),e.exports=u},6907:function(e,t,n){"use strict";var r=n(5037),o=n(7618),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},7618:function(e,t,n){"use strict";var r=n(1769),o=n(5037),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},5213:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5570:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5889);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5889:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5626:function(e,t,n){"use strict";var r=n(5467),o="᠎";e.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&o.trim()===o&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:r}},1029:function(e,t,n){"use strict";var r=n(5213),o=n(5626);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?y(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function v(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e1?arguments[1]:g,this.value=e}function b(e){var t=arguments.length>1?arguments[1]:g;return new v(e,t)}v.prototype.get=function(e){for(var t=this.value,n=0;t&&n-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),m=n(1586),y=n(817),g=n(3842),h=n(6740),v=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var b,_=n.length,k=p(e);b=k===-1/0?0:k<0?a(_+k,0):s(k,_);var E,S=void 0===t?_:p(t);E=S===-1/0?0:S<0?a(_+S,0):s(S,_);var w=a(E-b,0),C=y(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(m(n)===m(C))for(var I=h(n),A=h(C),x=f(n),B=b*x+v(n),P=v(C),T=P+w*x;P-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,C=Array.prototype.slice,I=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-I(-e):I(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var R=n(5794),F=R.custom,L=V(F)?F:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return b.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var y=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof y&&"symbol"!==y)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return _?M(t,E):E}if("bigint"==typeof t){var I=String(t)+"n";return _?M(t,I):I}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var F=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=C.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(V(t)){var te=P?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,G);return F&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+Z(ie,F)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=X(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(S.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&y){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:x-o});if("symbol"!==y&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,F)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,F)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return J(G(A.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(m.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!z(t)){var ce=X(t,G),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?v.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":F?fe+"{"+Z(ce,F)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return y.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(v.call(e,0,t.maxStringLength),t)+r}return D(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?t:"Object"===t&&function(e){var t=!1;return r(y,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(y,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,A([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,m);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[m]}else d=I(l,m),l=l[m];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var v,b=m.size["$"+n];if(!b)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");v=a(new l(e,t),0,b);var _=arguments.length>5?arguments[5]:"little"===y,k=_?a(f([0,0,0,0,0,0,0,0],v),-b):a(f(v,[0,0,0,0,0,0,0,0]),0,b);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),m=n(3647),y=n(7511),g=n(1520),h=n(806),v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},b={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(v,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(v));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return m(t,n);if("FLOAT64"===e)return y(t,n);var i=v[e],l=(0,b[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),m=n(7604),y=n(2367),g=n(8172),h=n(1824),v=o("Array.prototype.reverse"),b=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=b(t,0,r),n||v(t),"FLOAT32"===e?f(t):"FLOAT64"===e?m(t):y(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),m=n(2170),y=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,v){var b=d(e);if(!p(e)&&!b)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(m.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==v&&"UNORDERED"!==v&&"INIT"!==v)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=m.size["$"+n],k=arguments.length>6?arguments[6]:"little"===y,E=u(n,r,k);if(b)throw new o("SharedArrayBuffer is not supported by this implementation");var S=new l(e,t,_);g(E,(function(e,t){S[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),m=c(new i("["+["…","​","￾"].join("")+"]","g")),y=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(m(t)||f(t))return NaN;var n=y(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return na+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,m=255&(d>>=8),y=255&(d>>=8),g=255&(d>>=8);return t?[f,m,y,g]:[g,y,m,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,m="11111111111",y="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=m,r="1"+g;else if(isFinite(e))if(0===e)n=y,r="0"+g;else{e=i(e);var h,v=l(e),b=p(v),_=u(e-v);if(b)n=b.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=b+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(y+p(n+f),-11),r=c(r+g+"0",0,52)}else n=m,r="0"+g;for(var E=a+n+r,S=[],w=0;w<8;w++){S[t?8-w-1:w]=o(c(E,8*w,8*(w+1)),2)}return S}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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 r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return mk},AlignmentToolbar:function(){return yk},Autocomplete:function(){return Ck},BlockAlignmentControl:function(){return El},BlockAlignmentToolbar:function(){return Sl},BlockBreadcrumb:function(){return Tk},BlockColorsStyleSelector:function(){return Rk},BlockContextProvider:function(){return Fl},BlockControls:function(){return Ur},BlockEdit:function(){return jl},BlockEditorKeyboardShortcuts:function(){return rI},BlockEditorProvider:function(){return Sp},BlockFormatControls:function(){return Dr},BlockIcon:function(){return hp},BlockInspector:function(){return YC},BlockList:function(){return Jh},BlockMover:function(){return ky},BlockNavigationDropdown:function(){return iE},BlockPreview:function(){return tf},BlockSelectionClearer:function(){return Cp},BlockSettingsMenu:function(){return $g},BlockSettingsMenuControls:function(){return zg},BlockStyles:function(){return cE},BlockTitle:function(){return uy},BlockToolbar:function(){return th},BlockTools:function(){return XC},BlockVerticalAlignmentControl:function(){return Li},BlockVerticalAlignmentToolbar:function(){return Di},ButtonBlockAppender:function(){return Jm},ButtonBlockerAppender:function(){return qm},ColorPalette:function(){return IE},ColorPaletteControl:function(){return AE},ContrastChecker:function(){return Gv},CopyHandler:function(){return sg},DefaultBlockAppender:function(){return $m},FontSizePicker:function(){return Tb},HeightControl:function(){return ni},InnerBlocks:function(){return Hh},Inserter:function(){return Wm},InspectorAdvancedControls:function(){return Ho},InspectorControls:function(){return Wo},JustifyContentControl:function(){return zi},JustifyToolbar:function(){return Vi},LineHeightControl:function(){return fb},MediaPlaceholder:function(){return bw},MediaReplaceFlow:function(){return dw},MediaUpload:function(){return Am},MediaUploadCheck:function(){return Im},MultiSelectScrollIntoView:function(){return oI},NavigableToolbar:function(){return Cy},ObserveTyping:function(){return sI},PanelColorSettings:function(){return _w},PlainText:function(){return eC},RichText:function(){return Qw},RichTextShortcut:function(){return rC},RichTextToolbarButton:function(){return oC},SETTINGS_DEFAULTS:function(){return E},SkipToSelectedBlock:function(){return EC},ToolSelector:function(){return aC},Typewriter:function(){return dI},URLInput:function(){return CS},URLInputButton:function(){return pC},URLPopover:function(){return gw},Warning:function(){return Vl},WritingFlow:function(){return Up},__experimentalBlockAlignmentMatrixControl:function(){return Bk},__experimentalBlockFullHeightAligmentControl:function(){return Ak},__experimentalBlockPatternSetup:function(){return kE},__experimentalBlockPatternsList:function(){return wf},__experimentalBlockVariationPicker:function(){return pE},__experimentalBlockVariationTransforms:function(){return wE},__experimentalBorderRadiusControl:function(){return cv},__experimentalColorGradientControl:function(){return Dv},__experimentalColorGradientSettingsDropdown:function(){return Vv},__experimentalDateFormatPicker:function(){return PE},__experimentalDuotoneControl:function(){return I_},__experimentalFontAppearanceControl:function(){return ub},__experimentalFontFamilyControl:function(){return Sb},__experimentalGetBorderClassesAndStyles:function(){return W_},__experimentalGetColorClassesAndStyles:function(){return K_},__experimentalGetElementClassName:function(){return _I},__experimentalGetGapCSSValue:function(){return Ii},__experimentalGetGradientClass:function(){return Av},__experimentalGetGradientObjectByGradientValue:function(){return Bv},__experimentalGetMatchingVariation:function(){return EI},__experimentalGetSpacingClassesAndStyles:function(){return Y_},__experimentalImageEditor:function(){return mS},__experimentalImageSizeControl:function(){return hS},__experimentalImageURLInputUI:function(){return bC},__experimentalInspectorPopoverHeader:function(){return hI},__experimentalLayoutStyle:function(){return ul},__experimentalLetterSpacingControl:function(){return a_},__experimentalLibrary:function(){return tI},__experimentalLinkControl:function(){return lw},__experimentalLinkControlSearchInput:function(){return qS},__experimentalLinkControlSearchItem:function(){return MS},__experimentalLinkControlSearchResults:function(){return jS},__experimentalListView:function(){return rE},__experimentalPanelColorGradientSettings:function(){return RE},__experimentalPreviewOptions:function(){return _C},__experimentalPublishDateTimePicker:function(){return vI},__experimentalRecursionProvider:function(){return mI},__experimentalResponsiveBlockControl:function(){return nC},__experimentalSpacingSizesControl:function(){return Co},__experimentalTextDecorationControl:function(){return Jb},__experimentalTextTransformControl:function(){return r_},__experimentalUnitControl:function(){return sC},__experimentalUseBlockOverlayActive:function(){return rp},__experimentalUseBlockPreview:function(){return nf},__experimentalUseBorderProps:function(){return $_},__experimentalUseColorProps:function(){return J_},__experimentalUseCustomSides:function(){return Ei},__experimentalUseGradient:function(){return Tv},__experimentalUseHasRecursion:function(){return yI},__experimentalUseMultipleOriginColorsAndGradients:function(){return mv},__experimentalUseResizeCanvas:function(){return kC},__experimentaluseLayoutClasses:function(){return M_},__experimentaluseLayoutStyles:function(){return R_},__unstableBlockNameContext:function(){return eh},__unstableBlockSettingsMenuFirstItem:function(){return Ag},__unstableBlockToolbarLastItem:function(){return og},__unstableDuotoneFilter:function(){return Jd},__unstableDuotoneStylesheet:function(){return Kd},__unstableDuotoneUnsetStylesheet:function(){return qd},__unstableEditorStyles:function(){return Wd},__unstableGetValuesFromColors:function(){return $d},__unstableIframe:function(){return Vp},__unstableInserterMenuExtension:function(){return Om},__unstablePresetDuotoneFilter:function(){return Yd},__unstableRichTextInputEvent:function(){return iC},__unstableUseBlockSelectionClearer:function(){return wp},__unstableUseClipboardHandler:function(){return ag},__unstableUseMouseMoveTypingReset:function(){return lI},__unstableUseTypewriter:function(){return pI},__unstableUseTypingObserver:function(){return aI},createCustomColorsHOC:function(){return rk},getColorClassName:function(){return fv},getColorObjectByAttributeValues:function(){return pv},getColorObjectByColorValue:function(){return dv},getComputedFluidTypographyValue:function(){return Fb},getFontSize:function(){return xb},getFontSizeClass:function(){return Pb},getFontSizeObjectByValue:function(){return Bb},getGradientSlugByValue:function(){return Pv},getGradientValueBySlug:function(){return xv},getPxFromCssUnit:function(){return OI},getTypographyClassesAndStyles:function(){return Q_},privateApis:function(){return MA},store:function(){return xr},storeConfig:function(){return Ar},transformStyles:function(){return Vd},useBlockDisplayInformation:function(){return sy},useBlockEditContext:function(){return Nr},useBlockProps:function(){return op},useCachedTruthy:function(){return Z_},useInnerBlocksProps:function(){return Gh},useSetting:function(){return yo},withColorContext:function(){return CE},withColors:function(){return ok},withFontSizes:function(){return ak}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Qt},__experimentalGetAllowedBlocks:function(){return Bt},__experimentalGetAllowedPatterns:function(){return Nt},__experimentalGetBlockListSettingsForBlocks:function(){return jt},__experimentalGetDirectInsertBlock:function(){return Pt},__experimentalGetGlobalBlocksByName:function(){return se},__experimentalGetLastBlockAttributeChanges:function(){return Gt},__experimentalGetParsedPattern:function(){return Tt},__experimentalGetPatternTransformItems:function(){return Ft},__experimentalGetPatternsByBlockTypes:function(){return Rt},__experimentalGetReusableBlockTitle:function(){return zt},__unstableGetBlockWithoutInnerBlocks:function(){return te},__unstableGetClientIdWithClientIdsTree:function(){return re},__unstableGetClientIdsTree:function(){return oe},__unstableGetContentLockingParent:function(){return tn},__unstableGetEditorMode:function(){return $t},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ge},__unstableGetTemporarilyEditingAsBlocks:function(){return nn},__unstableGetVisibleBlocks:function(){return en},__unstableHasActiveBlockOverlayActive:function(){return rn},__unstableIsFullySelected:function(){return Ue},__unstableIsLastBlockChangeIgnored:function(){return Vt},__unstableIsSelectionCollapsed:function(){return je},__unstableIsSelectionMergeable:function(){return Ve},__unstableIsWithinBlockOverlay:function(){return on},__unstableSelectionHasUnmergeableBlock:function(){return ze},areInnerBlocksControlled:function(){return Yt},canEditBlock:function(){return vt},canInsertBlockType:function(){return dt},canInsertBlocks:function(){return ft},canLockBlockType:function(){return bt},canMoveBlock:function(){return gt},canMoveBlocks:function(){return ht},canRemoveBlock:function(){return mt},canRemoveBlocks:function(){return yt},didAutomaticChange:function(){return qt},getAdjacentBlockClientId:function(){return Ce},getAllowedBlocks:function(){return xt},getBlock:function(){return ee},getBlockAttributes:function(){return X},getBlockCount:function(){return pe},getBlockHierarchyRootClientId:function(){return Se},getBlockIndex:function(){return We},getBlockInsertionPoint:function(){return it},getBlockListSettings:function(){return Lt},getBlockMode:function(){return Ze},getBlockName:function(){return Q},getBlockNamesByClientId:function(){return ue},getBlockOrder:function(){return He},getBlockParents:function(){return ke},getBlockParentsByBlockName:function(){return Ee},getBlockRootClientId:function(){return _e},getBlockSelectionEnd:function(){return ye},getBlockSelectionStart:function(){return me},getBlockTransformItems:function(){return It},getBlocks:function(){return ne},getBlocksByClientId:function(){return ce},getClientIdsOfDescendants:function(){return ie},getClientIdsWithDescendants:function(){return le},getDraggedBlockClientIds:function(){return tt},getFirstMultiSelectedBlockClientId:function(){return Oe},getGlobalBlockCount:function(){return ae},getInserterItems:function(){return Ct},getLastMultiSelectedBlockClientId:function(){return Ne},getLowestCommonAncestorWithSelectedBlock:function(){return we},getMultiSelectedBlockClientIds:function(){return Pe},getMultiSelectedBlocks:function(){return Te},getMultiSelectedBlocksEndClientId:function(){return De},getMultiSelectedBlocksStartClientId:function(){return Le},getNextBlockClientId:function(){return Ae},getPatternsByBlockTypes:function(){return Mt},getPreviousBlockClientId:function(){return Ie},getSelectedBlock:function(){return be},getSelectedBlockClientId:function(){return ve},getSelectedBlockClientIds:function(){return Be},getSelectedBlockCount:function(){return ge},getSelectedBlocksInitialCaretPosition:function(){return xe},getSelectionEnd:function(){return fe},getSelectionStart:function(){return de},getSettings:function(){return Dt},getTemplate:function(){return st},getTemplateLock:function(){return ct},hasBlockMovingClientId:function(){return Kt},hasInserterItems:function(){return At},hasMultiSelection:function(){return Je},hasSelectedBlock:function(){return he},hasSelectedInnerBlock:function(){return Ke},isAncestorBeingDragged:function(){return rt},isAncestorMultiSelected:function(){return Fe},isBlockBeingDragged:function(){return nt},isBlockHighlighted:function(){return Jt},isBlockInsertionPointVisible:function(){return lt},isBlockMultiSelected:function(){return Re},isBlockSelected:function(){return $e},isBlockValid:function(){return Z},isBlockVisible:function(){return Xt},isBlockWithinSelection:function(){return qe},isCaretWithinFormattedText:function(){return ot},isDraggingBlocks:function(){return et},isFirstMultiSelectedBlock:function(){return Me},isLastBlockChangePersistent:function(){return Ut},isMultiSelecting:function(){return Ye},isNavigationMode:function(){return Wt},isSelectionEnabled:function(){return Qe},isTyping:function(){return Xe},isValidTemplate:function(){return at},wasBlockJustInserted:function(){return Zt}});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:function(){return an},hideBlockInterface:function(){return sn},showBlockInterface:function(){return cn}});var o={};n.r(o),n.d(o,{getLastInsertedBlocksClientIds:function(){return pn},isBlockInterfaceHidden:function(){return un}});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:function(){return Hn},__unstableExpandSelection:function(){return $n},__unstableMarkAutomaticChange:function(){return pr},__unstableMarkLastChangeAsPersistent:function(){return cr},__unstableMarkNextChangeAsNotPersistent:function(){return ur},__unstableSaveReusableBlock:function(){return sr},__unstableSetEditorMode:function(){return fr},__unstableSetTemporarilyEditingAsBlocks:function(){return Er},__unstableSplitSelection:function(){return Wn},clearSelectedBlock:function(){return xn},duplicateBlocks:function(){return yr},enterFormattedText:function(){return nr},exitFormattedText:function(){return rr},flashBlock:function(){return br},hideInsertionPoint:function(){return zn},insertAfterBlock:function(){return hr},insertBeforeBlock:function(){return gr},insertBlock:function(){return Dn},insertBlocks:function(){return Un},insertDefaultBlock:function(){return ir},mergeBlocks:function(){return Kn},moveBlockToPosition:function(){return Ln},moveBlocksDown:function(){return Mn},moveBlocksToPosition:function(){return Fn},moveBlocksUp:function(){return Rn},multiSelect:function(){return An},receiveBlocks:function(){return bn},removeBlock:function(){return Jn},removeBlocks:function(){return qn},replaceBlock:function(){return On},replaceBlocks:function(){return Tn},replaceInnerBlocks:function(){return Yn},resetBlocks:function(){return gn},resetSelection:function(){return vn},selectBlock:function(){return En},selectNextBlock:function(){return wn},selectPreviousBlock:function(){return Sn},selectionChange:function(){return or},setBlockMovingClientId:function(){return mr},setBlockVisibility:function(){return kr},setHasControlledInnerBlocks:function(){return _r},setNavigationMode:function(){return dr},setTemplateValidity:function(){return Vn},showInsertionPoint:function(){return jn},startDraggingBlocks:function(){return er},startMultiSelect:function(){return Cn},startTyping:function(){return Zn},stopDraggingBlocks:function(){return tr},stopMultiSelect:function(){return In},stopTyping:function(){return Xn},synchronizeTemplate:function(){return Gn},toggleBlockHighlight:function(){return vr},toggleBlockMode:function(){return Qn},toggleSelection:function(){return Bn},updateBlock:function(){return kn},updateBlockAttributes:function(){return _n},updateBlockListSettings:function(){return lr},updateSettings:function(){return ar},validateBlocksToTemplate:function(){return hn}});var l={};n.r(l),n.d(l,{GlobalStylesContext:function(){return jI},useGlobalSetting:function(){return GI},useGlobalStyle:function(){return HI},useGlobalStylesOutput:function(){return rA},useGlobalStylesReset:function(){return VI}});var a=window.wp.blocks,s=window.wp.hooks;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),S(o,e.slice(t,t+r),n)}const C=e=>e;function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,r=[];return n.set(t,r),e.forEach((e=>{const{clientId:t,innerBlocks:o}=e;r.push(t),I(o,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],r=[[t,e]];for(;r.length;){const[e,t]=r.shift();t.forEach((t=>{let{innerBlocks:o,...i}=t;n.push([i.clientId,e]),null!=o&&o.length&&r.push([i.clientId,o])}))}return n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;const n=[],r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n.push([o.clientId,t(o)])}return n}function B(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...r}=n.shift();n.push(...e),t[r.clientId]=!0}return t}function P(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function T(e){return x(e,(e=>e.attributes))}function O(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&b()(e.clientIds,t.clientIds)&&function(e,t){return b()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function N(e,t){const n=e.tree,r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n.set(e.clientId,{});for(const t of o)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.tree,o=new Set([]),i=new Set;for(const r of t){let t=n?r:e.parents.get(r);do{if(e.controlledInnerBlocks[t]){i.add(t);break}o.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of o)r.set(e,{...r.get(e)});for(const t of o)r.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>r.get(e)));for(const t of i)r.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>r.get(e)))})}const R=(0,f.pipe)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,o)=>{const{name:i}=t.byClientId.get(o);"core/block"===i&&n.ref===e&&t.attributes.set(o,{...n,ref:r})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":r.tree=new Map(r.tree),N(r,n.blocks),M(r,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(n.clientId,{...r.tree.get(n.clientId),...r.byClientId.get(n.clientId),attributes:r.attributes.get(n.clientId)}),M(r,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":r.tree=new Map(r.tree),n.clientIds.forEach((e=>{r.tree.set(e,{...r.tree.get(e),attributes:r.attributes.get(e)})})),M(r,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(n.blocks);r.tree=new Map(r.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),N(r,n.blocks),M(r,n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!r.byClientId.get(t.parents.get(e))||o.push(t.parents.get(e));M(r,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents.get(o)||""!==t.parents.get(o)&&!r.byClientId.get(t.parents.get(o))||e.push(t.parents.get(o));r.tree=new Map(r.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),M(r,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=new Map(r.tree),M(r,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=new Map(r.tree),M(r,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];r.attributes.forEach(((t,o)=>{"core/block"===r.byClientId.get(o).name&&t.ref===n.updatedId&&e.push(o)})),r.tree=new Map(r.tree),e.forEach((e=>{r.tree.set(e,{...r.byClientId.get(e),attributes:r.attributes.get(e),innerBlocks:r.tree.get(e).innerBlocks})})),M(r,e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order.get(n.rootClientId)&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(n.rootClientId)}));let i=o;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const o=new Map(i.order);Object.keys(r).forEach((e=>{t.order.get(e)&&o.set(e,t.order.get(e))})),i.order=o,i.tree=new Map(i.tree),Object.keys(r).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(P(n.blocks)),attributes:new Map(T(n.blocks)),order:I(n.blocks),parents:new Map(A(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),N(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!O(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...r}=t.updates;if(0===Object.values(r).length)return e;const o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...r}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let r=!1;const o=new Map(e);for(const i of t.clientIds){var n;const l=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===l.length)continue;let a=!1;const s=e.get(i),c={};l.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),r=r||a,a&&o.set(i,{...s,...c})}return r?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const r=I(t.blocks),o=new Map(e);return r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(r[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e.get(n)||[],o=I(t.blocks,n),{index:i=r.length}=t,l=new Map(e);return o.forEach(((e,t)=>{l.set(t,e)})),l.set(n,S(r,o.get(n),i)),l}case"MOVE_BLOCKS_TO_POSITION":{var r,o;const{fromRootClientId:n="",toRootClientId:i="",clientIds:l}=t,{index:a=e.get(i).length}=t;if(n===i){const t=e.get(i).indexOf(l[0]),n=new Map(e);return n.set(i,w(e.get(i),t,a,l.length)),n}const s=new Map(e);return s.set(n,null!==(r=null===(o=e.get(n))||void 0===o?void 0:o.filter((e=>!l.includes(e))))&&void 0!==r?r:[]),s.set(i,S(e.get(i),l,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e.get(r);if(!i.length||o===i[0])return e;const l=i.indexOf(o),a=new Map(e);return a.set(r,w(i,l,l-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e.get(r);if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o),s=new Map(e);return s.set(r,w(l,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=I(t.blocks),o=new Map(e);return t.replacedClientIds.forEach((e=>{o.delete(e)})),r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...r.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);o.set(t,i)})),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,r)=>{var o;const i=null!==(o=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==o?o:[];i.length!==e.length&&n.set(r,i)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks,t.rootClientId||"").forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var L=(0,m.combineReducers)({blocks:R,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:F(o.selectionStart,i),selectionEnd:F(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...r}=e;return r}return e}return b()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:r,__unstableWithInserter:o,operation:i}=t,l={rootClientId:n,index:r,__unstableWithInserter:o,operation:i};return b()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,m.select)(a.store).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"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 e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_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"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const r=n.blocks.map((e=>e.clientId));return{clientIds:r,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}}),D={};function U(e){return[e]}function j(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r(r,o)=>{let i,l;if("function"==typeof e?(i=e(r),l=e(o)):(i=r[e],l=o[e]),i>l)return"asc"===n?1:-1;if(l>i)return"asc"===n?-1:1;const a=t.findIndex((e=>e===r)),s=t.findIndex((e=>e===o));return a>s?1:s>a?-1:0};function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(q(t,e,n))}const Y=[];function Q(e,t){const n=e.blocks.byClientId.get(t),r="core/social-link";if("web"!==u.Platform.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes.get(t),{service:o}=null!=n?n:{};return o?`core/social-link-${o}`:r}return n?n.name:null}function Z(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function X(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ee(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const te=z(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:X(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function ne(e,t){var n;const r=t&&Yt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(r))||void 0===n?void 0:n.innerBlocks)||Y}const re=z(((e,t)=>({clientId:t,innerBlocks:oe(e,t)})),(e=>[e.blocks.order])),oe=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return He(e,t).map((t=>re(e,t)))}),(e=>[e.blocks.order])),ie=z(((e,t)=>{const n=[];for(const r of t)for(const t of He(e,r))n.push(t,...ie(e,[t]));return n}),(e=>[e.blocks.order])),le=z((e=>{const t=[];for(const n of He(e))t.push(n,...ie(e,[n]));return t}),(e=>[e.blocks.order])),ae=z(((e,t)=>{const n=le(e);return t?n.reduce(((n,r)=>e.blocks.byClientId.get(r).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),se=z(((e,t)=>{if(!t)return Y;const n=le(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:Y}),(e=>[e.blocks.order,e.blocks.byClientId])),ce=z(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ee(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ue=z(((e,t)=>ce(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ce(e,t)));function pe(e,t){return He(e,t).length}function de(e){return e.selection.selectionStart}function fe(e){return e.selection.selectionEnd}function me(e){return e.selection.selectionStart.clientId}function ye(e){return e.selection.selectionEnd.clientId}function ge(e){const t=Pe(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function be(e){const t=ve(e);return t?ee(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ke=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents.get(o);)o=e.blocks.parents.get(o),r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),Ee=z((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ke(e,t,r);return o.map((t=>({id:t,name:Q(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function Se(e,t){let n,r=t;do{n=r,r=e.blocks.parents.get(r)}while(r);return n}function we(e,t){const n=ve(e),r=[...ke(e,t),t],o=[...ke(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?Oe(e):Ne(e)),!t)return null;const r=_e(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o.get(r),l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function Ie(e,t){return Ce(e,t,-1)}function Ae(e,t){return Ce(e,t,1)}function xe(e){return e.initialPosition}const Be=z((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return Y;if(t.clientId===n.clientId)return[t.clientId];const r=_e(e,t.clientId);if(null===r)return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?Y:Be(e)}const Te=z((e=>{const t=Pe(e);return t.length?t.map((t=>ee(e,t))):Y}),(e=>[...Be.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Oe(e){return Pe(e)[0]||null}function Ne(e){const t=Pe(e);return t[t.length-1]||null}function Me(e,t){return Oe(e)===t}function Re(e,t){return-1!==Pe(e).indexOf(t)}const Fe=z(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=_e(e,n),r=Re(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ue(e){const t=de(e),n=fe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function je(e){const t=de(e),n=fe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function ze(e){return Be(e).some((t=>{const n=Q(e,t);return!(0,a.getBlockType)(n).merge}))}function Ve(e,t){const n=de(e),r=fe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=_e(e,n.clientId);if(o!==_e(e,r.clientId))return!1;const i=He(e,o);let l,s;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,s=n):(l=n,s=r);const c=t?s.clientId:l.clientId,u=t?l.clientId:s.clientId,p=Q(e,c);if(!(0,a.getBlockType)(p).merge)return!1;const d=ee(e,u);if(d.name===p)return!0;const f=(0,a.switchToBlockType)(d,p);return f&&f.length}const Ge=e=>{const t=de(e),n=fe(e);if(t.clientId===n.clientId)return Y;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return Y;const r=_e(e,t.clientId);if(r!==_e(e,n.clientId))return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[s,c]=i>l?[n,t]:[t,n],u=ee(e,s.clientId),p=(0,a.getBlockType)(u.name),d=ee(e,c.clientId),f=(0,a.getBlockType)(d.name),m=u.attributes[s.attributeKey],y=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let v=(0,H.create)({html:m,...K(g)}),b=(0,H.create)({html:y,...K(h)});return v=(0,H.remove)(v,0,s.offset),b=(0,H.remove)(b,c.offset,b.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,H.toHTMLString)({value:v,...K(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,H.toHTMLString)({value:b,...K(h)})}}]};function He(e,t){return e.blocks.order.get(t||"")||Y}function We(e,t){return He(e,_e(e,t)).indexOf(t)}function $e(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return He(e,t).some((t=>$e(e,t)||Re(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Pe(e),r=n.indexOf(t);return r>-1&&rnt(e,t)))}function ot(){return $()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const it=z((e=>{let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=_e(e,i)||void 0,n=We(e,o.clientId)+1):n=He(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function lt(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,r,o;return t?null!==(n=null===(r=Lt(e,t))||void 0===r?void 0:r.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},pt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:o}=Dt(e),i=ut(o,t,!0);if(!i)return!1;const l=!!ct(e,r);if(l)return!1;const c=Lt(e,r);if(r&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,p=ut(u,t),d=n.parent,f=Q(e,r),m=ut(d,f);let y=!0;const g=n.ancestor;if(g){y=[r,...ke(e,r)].some((t=>ut(g,Q(e,t))))}const h=y&&(null===p&&null===m||!0===p||!0===m);return h?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,r,{getBlock:ee.bind(null,e),getBlockParentsByBlockName:Ee.bind(null,e)}):h},dt=z(pt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>dt(e,Q(e,t),n)))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return!0;const{lock:o}=r,i=!!ct(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function yt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>mt(e,t,n)))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return;const{lock:o}=r,i="all"===ct(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>gt(e,t,n)))}function vt(e,t){const n=X(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function bt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function _t(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const kt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&pt(e,t.name,n),Et=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=_t(e,r)||{};return{...t,id:r,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:St(o,i)}},St=(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}},wt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(o=ce(e,le(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:i,count:l=0}=_t(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:St(i,l)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},Ct=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=wt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=G;if("web"===u.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=(0,a.getBlockType)(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=_t(e,o)||{},s=St(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=(0,a.getBlockTypes)().filter((n=>kt(e,n,t))).map(n),l=pt(e,"core/block",t)?Ht(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=Et(e,n);t.push(...r.map(o))}return t}),[]),c=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=s.reduce(c,{core:[],noncore:[]}),f=[...p,...d];return[...f,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),It=z((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=Array.isArray(t)?t:[t],[i]=o,l=wt(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>kt(e,t,r))).map(l),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,_.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return J(u,(e=>c[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),At=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,a.getBlockTypes)().some((n=>kt(e,n,t)));if(n)return!0;const r=pt(e,"core/block",t)&&Ht(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),xt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,a.getBlockTypes)().filter((n=>kt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),Bt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),xt(e,t)}),((e,t)=>[...xt.getDependants(e,t)])),Pt=z((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(ee(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Tt=z(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Ot=z((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Dt(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Tt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Nt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ot(e),r=n.filter((n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return dt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Mt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;const r=Nt(e,n),o=Array.isArray(t)?t:[t],i=r.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=>o.includes(e)))}));return 0===i.length?Y:i}),((e,t,n)=>[...Nt.getDependants(e,n)])),Rt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Mt(e,t,n)}),((e,t,n)=>[...Nt.getDependants(e,n)])),Ft=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Yt(e,n)})))return Y;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Mt(e,r,n)}),((e,t,n)=>[...Mt.getDependants(e,n)]));function Lt(e,t){return e.blockListSettings[t]}function Dt(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}const jt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),zt=z(((e,t)=>{var n;const r=Ht(e).find((e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Ht(e)]));function Vt(e){return e.blocks.isIgnoredChange}function Gt(e){return e.lastBlockAttributesChange}function Ht(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Y}function Wt(e){return"navigation"===e.editorMode}function $t(e){return e.editorMode}function Kt(e){return e.hasBlockMovingClientId}function qt(e){return!!e.automaticChangeStatus}function Jt(e,t){return e.highlightedBlock===t}function Yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Qt=z(((e,t)=>{if(!t.length)return null;const n=ve(e);if(t.includes(Q(e,n)))return n;const r=Pe(e),o=Ee(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Zt(e,t,n){var r;const{lastBlockInserted:o}=e;return(null===(r=o.clientIds)||void 0===r?void 0:r.includes(t))&&o.source===n}function Xt(e,t){var n,r;return null===(n=null===(r=e.blockVisibility)||void 0===r?void 0:r[t])||void 0===n||n}const en=z((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),tn=z(((e,t)=>{let n,r=t;for(;e.blocks.parents.has(r);)r=e.blocks.parents.get(r),r&&"contentOnly"===ct(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function nn(e){return e.temporarilyEditingAsBlocks}function rn(e,t){if(!vt(e,t))return!0;const n=$t(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const r=(0,a.hasBlockSupport)(Q(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Yt(e,t))&&!$e(e,t)&&!Ke(e,t,!0)}function on(e,t){let n=e.blocks.parents.get(t);for(;n;){if(rn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ln=["inserterMediaCategories","blockInspectorAnimation"];function an(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===u.Platform.OS){n={};for(const t in e)ln.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function sn(){return{type:"HIDE_BLOCK_INTERFACE"}}function cn(){return{type:"SHOW_BLOCK_INTERFACE"}}function un(e){return e.isBlockInterfaceHidden}function pn(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}var dn=window.wp.a11y;const fn="†";function mn(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(fn)}))}const yn=e=>Array.isArray(e)?e:[e],gn=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(hn(e))},hn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||(0,a.doBlocksMatchTemplate)(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function bn(e){return $()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function _n(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yn(e),attributes:t,uniqueByBlock:n}}function kn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:r,dispatch:o}=n;const i=r.getPreviousBlockClientId(e);if(i)o.selectBlock(i,-1);else if(t){const t=r.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}}},wn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Cn(){return{type:"START_MULTI_SELECT"}}function In(){return{type:"STOP_MULTI_SELECT"}}const An=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,dn.speak)((0,_.sprintf)((0,_._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function xn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Pn(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,a.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const Tn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=yn(e),t=Pn(yn(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function On(e,t){return Tn(e,t)}const Nn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:yn(t),rootClientId:n})},Mn=Nn("MOVE_BLOCKS_DOWN"),Rn=Nn("MOVE_BLOCKS_UP"),Fn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return Fn([e],t,n,r)}function Dn(e,t,n,r,o){return Un([e],t,n,r,0,o)}const Un=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,$()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Pn(yn(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function jn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r,operation:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:o}}const zn=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Vn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Gn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),o=t.getTemplate(),i=(0,a.synchronizeBlocksWithTemplate)(r,o);n.resetBlocks(i)},Hn=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const s=r.getBlockRootClientId(i.clientId);if(s!==r.getBlockRootClientId(l.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(i.clientId)>c.indexOf(l.clientId)?(u=l,p=i):(u=i,p=l);const d=e?p:u,f=r.getBlock(d.clientId),m=(0,a.getBlockType)(f.name);if(!m.merge)return;const y=u,g=p,h=r.getBlock(y.clientId),v=(0,a.getBlockType)(h.name),b=r.getBlock(g.clientId),_=(0,a.getBlockType)(b.name),k=h.attributes[y.attributeKey],E=b.attributes[g.attributeKey],S=v.attributes[y.attributeKey],w=_.attributes[g.attributeKey];let C=(0,H.create)({html:k,...K(S)}),I=(0,H.create)({html:E,...K(w)});C=(0,H.remove)(C,y.offset,C.text.length),I=(0,H.insert)(I,fn,0,g.offset);const A=(0,a.cloneBlock)(h,{[y.attributeKey]:(0,H.toHTMLString)({value:C,...K(S)})}),x=(0,a.cloneBlock)(b,{[g.attributeKey]:(0,H.toHTMLString)({value:I,...K(w)})}),B=e?A:x,P=h.name===b.name?[B]:(0,a.switchToBlockType)(B,m.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=m.merge(e.attributes,x.attributes)}else{const e=P.shift();T=m.merge(A.attributes,e.attributes)}const O=mn(T),N=T[O],M=(0,H.create)({html:N,...K(m.attributes[O])}),R=M.text.indexOf(fn),F=(0,H.remove)(M,R,R+1),L=(0,H.toHTMLString)({value:F,...K(m.attributes[O])});T[O]=L;const D=r.getSelectedBlockClientIds(),U=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{o.selectionChange(f.clientId,O,R,R),o.replaceBlocks(D,U,0,r.getSelectedBlocksInitialCaretPosition())}))},Wn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let s,c;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(s=o,c=r):(s=r,c=o);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,a.getBlockType)(d.name),m=t.getBlock(p.clientId),y=(0,a.getBlockType)(m.name),g=d.attributes[u.attributeKey],h=m.attributes[p.attributeKey],v=f.attributes[u.attributeKey],b=y.attributes[p.attributeKey];let _=(0,H.create)({html:g,...K(v)}),k=(0,H.create)({html:h,...K(b)});_=(0,H.remove)(_,u.offset,_.text.length),k=(0,H.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,H.toHTMLString)({value:_,...K(v)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...m,attributes:{...m.attributes,[p.attributeKey]:(0,H.toHTMLString)({value:k,...K(b)})}}],1,t.getSelectedBlocksInitialCaretPosition())},$n=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Kn=(e,t)=>n=>{let{registry:r,select:o,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[s,c]=l,u=o.getBlock(s),p=(0,a.getBlockType)(u.name);if(!p)return;const d=o.getBlock(c);if(p&&!p.merge){const e=(0,a.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void r.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,s),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,a.getBlockType)(d.name),{clientId:m,attributeKey:y,offset:g}=o.getSelectionStart(),h=(m===s?p:f).attributes[y],v=(m===s||m===c)&&void 0!==y&&void 0!==g&&!!h;h||("number"==typeof y?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 y):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,a.cloneBlock)(u),_=(0,a.cloneBlock)(d);if(v){const e=m===s?b:_,t=e.attributes[y],n=(0,H.insert)((0,H.create)({html:t,...K(h)}),fn,g,g);e.attributes[y]=(0,H.toHTMLString)({value:n,...K(h)})}const k=u.name===d.name?[_]:(0,a.switchToBlockType)(_,u.name);if(!k||!k.length)return;const E=p.merge(b.attributes,k[0].attributes);if(v){const e=mn(E),t=E[e],n=(0,H.create)({html:t,...K(p.attributes[e])}),r=n.text.indexOf(fn),o=(0,H.remove)(n,r,r+1),l=(0,H.toHTMLString)({value:o,...K(p.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,r,r)}i.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...E}},...k.slice(1)],0)},qn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=yn(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0],t),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function Jn(e,t){return qn([e],t)}function Yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Qn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Zn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function er(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function tr(){return{type:"STOP_DRAGGING_BLOCKS"}}function nr(){return $()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function rr(){return $()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function or(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const ir=(e,t,n)=>r=>{let{dispatch:o}=r;const i=(0,a.getDefaultBlockName)();if(!i)return;const l=(0,a.createBlock)(i,e);return o.insertBlock(l,n,t)};function lr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ar(e){return an(e,!0)}function sr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function cr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ur(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const pr=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},dr=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},fr=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,dn.speak)((0,_.__)("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.")):"edit"===e?(0,dn.speak)((0,_.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,dn.speak)((0,_.__)("You are currently in zoom-out mode."))},mr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,dn.speak)((0,_.__)("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."))}},yr=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if(i.some((e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=yn(e),u=r.getBlockIndex(c[c.length-1]),p=i.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(p,u+1,s,t),p.length>1&&t&&o.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},gr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},hr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function vr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const br=e=>async t=>{let{dispatch:n}=t;n(vr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(vr(e,!1))};function _r(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function kr(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Er(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const Sr="core/block-editor";var wr=window.wp.privateApis;const{lock:Cr,unlock:Ir}=(0,wr.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),Ar={reducer:L,selectors:e,actions:i},xr=(0,m.createReduxStore)(Sr,{...Ar,persist:["preferences"]}),Br=(0,m.registerStore)(Sr,{...Ar,persist:["preferences"]});Ir(Br).registerPrivateActions(t),Ir(Br).registerPrivateSelectors(o);const Pr={name:"",isSelected:!1},Tr=(0,u.createContext)(Pr),{Provider:Or}=Tr;function Nr(){return(0,u.useContext)(Tr)}function Mr(){const{isSelected:e,clientId:t,name:n}=Nr();return(0,m.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(xr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function Rr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=Mr(),{clientId:r}=Nr(),o=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(xr),{hasBlockSupport:i}=e(a.store);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=h[e])||void 0===i?void 0:i.Fill:o?h.parent.Fill:null}(t,o);return i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(i,null,(e=>{const o=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,u.createElement)(g.ToolbarGroup,{controls:n}),r)}))):null}function Fr(e){let{group:t="default",...n}=e;const r=(0,u.useContext)(g.__experimentalToolbarContext),o=h[t].Slot,i=(0,g.__experimentalUseSlotFills)(o.__unstableName);return Boolean(i&&i.length)?"default"===t?(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r})):(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Lr=Rr;Lr.Slot=Fr;const Dr=e=>(0,u.createElement)(Rr,c({group:"inline"},e));Dr.Slot=e=>(0,u.createElement)(Fr,c({group:"inline"},e));var Ur=Lr;var jr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var zr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Vr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Gr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Hr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var Wr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var $r=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function qr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Kr(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Jr(e){const{contentSize:t,wideSize:n,type:r="default"}=e,o={},i=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return i.test(t)&&"constrained"===r&&(o.none=(0,_.sprintf)((0,_.__)("Max %s wide"),t)),i.test(n)&&(o.wide=(0,_.sprintf)((0,_.__)("Max %s wide"),n)),o}const Yr=(0,u.createContext)({refs:new Map,callbacks:new Map});function Qr(e){let{children:t}=e;const n=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,u.createElement)(Yr.Provider,{value:n},t)}function Zr(e){const{refs:t,callbacks:n}=(0,u.useContext)(Yr),r=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,f.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Xr(e){const{refs:t}=(0,u.useContext)(Yr),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function eo(e){const{callbacks:t}=(0,u.useContext)(Yr),n=Xr(e),[r,o]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function to(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function no(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ro(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const oo={all:(0,_.__)("All sides"),top:(0,_.__)("Top"),bottom:(0,_.__)("Bottom"),left:(0,_.__)("Left"),right:(0,_.__)("Right"),mixed:(0,_.__)("Mixed"),vertical:(0,_.__)("Vertical"),horizontal:(0,_.__)("Horizontal")},io={top:void 0,right:void 0,bottom:void 0,left:void 0},lo=["top","right","bottom","left"];function ao(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function so(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lo;return Object.values(e).length>=1&&Object.values(e).length1}function co(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}var uo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const po=["color","border","dimensions","typography","spacing"],fo={"color.palette":e=>e.colors,"color.gradients":e=>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=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},mo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function yo(e){const{name:t,clientId:n}=Nr();return(0,m.useSelect)((r=>{if(po.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==o)return o;const i=(e=>mo[e]||e)(e),l=[n,...r(xr).getBlockParents(n,!0)];for(const e of l){const n=r(xr).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=r(xr).getBlockAttributes(e);if(o=null!==(c=(0,y.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==c?c:(0,y.get)(n,`settings.${i}`),void 0!==o)break}}const u=r(xr).getSettings();if(void 0===o){var p;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(p=(0,y.get)(u,n))&&void 0!==p?p:(0,y.get)(u,e)}var d,f;if(void 0!==o)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(f=o.custom)&&void 0!==f?f:o.theme)&&void 0!==d?d:o.default:o;const m=fo[i]?fo[i](u):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,n,e])}const go={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function ho(e){var t,n,r,o,i;let{spacingSizes:l,value:a,side:s,onChange:c,isMixed:p=!1,type:f,minimumCustomValue:y,onMouseOver:h,onMouseOut:v}=e;a=function(e,t){if(to(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(a,l);let b=l;const k=l.length<=8,E=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[S,w]=(0,u.useState)(!E&&void 0!==a&&!to(a)),C=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]});let I=null;!k&&!S&&void 0!==a&&(!to(a)||to(a)&&p)?(b=[...l,{name:p?(0,_.__)("Mixed"):(0,_.sprintf)((0,_.__)("Custom (%s)"),a),slug:"custom",size:a}],I=b.length-1):p||(I=S?function(e,t){if(!to(e))return e;const n=ro(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}(a,l):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ro(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(a,l));const A=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||C[0].value,x=e=>{var t;return void 0===a||null===(t=l[e])||void 0===t?void 0:t.name},B=parseFloat(I,10),P=(e,t)=>{var n;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(n=l[e])||void 0===n?void 0:n.slug}`},T=p?(0,_.__)("Mixed"):null,O=p?(0,_.__)("Mixed"):x(I),N=b.map(((e,t)=>({key:t,name:e.name}))),M=l.map(((e,t)=>({value:t,label:void 0}))),R=(0,_.sprintf)((0,_.__)("%1$s %2$s"),oo[s],null==f?void 0:f.toLowerCase()),F=k&&!S&&void 0!==O;return(0,u.createElement)(u.Fragment,null,"all"!==s&&(0,u.createElement)(g.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},oo[s]),F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},O)),"all"===s&&F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},O),!E&&(0,u.createElement)(g.Button,{label:S?(0,_.__)("Use size preset"):(0,_.__)("Set custom size"),icon:uo,onClick:()=>{w(!S)},isPressed:S,isSmall:!0,className:d()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalUnitControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:C,min:y,placeholder:T,disableUnits:p,label:R,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,value:B,min:0,max:null!==(t=null===(n=go[A])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(r=null===(o=go[A])||void 0===o?void 0:o.steps)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{c([e,A].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),k&&!S&&(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,className:"components-spacing-sizes-control__range-control",value:I,onChange:e=>c(P(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===a&&c("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":null===(i=l[I])||void 0===i?void 0:i.name,renderTooltipContent:x,min:0,max:l.length-1,marks:M,label:R,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:h,onBlur:v}),!k&&!S&&(0,u.createElement)(g.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:N.find((e=>e.key===I))||"",onChange:e=>{c(P(e.selectedItem.key,"selectList"))},options:N,label:R,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v}))}function vo(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao(Object.values(e))}(n),p=co(n)&&so(n,r);return(0,u.createElement)(ho,{value:c,onChange:e=>{const o=(0,g.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:p,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})}function bo(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=null!=n&&n.length?lo.filter((e=>n.includes(e))):lo,p=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,u.createElement)(u.Fragment,null,c.map((e=>(0,u.createElement)(ho,{value:t[e],label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:p(e),spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}))))}const _o=["vertical","horizontal"];function ko(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},p=null!=r&&r.length?_o.filter((e=>r.includes(e))):_o;return(0,u.createElement)(u.Fragment,null,p.map((e=>{const t="vertical"===e?n.top:n.left;return(0,u.createElement)(ho,{value:t,onChange:c(e),label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})})))}var Eo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var So=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 wo(e){let{isLinked:t,onClick:n}=e;const r=t?(0,_.__)("Unlink sides"):(0,_.__)("Link sides");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,u.createElement)(g.Button,{isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r,onClick:n})))}function Co(e){let{inputProps:t,onChange:n,label:r=(0,_.__)("Spacing Control"),values:o,sides:i,splitOnAxis:l=!1,useSelect:a,minimumCustomValue:s=0,onMouseOver:p,onMouseOut:f}=e;const m=[{name:0,slug:"0",size:0},...yo("spacing.spacingSizes")||[]];m.length>8&&m.unshift({name:(0,_.__)("Default"),slug:"default",size:void 0});const y=o||io,h=co(o),v=1===(null==i?void 0:i.length),[b,k]=(0,u.useState)(!h||!so(y,i)||v),E={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:m,useSelect:a,type:r,minimumCustomValue:s,onMouseOver:p,onMouseOut:f};return(0,u.createElement)("fieldset",{className:d()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},r),!v&&(0,u.createElement)(wo,{onClick:()=>{k(!b)},isLinked:b}),b&&(0,u.createElement)(vo,c({"aria-label":r},E)),!b&&l&&(0,u.createElement)(ko,E),!b&&!l&&(0,u.createElement)(bo,E))}window.wp.warning;const Io=(0,g.createSlotFill)("InspectorControls"),Ao=(0,g.createSlotFill)("InspectorAdvancedControls"),xo=(0,g.createSlotFill)("InspectorControlsBorder"),Bo=(0,g.createSlotFill)("InspectorControlsColor"),Po=(0,g.createSlotFill)("InspectorControlsDimensions"),To=(0,g.createSlotFill)("InspectorControlsPosition"),Oo=(0,g.createSlotFill)("InspectorControlsTypography");var No={default:Io,advanced:Ao,border:xo,color:Bo,dimensions:Po,list:(0,g.createSlotFill)("InspectorControlsListView"),settings:Io,styles:(0,g.createSlotFill)("InspectorControlsStyles"),typography:Oo,position:To};function Mo(e){var t;let{children:n,group:r="default",__experimentalGroup:o}=e;o&&($()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=o);const i=Mr(),l=null===(t=No[r])||void 0===t?void 0:t.Fill;return l?i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(l,null,(e=>{const t=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolsPanelContext.Provider,{value:t},n)}))):null:("undefined"!=typeof process&&process.env,null)}const Ro=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,y.mapValues)(e,Ro)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,y.isEmpty)(t)?void 0:t};function Fo(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,Fo(n)]})))}:e}function Lo(e,t,n){const r=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),o=e?Fo(e):{};return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),o),o}function Do(e,t,n,r,o,i){var l;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,y.get)(a,e);t&&(c={...c,attributes:Lo(c.attributes,e,t)})}))})),c}function Uo(e,t,n){const r=(0,a.getBlockSupport)(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function jo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,m.useDispatch)(xr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,m.useSelect)(xr),c=a(),p=(0,u.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?l():[c];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Ro(o.style)},t[n]=o})),o(n,t,!0)}),[Ro,i,l,s,c,o]);return(0,u.createElement)(g.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function zo(e){let{Slot:t,...n}=e;const r=(0,u.useContext)(g.__experimentalToolsPanelContext);return(0,u.createElement)(t,c({},n,{fillProps:r,bubblesVirtually:!0}))}function Vo(e){var t;let{__experimentalGroup:n,group:r="default",label:o,...i}=e;n&&($()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=n);const l=null===(t=No[r])||void 0===t?void 0:t.Slot,a=(0,g.__experimentalUseSlot)(null==l?void 0:l.__unstableName),s=(0,g.__experimentalUseSlotFills)(null==l?void 0:l.__unstableName);if(!l||!a)return"undefined"!=typeof process&&process.env,null;return Boolean(s&&s.length)?o?(0,u.createElement)(jo,{group:r,label:o},(0,u.createElement)(zo,c({},i,{Slot:l}))):(0,u.createElement)(l,c({},i,{bubblesVirtually:!0})):null}const Go=Mo;Go.Slot=Vo;const Ho=e=>(0,u.createElement)(Mo,c({},e,{group:"advanced"}));Ho.Slot=e=>(0,u.createElement)(Vo,c({},e,{group:"advanced"})),Ho.slotName="InspectorAdvancedControls";var Wo=Go,$o=window.wp.isShallowEqual,Ko=n.n($o);var qo=function(e){return(0,f.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const Jo=Number.MAX_SAFE_INTEGER;var Yo=(0,u.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:l=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:p=!0,...m}=e;const y=eo(n),h=eo(null!=r?r:n),v=(0,f.useMergeRefs)([t,qo(s)]),[b,_]=(0,u.useReducer)((e=>(e+1)%Jo),0);(0,u.useLayoutEffect)((()=>{if(!y)return;const e=new window.MutationObserver(_);return e.observe(y,{attributes:!0}),()=>{e.disconnect()}}),[y]);const k=(0,u.useMemo)((()=>b<0||!y||h!==y?{}:{position:"absolute",width:y.offsetWidth,height:y.offsetHeight}),[y,h,i,b]),E=(0,u.useMemo)((()=>{if(!(b<0||!y||r&&!h))return{getBoundingClientRect(){var e,t,n,r;const o=y.getBoundingClientRect(),i=null==h?void 0:h.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:y.ownerDocument}}),[r,h,y,b]);return!y||r&&!h?null:(0,u.createElement)(g.Popover,c({ref:v,animate:!1,focusOnMount:!1,anchor:E,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:p},m,{className:d()("block-editor-block-popover",m.className),variant:"unstyled"}),l&&(0,u.createElement)("div",{style:k},o),!l&&o)}));function Qo(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.margin)}function Zo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.margin"),n=!Si(e,"margin");return!Qo(e)||t||n}function Xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"margin"),d=p&&p.some((e=>vi.includes(e)));if(Zo(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:!1,onMouseOver:l,onMouseOut:a})),native:null})}function ei(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,a=(0,u.useMemo)((()=>{const e=null!=l&&l.top?no(null==l?void 0:l.top):0,t=null!=l&&l.right?no(null==l?void 0:l.right):0,n=null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,r=null!=l&&l.left?no(null==l?void 0:l.left):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`calc(${e} * -1)`:0,right:t?`calc(${t} * -1)`:0,bottom:n?`calc(${n} * -1)`:0,left:r?`calc(${r} * -1)`:0}}),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}const ti={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function ni(e){var t,n,r,o,i;let{label:l=(0,_.__)("Height"),onChange:a,value:s}=e;const c=parseFloat(s),p=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vh","vw"]}),d=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s)),[s])[1]||(null===(t=p[0])||void 0===t?void 0:t.value)||"px";return(0,u.createElement)("fieldset",{className:"block-editor-height-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},l),(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalUnitControl,{value:s,units:p,onChange:a,onUnitChange:e=>{const[t,n]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s);["em","rem"].includes(e)&&"px"===n?a((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?a(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&a(100+e)},min:0,size:"__unstable-large"})),(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalSpacer,{marginX:2,marginBottom:0},(0,u.createElement)(g.RangeControl,{value:c,min:0,max:null!==(n=null===(r=ti[d])||void 0===r?void 0:r.max)&&void 0!==n?n:100,step:null!==(o=null===(i=ti[d])||void 0===i?void 0:i.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{a([e,d].join(""))},__nextHasNoMarginBottom:!0})))))}function ri(e){const t=(0,a.getBlockSupport)(e,yi);return!!(!0===t||null!=t&&t.minHeight)}function oi(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("dimensions.minHeight");return!ri(e)||t}function ii(e){var t;const{attributes:{style:n},setAttributes:r}=e;if(oi(e))return null;return(0,u.createElement)(ni,{label:(0,_.__)("Min. height"),value:null==n||null===(t=n.dimensions)||void 0===t?void 0:t.minHeight,onChange:e=>{const t={...n,dimensions:{...null==n?void 0:n.dimensions,minHeight:e}};r({style:Ro(t)})}})}function li(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.padding)}function ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.padding"),n=!Si(e,"padding");return!li(e)||t||n}function si(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"padding"),d=p&&p.some((e=>vi.includes(e)));if(ai(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a})),native:null})}function ci(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,a=(0,u.useMemo)((()=>({borderTopWidth:null!=l&&l.top?no(null==l?void 0:l.top):0,borderRightWidth:null!=l&&l.right?no(null==l?void 0:l.right):0,borderBottomWidth:null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,borderLeftWidth:null!=l&&l.left?no(null==l?void 0:l.left):0})),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function ui(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,_.__)("Stretch to fill available space."):"fixed"===e?"horizontal"===n?(0,_.__)("Specify a fixed width."):(0,_.__)("Specify a fixed height."):(0,_.__)("Fit contents.")}function pi(e){let{attributes:t,setAttributes:n,__unstableParentLayout:r}=e;const{style:o={}}=t,{layout:i={}}=o,{selfStretch:l,flexSize:a}=i;return(0,u.useEffect)((()=>{"fixed"!==l||a||n({style:{...o,layout:{...i,selfStretch:"fit"}}})}),[]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:mi(r),value:l||"fit",help:ui(l,r),onChange:e=>{const t="fixed"!==e?null:a;n({style:{...o,layout:{...i,selfStretch:e,flexSize:t}}})},isBlock:!0},(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,_.__)("Fit")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,_.__)("Fill")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,_.__)("Fixed")})),"fixed"===l&&(0,u.createElement)(g.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{n({style:{...o,layout:{...i,flexSize:e}}})},value:a}))}function di(e){let{__unstableParentLayout:t={}}=e;const{type:n="default",default:{type:r="default"}={},allowSizingOnChildren:o=!1}=t;return("flex"===r||"flex"===n)&&o}function fi(e){const t=!yo("layout");return!di(e)||t}function mi(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,_.__)("Width"):(0,_.__)("Height")}const yi="dimensions",gi="spacing",hi=["top","right","bottom","left"],vi=["vertical","horizontal"];function bi(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:r}=Ir((0,m.useDispatch)(xr));return{isMouseOver:e,onMouseOver:e=>{e.stopPropagation(),n(),t(!0)},onMouseOut:e=>{e.stopPropagation(),r(),t(!1)}}}function _i(e){const t=Ai(e),n=ai(e),r=Zo(e),o=oi(e),i=fi(e),l=ki(e),s=function(e){if("web"!==u.Platform.OS)return!1;const{name:t}=e;return wi(t)||ri(t)||li(t)||Qo(t)||di(e)}(e),p=yo("spacing.spacingSizes"),f=bi(),m=bi();if(l||!s)return null;const y=(0,a.getBlockSupport)(e.name,[yi,"__experimentalDefaultControls"]),h=(0,a.getBlockSupport)(e.name,[gi,"__experimentalDefaultControls"]),v=(e,t)=>n=>{var r;return{...n,style:{...n.style,[t]:{...null===(r=n.style)||void 0===r?void 0:r[t],[e]:void 0}}}},b=d()({"tools-panel-item-spacing":p&&p.length>0}),{__unstableParentLayout:k}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,{group:"dimensions"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:v("padding","spacing"),isShownByDefault:null==h?void 0:h.padding,panelId:e.clientId},(0,u.createElement)(si,c({onMouseOver:f.onMouseOver,onMouseOut:f.onMouseOut},e))),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:v("margin","spacing"),isShownByDefault:null==h?void 0:h.margin,panelId:e.clientId},(0,u.createElement)(Xo,c({onMouseOver:m.onMouseOver,onMouseOut:m.onMouseOut},e))),!t&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:v("blockGap","spacing"),isShownByDefault:null==h?void 0:h.blockGap,panelId:e.clientId},(0,u.createElement)(xi,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.dimensions)||void 0===n?void 0:n.minHeight)}(e),label:(0,_.__)("Min. height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,dimensions:{...null==r?void 0:r.dimensions,minHeight:void 0}})})}(e),resetAllFilter:v("minHeight","dimensions"),isShownByDefault:null==y?void 0:y.minHeight,panelId:e.clientId},(0,u.createElement)(ii,e)),!i&&(0,u.createElement)(g.__experimentalVStack,{as:g.__experimentalToolsPanelItem,spacing:2,hasValue:()=>function(e){var t;return void 0!==(null===(t=e.attributes.style)||void 0===t?void 0:t.layout)}(e),label:mi(k),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,layout:void 0}})}(e),resetAllFilter:v("selfStretch","layout"),isShownByDefault:!1,panelId:e.clientId},(0,u.createElement)(pi,e))),!n&&(0,u.createElement)(ci,c({forceShow:f.isMouseOver},e)),!r&&(0,u.createElement)(ei,c({forceShow:m.isMouseOver},e)))}const ki=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ai(e),n=oi(e),r=ai(e),o=Zo(e),i=fi(e);return t&&n&&r&&o&&i};function Ei(e,t){var n;const r=(0,a.getBlockSupport)(e,gi);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Si(e,t){const n=Ei(e,t);return!(n&&n.some((e=>hi.includes(e)))&&n.some((e=>vi.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function wi(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.blockGap)}function Ci(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Ii(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Ci(e);if(!n)return null;const r=no(null==n?void 0:n.top)||t,o=no(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function Ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.blockGap");return!wi(e)||t}function xi(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=yo("spacing.spacingSizes"),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),s=Ei(o,"blockGap"),c=Xr(n);if(Ai(e))return null;const p=s&&s.some((e=>vi.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Ci(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:Ro(o)});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 a;c.current&&l&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},f=Ci(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),m=p?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:{top:null==f?void 0:f.top};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,u.createElement)(g.__experimentalBoxControl,{label:(0,_.__)("Block spacing"),min:0,onChange:d,units:a,sides:s,values:m,allowReset:!1,splitOnAxis:p}):(0,u.createElement)(g.__experimentalUnitControl,{label:(0,_.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:a,value:m})),(null==l?void 0:l.length)>0&&(0,u.createElement)(Co,{values:m,onChange:d,label:(0,_.__)("Block spacing"),sides:p?s:["top"],units:a,allowReset:!1,splitOnAxis:p})),native:null})}const Bi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Pi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ti=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Oi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Ni=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Mi={top:{icon:Ti,title:(0,_._x)("Align top","Block vertical alignment setting")},center:{icon:Pi,title:(0,_._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Bi,title:(0,_._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Oi,title:(0,_._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ni,title:(0,_._x)("Space between","Block vertical alignment setting")}},Ri=["top","center","bottom"];var Fi=function(e){let{value:t,onChange:n,controls:r=Ri,isCollapsed:o=!0,isToolbar:i}=e;const l=Mi[t],a=Mi.top,s=i?g.ToolbarGroup:g.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{variant:"toolbar"}};return(0,u.createElement)(s,c({icon:l?l.icon:a.icon,label:(0,_._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Mi[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const Li=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!1})),Di=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!0})),Ui={left:jr,center:zr,right:Vr,"space-between":Gr,stretch:Hr};var ji=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:l}=e;const a=e=>{r(e===o?void 0:e)},s=o?Ui[o]:Ui.left,p=[{name:"left",icon:jr,title:(0,_.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:zr,title:(0,_.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:Vr,title:(0,_.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:Gr,title:(0,_.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")},{name:"stretch",icon:Hr,title:(0,_.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>a("stretch")}],d=l?g.ToolbarGroup:g.ToolbarDropdownMenu,f=l?{isCollapsed:n}:{};return(0,u.createElement)(d,c({icon:s,popoverProps:i,label:(0,_.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},f))};const zi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!1})),Vi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!0})),Gi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Hi={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Wi={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},$i=["wrap","nowrap"];var Ki={name:"flex",label:(0,_.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(Ji,{layout:t,onChange:n})),(0,u.createElement)(g.FlexItem,null,o&&(0,u.createElement)(Qi,{layout:t,onChange:n}))),(0,u.createElement)(Yi,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Ji,{layout:t,onChange:n,isToolbar:!0}),o&&(0,u.createElement)(qi,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Uo(l,"spacing","blockGap")?Ii(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=Gi[o.justifyContent],d=$i.includes(o.flexWrap)?o.flexWrap:"wrap",f=Wi[o.verticalAlignment],m=Hi[o.justifyContent]||Hi.left;let y="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(f&&g.push(`justify-content: ${f}`),g.push("flex-direction: column"),g.push(`align-items: ${m}`)),g.length&&(y=`${Kr(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(y+=qr(r,s,"flex",u)),y},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function qi(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{orientation:o="horizontal"}=t,i="horizontal"===o?Wi.center:Wi.top,{verticalAlignment:l=i}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,u.createElement)(Li,{onChange:a,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,_.__)("Align items top")},{value:"center",label:(0,_.__)("Align items center")},{value:"flex-end",label:(0,_.__)("Align items bottom")}];return(0,u.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,u.createElement)("legend",null,(0,_.__)("Vertical alignment")),(0,u.createElement)("div",null,s.map(((e,t,n)=>(0,u.createElement)(g.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>a(e)})))))}function Ji(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===i?a.push("space-between"):a.push("stretch"),r)return(0,u.createElement)(zi,{allowedControls:a,value:o,onChange:l,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}];return"horizontal"===i?s.push({value:"space-between",icon:Gr,label:(0,_.__)("Space between items")}):s.push({value:"stretch",icon:Hr,label:(0,_.__)("Stretch items")}),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})})))}function Yi(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,u.createElement)(g.ToggleControl,{label:(0,_.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Qi(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal",verticalAlignment:o,justifyContent:i}=t;return(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,_.__)("Orientation"),value:r,onChange:e=>{let r=o,l=i;return"horizontal"===e?("space-between"===o&&(r="center"),"stretch"===i&&(l="left")):("stretch"===o&&(r="top"),"space-between"===i&&(l="left")),n({...t,orientation:e,verticalAlignment:r,justifyContent:l})}},(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:Wr,value:"horizontal",label:(0,_.__)("Horizontal")}),(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:$r,value:"vertical",label:(0,_.__)("Vertical")}))}var Zi={name:"default",label:(0,_.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Ii(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";Uo(o,"spacing","blockGap")||(null!=a&&a.top?s=Ii(null==a?void 0:a.top):"string"==typeof a&&(s=Ii(a)));let c="";return i&&s&&(c+=qr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e,t){const n=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:o}=e;t&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:n.wide})}return r.unshift({name:"none",info:n.none}),r}};var Xi=function(e){let{icon:t,size:n=24,...r}=e;return(0,u.cloneElement)(t,{width:n,height:n,...r})};var el=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var tl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),nl=window.wp.styleEngine,rl={name:"constrained",label:(0,_.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}],a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,u.createElement)(Xi,{icon:el})),(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,u.createElement)(Xi,{icon:tl}))),(0,u.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,_.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Ii(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";Uo(l,"spacing","blockGap")||(null!=d&&d.top?f=Ii(null==d?void 0:d.top):"string"==typeof d&&(f=Ii(d)));const m="left"===p?"0 !important":"auto !important",y="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${m};\n\t\t\t\t\t\tmargin-right: ${y};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${m}; }`:"right"===p&&(g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${y}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,nl.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=qr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const ol=[Zi,Ki,rl];function il(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ol.find((t=>t.name===e))}const ll={type:"default"},al=(0,u.createContext)(ll),sl=al.Provider;function cl(){return(0,u.useContext)(al)}function ul(e){let{layout:t={},css:n,...r}=e;const o=il(t.type),i=null!==yo("spacing.blockGap");if(o){var l;if(n)return(0,u.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,u.createElement)("style",null,e)}return null}const pl=[],dl=["none","left","center","right","wide","full"],fl=["wide","full"];function ml(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dl;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),o=cl(),i=il(null==o?void 0:o.type),l=i.getAlignments(o,r);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?pl:t}if("default"!==i.name&&"constrained"!==i.name)return pl;const{alignments:a=dl}=o,s=e.filter((e=>(o.alignments||t||!fl.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?pl:s}var yl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var gl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var hl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var vl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const bl={none:{icon:yl,title:(0,_._x)("None","Alignment option")},left:{icon:gl,title:(0,_.__)("Align left")},center:{icon:el,title:(0,_.__)("Align center")},right:{icon:hl,title:(0,_.__)("Align right")},wide:{icon:tl,title:(0,_.__)("Wide width")},full:{icon:vl,title:(0,_.__)("Full width")}},_l={variant:"toolbar"};var kl=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const l=ml(r);if(!!!l.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=bl[t],p=bl.none,f=o?g.ToolbarGroup:g.ToolbarDropdownMenu,m={icon:s?s.icon:p.icon,label:(0,_.__)("Align")},y=o?{isCollapsed:i,controls:l.map((e=>{let{name:n}=e;return{...bl[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,_.__)("Change alignment")},popoverProps:_l,children:e=>{let{onClose:n}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=bl[r],s=r===t||!t&&"none"===r;return(0,u.createElement)(g.MenuItem,{key:r,icon:i,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,u.createElement)(f,c({},m,y))};const El=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!1})),Sl=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!0})),wl=["left","center","right","wide","full"],Cl=["wide","full"];function Il(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?wl.filter((t=>e.includes(t))):!0===e?[...wl]:[],!r||!0===e&&!n?t.filter((e=>!Cl.includes(e))):t}const Al=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,u.createElement)(e,t),{name:r}=t,o=ml(Il((0,a.getBlockSupport)(r,"align"),(0,a.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!o.length||i)return n;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(El,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=(0,a.getBlockType)(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:o})),n)}),"withToolbarControls"),xl=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=ml(Il((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===o)return(0,u.createElement)(e,t);let l=t.wrapperProps;return i.some((e=>e.name===o))&&(l={...l,"data-align":o}),(0,u.createElement)(e,c({},t,{wrapperProps:l}))}));(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...wl,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",xl),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Al),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Il((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=d()(`align${r}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Bl=/[\s#]/g,Pl={type:"string",source:"attribute",attribute:"id",selector:"*"};const Tl=(0,f.createHigherOrderComponent)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===u.Platform.OS,r=(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,_.__)("HTML anchor"),help:(0,u.createElement)(u.Fragment,null,(0,_.__)("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,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/page-jumps/")},(0,_.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,_.__)("Add an anchor"),onChange:e=>{e=e.replace(Bl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&(0,u.createElement)(Wo,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Heading settings")},r)))}return(0,u.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Pl}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Tl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ol={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ol}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Nl=(0,f.createHigherOrderComponent)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),(0,u.createElement)(Wo,{group:"advanced"},(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,_.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,_.__)("Separate multiple classes with spaces.")}))):(0,u.createElement)(e,t)),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Nl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var Ml=window.wp.dom;const Rl=(0,u.createContext)({});function Fl(e){let{value:t,children:n}=e;const r=(0,u.useContext)(Rl),o=(0,u.useMemo)((()=>({...r,...t})),[r,t]);return(0,u.createElement)(Rl.Provider,{value:o,children:n})}var Ll=Rl;const Dl={};var Ul=(0,g.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,a.getBlockType)(n),o=(0,u.useContext)(Ll),i=(0,u.useMemo)((()=>r&&r.usesContext?Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return r.usesContext.includes(t)}))):Dl),[r,o]);if(!r)return null;const l=r.edit||r.save;if(r.apiVersion>1)return(0,u.createElement)(l,c({},e,{context:i}));const s=(0,a.hasBlockSupport)(r,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,p=d()(s,t.className,e.className);return(0,u.createElement)(l,c({},e,{context:i,className:p}))}));function jl(e){const{name:t,isSelected:n,clientId:r,attributes:o={},__unstableLayoutClassNames:i}=e,{layout:l=null}=o,s={name:t,isSelected:n,clientId:r,layout:(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?l:null,__unstableLayoutClassNames:i};return(0,u.createElement)(Or,{value:(0,u.useMemo)((()=>s),Object.values(s))},(0,u.createElement)(Ul,e))}var zl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vl=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,u.createElement)("div",{style:{display:"contents",all:"initial"}},(0,u.createElement)("div",{className:d()(t,"block-editor-warning")},(0,u.createElement)("div",{className:"block-editor-warning__contents"},(0,u.createElement)("p",{className:"block-editor-warning__message"},r),(u.Children.count(n)>0||o)&&(0,u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,((e,t)=>(0,u.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,u.createElement)(g.DropdownMenu,{className:"block-editor-warning__secondary",icon:zl,label:(0,_.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,u.createElement)(g.MenuGroup,null,o.map(((e,t)=>(0,u.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Gl=n(1973);function Hl(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,u.createElement)("div",{className:l},(0,u.createElement)("div",{className:"block-editor-block-compare__content"},(0,u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,u.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(r)))),(0,u.createElement)("div",{className:"block-editor-block-compare__action"},(0,u.createElement)(g.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var Wl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=(s=o(t),(Array.isArray(s)?s:[s]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const c=(p=t.originalContent,f=l,(0,Gl.Kx)(p,f).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,u.createElement)("span",{key:t,className:n},e.value)})));var p,f;return(0,u.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,u.createElement)(Hl,{title:(0,_.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,_.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,u.createElement)(Hl,{title:(0,_.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:l}))};const $l=e=>(0,a.rawHandler)({HTML:e.originalContent});var Kl=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(xr).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(xr);return{convertToClassic(){r(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,$l(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,a.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!(0,a.getBlockType)("core/html"),s=!!(0,a.getBlockType)("core/freeform"),[c,p]=(0,u.useState)(!1),d=(0,u.useCallback)((()=>p(!0)),[]),f=(0,u.useCallback)((()=>p(!1)),[]),m=(0,u.useMemo)((()=>[{title:(0,_._x)("Resolve","imperative verb"),onClick:d},l&&{title:(0,_.__)("Convert to HTML"),onClick:t},s&&{title:(0,_.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[d,l,t,s,r]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vl,{actions:[(0,u.createElement)(g.Button,{key:"recover",onClick:o,variant:"primary"},(0,_.__)("Attempt Block Recovery"))],secondaryActions:m},(0,_.__)("This block contains unexpected or invalid content.")),c&&(0,u.createElement)(g.Modal,{title:(0,_.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},(0,u.createElement)(Wl,{block:i,onKeep:t,onConvert:n,convertor:$l,convertButtonText:(0,_.__)("Convert to Blocks")})))}));const ql=(0,u.createElement)(Vl,{className:"block-editor-block-list__block-crash-warning"},(0,_.__)("This block has encountered an error and cannot be previewed."));var Jl=()=>ql;class Yl extends u.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 Ql=Yl,Zl=n(773);var Xl=function(e){let{clientId:t}=e;const[n,r]=(0,u.useState)(""),o=(0,m.useSelect)((e=>e(xr).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(xr);return(0,u.useEffect)((()=>{r((0,a.getBlockContent)(o))}),[o]),(0,u.createElement)(Zl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(o.name);if(!e)return;const l=(0,a.getBlockAttributes)(e,n,o.attributes),s=n||(0,a.getSaveContent)(e,l),[c]=n?(0,a.validateBlock)({...o,attributes:l,originalContent:s}):[!0];i(t,{attributes:l,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ea=n(9196),ta=n.n(ea),na=Object.defineProperty,ra={};((e,t)=>{for(var n in t)na(e,n,{get:t[n],enumerable:!0})})(ra,{assign:()=>Fa,colors:()=>Na,createStringInterpolator:()=>Ba,skipAnimation:()=>Ma,to:()=>Pa,willAdvance:()=>Ra});var oa=_a(),ia=e=>ga(e,oa),la=_a();ia.write=e=>ga(e,la);var aa=_a();ia.onStart=e=>ga(e,aa);var sa=_a();ia.onFrame=e=>ga(e,sa);var ca=_a();ia.onFinish=e=>ga(e,ca);var ua=[];ia.setTimeout=(e,t)=>{const n=ia.now()+t,r=()=>{const e=ua.findIndex((e=>e.cancel==r));~e&&ua.splice(e,1),ma-=~e?1:0},o={time:n,handler:e,cancel:r};return ua.splice(pa(n),0,o),ma+=1,ha(),o};var pa=e=>~(~ua.findIndex((t=>t.time>e))||~ua.length);ia.cancel=e=>{aa.delete(e),sa.delete(e),ca.delete(e),oa.delete(e),la.delete(e)},ia.sync=e=>{ya=!0,ia.batchedUpdates(e),ya=!1},ia.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ia.onStart(n)}return r.handler=e,r.cancel=()=>{aa.delete(n),t=null},r};var da="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ia.use=e=>da=e,ia.now="undefined"!=typeof performance?()=>performance.now():Date.now,ia.batchedUpdates=e=>e(),ia.catch=console.error,ia.frameLoop="always",ia.advance=()=>{"demand"!==ia.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ba()};var fa=-1,ma=0,ya=!1;function ga(e,t){ya?(t.delete(e),e(0)):(t.add(e),ha())}function ha(){fa<0&&(fa=0,"demand"!==ia.frameLoop&&da(va))}function va(){~fa&&(da(va),ia.batchedUpdates(ba))}function ba(){const e=fa;fa=ia.now();const t=pa(fa);t&&(ka(ua.splice(0,t),(e=>e.handler())),ma-=t),ma?(aa.flush(),oa.flush(e?Math.min(64,fa-e):16.667),sa.flush(),la.flush(),ca.flush()):fa=-1}function _a(){let e=new Set,t=e;return{add(n){ma+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ma-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ma-=t.size,ka(t,(t=>t(n)&&e.add(t))),ma+=e.size,t=e)}}}function ka(e,t){e.forEach((e=>{try{t(e)}catch(e){ia.catch(e)}}))}function Ea(){}var Sa={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function wa(e,t){if(Sa.arr(e)){if(!Sa.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ia(e,t,n){if(Sa.arr(e))for(let r=0;rSa.und(e)?[]:Sa.arr(e)?e:[e];function xa(e,t){if(e.size){const n=Array.from(e);e.clear(),Ca(n,t)}}var Ba,Pa,Ta=(e,...t)=>xa(e,(e=>e(...t))),Oa=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Na=null,Ma=!1,Ra=Ea,Fa=e=>{e.to&&(Pa=e.to),e.now&&(ia.now=e.now),void 0!==e.colors&&(Na=e.colors),null!=e.skipAnimation&&(Ma=e.skipAnimation),e.createStringInterpolator&&(Ba=e.createStringInterpolator),e.requestAnimationFrame&&ia.use(e.requestAnimationFrame),e.batchedUpdates&&(ia.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ra=e.willAdvance),e.frameLoop&&(ia.frameLoop=e.frameLoop)},La=new Set,Da=[],Ua=[],ja=0,za={get idle(){return!La.size&&!Da.length},start(e){ja>e.priority?(La.add(e),ia.onStart(Va)):(Ga(e),ia(Wa))},advance:Wa,sort(e){if(ja)ia.onFrame((()=>za.sort(e)));else{const t=Da.indexOf(e);~t&&(Da.splice(t,1),Ha(e))}},clear(){Da=[],La.clear()}};function Va(){La.forEach(Ga),La.clear(),ia(Wa)}function Ga(e){Da.includes(e)||Ha(e)}function Ha(e){Da.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Da,(t=>t.priority>e.priority)),0,e)}function Wa(e){const t=Ua;for(let n=0;n0}var $a="[-+]?\\d*\\.?\\d+",Ka=$a+"%";function qa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ja=new RegExp("rgb"+qa($a,$a,$a)),Ya=new RegExp("rgba"+qa($a,$a,$a,$a)),Qa=new RegExp("hsl"+qa($a,Ka,Ka)),Za=new RegExp("hsla"+qa($a,Ka,Ka,$a)),Xa=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,es=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ts=/^#([0-9a-fA-F]{6})$/,ns=/^#([0-9a-fA-F]{8})$/;function rs(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 os(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rs(o,r,e+1/3),l=rs(o,r,e),a=rs(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function is(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ls(e){return(parseFloat(e)%360+360)%360/360}function as(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ss(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ts.exec(e))?parseInt(t[1]+"ff",16)>>>0:Na&&void 0!==Na[e]?Na[e]:(t=Ja.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|255)>>>0:(t=Ya.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|as(t[4]))>>>0:(t=Xa.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ns.exec(e))?parseInt(t[1],16)>>>0:(t=es.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qa.exec(e))?(255|os(ls(t[1]),ss(t[2]),ss(t[3])))>>>0:(t=Za.exec(e))?(os(ls(t[1]),ss(t[2]),ss(t[3]))|as(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var us=(e,t,n)=>{if(Sa.fun(e))return e;if(Sa.arr(e))return us({range:e,output:t,extrapolate:n});if(Sa.str(e.output[0]))return Ba(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ps=1.70158,ds=1.525*ps,fs=ps+1,ms=2*Math.PI/3,ys=2*Math.PI/4.5,gs=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>fs*e*e*e-ps*e*e,easeOutBack:e=>1+fs*Math.pow(e-1,3)+ps*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-ds)/2:(Math.pow(2*e-2,2)*((ds+1)*(2*e-2)+ds)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ms),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ms)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ys)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ys)/2+1,easeInBounce:e=>1-gs(1-e),easeOutBounce:gs,easeInOutBounce:e=>e<.5?(1-gs(1-2*e))/2:(1+gs(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},vs=Symbol.for("FluidValue.get"),bs=Symbol.for("FluidValue.observers"),_s=e=>Boolean(e&&e[vs]),ks=e=>e&&e[vs]?e[vs]():e,Es=e=>e[bs]||null;function Ss(e,t){const n=e[bs];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ws=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Cs(this,e)}},Cs=(e,t)=>Bs(e,vs,t);function Is(e,t){if(e[vs]){let n=e[bs];n||Bs(e,bs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[bs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[bs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var xs,Bs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ps=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ts=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Os=new RegExp(`(${Ps.source})(%|[a-z]+)`,"i"),Ns=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ms=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Rs=e=>{const[t,n]=Fs(e);if(!t||Oa())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ms.test(n)?Rs(n):n||e},Fs=e=>{const t=Ms.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ls=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ds=e=>{xs||(xs=Na?new RegExp(`(${Object.keys(Na).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ks(e).replace(Ms,Rs).replace(Ts,cs).replace(xs,cs))),n=t.map((e=>e.match(Ps).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>us({...e,output:t})));return e=>{const n=!Os.test(t[0])&&t.find((e=>Os.test(e)))?.replace(Ps,"");let r=0;return t[0].replace(Ps,(()=>`${o[r++](e)}${n||""}`)).replace(Ns,Ls)}},Us="react-spring: ",js=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Us}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},zs=js(console.warn);var Vs=js(console.warn);function Gs(e){return Sa.str(e)&&("#"==e[0]||/\d/.test(e)||!Oa()&&Ms.test(e)||e in(Na||{}))}var Hs=Oa()?ea.useEffect:ea.useLayoutEffect;function Ws(){const e=(0,ea.useState)()[1],t=(()=>{const e=(0,ea.useRef)(!1);return Hs((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var $s=e=>(0,ea.useEffect)(e,Ks),Ks=[];function qs(e){const t=(0,ea.useRef)();return(0,ea.useEffect)((()=>{t.current=e})),t.current}var Js=Symbol.for("Animated:node"),Ys=e=>e&&e[Js],Qs=(e,t)=>{return n=e,r=Js,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},Zs=e=>e&&e[Js]&&e[Js].getPayload(),Xs=class{constructor(){Qs(this,this)}getPayload(){return this.payload||[]}},ec=class extends Xs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Sa.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Sa.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Sa.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},tc=class extends ec{constructor(e){super(0),this._string=null,this._toString=us({output:[e,e]})}static create(e){return new tc(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Sa.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=us({output:[this.getValue(),e]})),this._value=0,super.reset()}},nc={dependencies:null},rc=class extends Xs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ia(this.source,((n,r)=>{var o;(o=n)&&o[Js]===o?t[r]=n.getValue(e):_s(n)?t[r]=ks(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ca(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ia(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){nc.dependencies&&_s(e)&&nc.dependencies.add(e);const t=Zs(e);t&&Ca(t,(e=>this.add(e)))}},oc=class extends rc{constructor(e){super(e)}static create(e){return new oc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ic)),!0)}};function ic(e){return(Gs(e)?tc:ec).create(e)}function lc(e){const t=Ys(e);return t?t.constructor:Sa.arr(e)?oc:Gs(e)?tc:ec}var ac=(e,t)=>{const n=!Sa.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ea.forwardRef)(((r,o)=>{const i=(0,ea.useRef)(null),l=n&&(0,ea.useCallback)((e=>{i.current=function(e,t){e&&(Sa.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;nc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new rc(e),nc.dependencies=null,[e,n]}(r,t),c=Ws(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new sc(u,s),d=(0,ea.useRef)();Hs((()=>(d.current=p,Ca(s,(e=>Is(e,p))),()=>{d.current&&(Ca(d.current.deps,(e=>As(e,d.current))),ia.cancel(d.current.update))}))),(0,ea.useEffect)(u,[]),$s((()=>()=>{const e=d.current;Ca(e.deps,(t=>As(t,e)))}));const f=t.getComponentProps(a.getValue());return ea.createElement(e,{...f,ref:l})}))},sc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ia.write(this.update)}};var cc=Symbol.for("AnimatedComponent"),uc=e=>Sa.str(e)?e:e&&Sa.str(e.displayName)?e.displayName:Sa.fun(e)&&e.name||null;function pc(e,...t){return Sa.fun(e)?e(...t):e}var dc=(e,t)=>!0===e||!!(t&&e&&(Sa.fun(e)?e(t):Aa(e).includes(t))),fc=(e,t)=>Sa.obj(e)?t&&e[t]:e,mc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yc=e=>e,gc=(e,t=yc)=>{let n=hc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Sa.und(n)||(r[o]=n)}return r},hc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],vc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bc(e){const t=function(e){const t={};let n=0;if(Ia(e,((e,r)=>{vc[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ia(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function _c(e){return e=ks(e),Sa.arr(e)?e.map(_c):Gs(e)?ra.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kc(e){for(const t in e)return!0;return!1}function Ec(e){return Sa.fun(e)||Sa.arr(e)&&Sa.obj(e[0])}function Sc(e,t){e.ref?.delete(e),t?.delete(e)}function wc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Cc={tension:170,friction:26,mass:1,damping:1,easing:hs.linear,clamp:!1};function Ic(e,t){if(Sa.und(t.decay)){const n=!Sa.und(t.tension)||!Sa.und(t.friction);!n&&Sa.und(t.frequency)&&Sa.und(t.damping)&&Sa.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ac=[];function xc(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=dc(n.cancel??r?.cancel,t);if(u)f();else{Sa.und(n.pause)||(o.paused=dc(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||dc(e,t)),s=pc(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ia.now()}function d(){s>0&&!ra.skipAnimation?(o.delayed=!0,c=ia.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Bc=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Oc(e.get()):t.every((e=>e.noop))?Pc(e.get()):Tc(e.get(),t.every((e=>e.finished))),Pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Tc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Oc=e=>({value:e,cancelled:!0,finished:!1});function Nc(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=gc(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Oc(r)||o!==n.asyncId&&Tc(r,!1);if(t)throw e.result=t,p(e),e},m=(e,t)=>{const i=new Rc,l=new Fc;return(async()=>{if(ra.skipAnimation)throw Mc(n),l.result=Tc(r,!1),p(l),l;f(i);const a=Sa.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ia(c,((e,t)=>{Sa.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let y;if(ra.skipAnimation)return Mc(n),Tc(r,!1);try{let t;t=Sa.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),d]),y=Tc(r.get(),!0,!1)}catch(e){if(e instanceof Rc)y=e.result;else{if(!(e instanceof Fc))throw e;y=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Sa.fun(l)&&ia.batchedUpdates((()=>{l(y,r,r.item)})),y})():s}function Mc(e,t){xa(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Rc=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Fc=class extends Error{constructor(){super("SkipAnimationSignal")}},Lc=e=>e instanceof Uc,Dc=1,Uc=class extends ws{constructor(){super(...arguments),this.id=Dc++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ys(this);return e&&e.getValue()}to(...e){return ra.to(this,e)}interpolate(...e){return zs(`${Us}The "interpolate" function is deprecated in v9 (use "to" instead)`),ra.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ss(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||za.sort(this),Ss(this,{type:"priority",parent:this,priority:e})}},jc=Symbol.for("SpringPhase"),zc=e=>(1&e[jc])>0,Vc=e=>(2&e[jc])>0,Gc=e=>(4&e[jc])>0,Hc=(e,t)=>t?e[jc]|=3:e[jc]&=-3,Wc=(e,t)=>t?e[jc]|=4:e[jc]&=-5,$c=class extends Uc{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ac,this.toValues=null,this.fromValues=Ac,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Cc)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Sa.und(e)||!Sa.und(t)){const n=Sa.obj(e)?{...e}:{...t,from:e};Sa.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vc(this)||this._state.asyncTo)||Gc(this)}get goal(){return ks(this.animation.to)}get velocity(){const e=Ys(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return zc(this)}get isAnimating(){return Vc(this)}get isPaused(){return Gc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=Zs(r.to);!l&&_s(r.to)&&(o=Aa(ks(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==tc?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Sa.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Sa.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Sa.und(r),f=n==c?a.v0>0:nt,m||(u=Math.abs(c-p)<=d,!u));++e){s&&(y=p==c||p>c==f,y&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=Ys(this),s=a.getValue();if(t){const e=ks(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ia.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vc(this)){const{to:e,config:t}=this.animation;ia.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Sa.und(e)?(n=this.queue||[],this.queue=[]):n=[Sa.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Bc(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Mc(this._state,e&&this._lastCallId),ia.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Sa.obj(n)?n[t]:n,(null==n||Ec(n))&&(n=void 0),r=Sa.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return zc(this)||(e.reverse&&([n,r]=[r,n]),r=ks(r),Sa.und(r)?Ys(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,gc(e,((e,t)=>/^on/.test(t)?fc(e,n):e))),Xc(this,e,"onProps"),eu(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return xc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Gc(this)||(Wc(this,!0),Ta(i.pauseQueue),eu(this,"onPause",Tc(this,Kc(this,this.animation.to)),this))},resume:()=>{Gc(this)&&(Wc(this,!1),Vc(this)&&this._resume(),Ta(i.resumeQueue),eu(this,"onResume",Tc(this,Kc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=qc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Oc(this));const r=!Sa.und(e.to),o=!Sa.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Oc(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Sa.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!wa(p,c);d&&(a.from=p),p=ks(p);const f=!wa(u,s);f&&this._focus(u);const m=Ec(t.to),{config:y}=a,{decay:g,velocity:h}=y;(r||o)&&(y.velocity=0),t.config&&!m&&function(e,t,n){n&&(Ic(n={...n},t),t={...n,...t}),Ic(e,t),Object.assign(e,t);for(const t in Cc)null==e[t]&&(e[t]=Cc[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Sa.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(y,pc(t.config,i),t.config!==l.config?pc(l.config,i):void 0);let v=Ys(this);if(!v||Sa.und(u))return n(Tc(this,!0));const b=Sa.und(t.reset)?o&&!t.default:!Sa.und(p)&&dc(t.reset,i),_=b?p:this.get(),k=_c(u),E=Sa.num(k)||Sa.arr(k)||Gs(k),S=!m&&(!E||dc(l.immediate||t.immediate,i));if(f){const e=lc(u);if(e!==v.constructor){if(!S)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(k)}}const w=v.constructor;let C=_s(u),I=!1;if(!C){const e=b||!zc(this)&&d;(f||e)&&(I=wa(_c(_),k),C=!I),(wa(a.immediate,S)||S)&&wa(y.decay,g)&&wa(y.velocity,h)||(C=!0)}if(I&&Vc(this)&&(a.changed&&!b?C=!0:C||this._stop(s)),!m&&((C||_s(s))&&(a.values=v.getPayload(),a.toValues=_s(u)?null:w==tc?[1]:Aa(k)),a.immediate!=S&&(a.immediate=S,S||b||this._set(s)),C)){const{onRest:e}=a;Ca(Zc,(e=>Xc(this,t,e)));const r=Tc(this,Kc(this,s));Ta(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ia.batchedUpdates((()=>{a.changed=!b,e?.(r,this),b?pc(l.onRest,r):a.onStart?.(r,this)}))}b&&this._set(_),m?n(Nc(t.to,t,this._state,this)):C?this._start():Vc(this)&&!f?this._pendingCalls.add(n):n(Pc(_))}_focus(e){const t=this.animation;e!==t.to&&(Es(this)&&this._detach(),t.to=e,Es(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_s(t)&&(Is(t,this),Lc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_s(e)&&As(e,this)}_set(e,t=!0){const n=ks(e);if(!Sa.und(n)){const e=Ys(this);if(!e||!wa(n,e.getValue())){const r=lc(n);e&&e.constructor==r?e.setValue(n):Qs(this,r.create(n)),e&&ia.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ys(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,eu(this,"onStart",Tc(this,Kc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pc(this.animation.onChange,e,this)),pc(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ys(this).reset(ks(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Vc(this)||(Hc(this,!0),Gc(this)||this._resume())}_resume(){ra.skipAnimation?this.finish():za.start(this)}_stop(e,t){if(Vc(this)){Hc(this,!1);const n=this.animation;Ca(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ss(this,{type:"idle",parent:this});const r=t?Oc(this.get()):Tc(this.get(),Kc(this,e??n.to));Ta(this._pendingCalls,r),n.changed&&(n.changed=!1,eu(this,"onRest",r,this))}}};function Kc(e,t){const n=_c(t);return wa(_c(e.get()),n)}function qc(e,t=e.loop,n=e.to){const r=pc(t);if(r){const o=!0!==r&&bc(r),i=(o||e).reverse,l=!o||o.reset;return Jc({...e,loop:t,default:!1,pause:void 0,to:!i||Ec(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function Jc(e){const{to:t,from:n}=e=bc(e),r=new Set;return Sa.obj(t)&&Qc(t,r),Sa.obj(n)&&Qc(n,r),e.keys=r.size?Array.from(r):null,e}function Yc(e){const t=Jc(e);return Sa.und(t.default)&&(t.default=gc(t)),t}function Qc(e,t){Ia(e,((e,n)=>null!=e&&t.add(n)))}var Zc=["onStart","onRest","onChange","onPause","onResume"];function Xc(e,t,n){e.animation[n]=t[n]!==mc(t,n)?fc(t[n],e.key):void 0}function eu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var tu=["onStart","onChange","onRest"],nu=1,ru=class{constructor(e,t){this.id=nu++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Sa.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Jc(e)),this}start(e){let{queue:t}=this;return e?t=Aa(e).map(Jc):this.queue=[],this._flush?this._flush(this,t):(uu(this,t),ou(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ca(Aa(t),(t=>n[t].stop(!!e)))}else Mc(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Sa.und(e))this.start({pause:!0});else{const t=this.springs;Ca(Aa(e),(e=>t[e].pause()))}return this}resume(e){if(Sa.und(e))this.start({pause:!1});else{const t=this.springs;Ca(Aa(e),(e=>t[e].resume()))}return this}each(e){Ia(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,xa(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&xa(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,xa(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ia.onFrame(this._onFrame)}};function ou(e,t){return Promise.all(t.map((t=>iu(e,t)))).then((t=>Bc(e,t)))}async function iu(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Sa.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Sa.arr(o)||Sa.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ca(tu,(n=>{const r=t[n];if(Sa.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,Ta(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===mc(t,"cancel");(u||f&&p.asyncId)&&d.push(xc(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ea,resume:Ea,start(t,n){f?(Mc(p,e._lastAsyncId),n(Oc(e))):(t.onRest=a,n(Nc(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const m=Bc(e,await Promise.all(d));if(l&&m.finished&&(!n||!m.noop)){const n=qc(t,l,o);if(n)return uu(e,[n]),iu(e,n,!0)}return s&&ia.batchedUpdates((()=>s(m,e,e.item))),m}function lu(e,t){const n={...e.springs};return t&&Ca(Aa(t),(e=>{Sa.und(e.keys)&&(e=Jc(e)),Sa.obj(e.to)||(e={...e,to:void 0}),cu(n,e,(e=>su(e)))})),au(e,n),n}function au(e,t){Ia(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Is(t,e))}))}function su(e,t){const n=new $c;return n.key=e,t&&Is(n,t),n}function cu(e,t,n){t.keys&&Ca(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function uu(e,t){Ca(t,(t=>{cu(e.springs,t,(t=>su(t,e)))}))}var pu,du,fu=({children:e,...t})=>{const n=(0,ea.useContext)(mu),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ea.useState)((()=>({inputs:t,result:e()}))),r=(0,ea.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=mu;return ea.createElement(i,{value:t},e)},mu=(pu=fu,du={},Object.assign(pu,ea.createContext(du)),pu.Provider._context=pu,pu.Consumer._context=pu,pu);fu.Provider=mu.Provider,fu.Consumer=mu.Consumer;var yu=()=>{const e=[],t=function(t){Vs(`${Us}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Ca(e,((e,o)=>{if(Sa.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ca(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Ca(e,(e=>e.resume(...arguments))),this},t.set=function(t){Ca(e,((e,n)=>{const r=Sa.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Ca(e,((e,r)=>{if(Sa.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Ca(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Ca(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Sa.fun(e)?e(n,t):e};return t._getProps=n,t};function gu(e,t,n){const r=Sa.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ea.useMemo)((()=>r||3==arguments.length?yu():void 0),[]),i=(0,ea.useRef)(0),l=Ws(),a=(0,ea.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=lu(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ou(e,t):new Promise((r=>{au(e,n),a.queue.push((()=>{r(ou(e,t))})),l()}))}})),[]),s=(0,ea.useRef)([...a.ctrls]),c=[],u=qs(e)||0;function p(e,n){for(let o=e;o{Ca(s.current.slice(e,u),(e=>{Sc(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ea.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>lu(e,c[t]))),f=(0,ea.useContext)(fu),m=qs(f),y=f!==m&&kc(f);Hs((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Ca(e,(e=>e()))),Ca(s.current,((e,t)=>{o?.add(e),y&&e.start({default:f});const n=c[t];n&&(wc(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),$s((()=>()=>{Ca(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function hu(e,t){const n=Sa.fun(e),[[r],o]=gu(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var vu=class extends Uc{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=us(...t);const n=this._get(),r=lc(n);Qs(this,r.create(n))}advance(e){const t=this._get();wa(t,this.get())||(Ys(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&_u(this._active)&&ku(this)}_get(){const e=Sa.arr(this.source)?this.source.map(ks):Aa(ks(this.source));return this.calc(...e)}_start(){this.idle&&!_u(this._active)&&(this.idle=!1,Ca(Zs(this),(e=>{e.done=!1})),ra.skipAnimation?(ia.batchedUpdates((()=>this.advance())),ku(this)):za.start(this))}_attach(){let e=1;Ca(Aa(this.source),(t=>{_s(t)&&Is(t,this),Lc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ca(Aa(this.source),(e=>{_s(e)&&As(e,this)})),this._active.clear(),ku(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Aa(this.source).reduce(((e,t)=>Math.max(e,(Lc(t)?t.priority:0)+1)),0))}};function bu(e){return!1!==e.idle}function _u(e){return!e.size||Array.from(e).every(bu)}function ku(e){e.idle||(e.idle=!0,Ca(Zs(e),(e=>{e.done=!0})),Ss(e,{type:"idle",parent:e}))}ra.assign({createStringInterpolator:Ds,to:(e,t)=>new vu(e,t)});za.advance;var Eu=window.ReactDOM,Su=/^--/;function wu(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Su.test(e)||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}var Cu={};var Iu={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},Au=["Webkit","Ms","Moz","O"];Iu=Object.keys(Iu).reduce(((e,t)=>(Au.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Iu);var xu=/^(matrix|translate|scale|rotate|skew)/,Bu=/^(translate)/,Pu=/^(rotate|skew)/,Tu=(e,t)=>Sa.num(e)&&0!==e?e+t:e,Ou=(e,t)=>Sa.arr(e)?e.every((e=>Ou(e,t))):Sa.num(e)?e===t:parseFloat(e)===t,Nu=class extends rc{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Tu(e,"px"))).join(",")})`,Ou(e,0)]))),Ia(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(xu.test(t)){if(delete r[t],Sa.und(e))return;const n=Bu.test(t)?"px":Pu.test(t)?"deg":"";o.push(Aa(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Tu(o,n)})`,Ou(o,0)]:e=>[`${t}(${e.map((e=>Tu(e,n))).join(",")})`,Ou(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Mu(o,i)),super(r)}},Mu=class extends ws{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ca(this.inputs,((n,r)=>{const o=ks(n[0]),[i,l]=this.transforms[r](Sa.arr(o)?o:n.map(ks));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&Is(e,this)))))}observerRemoved(e){0==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&As(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ss(this,e)}};ra.assign({batchedUpdates:Eu.unstable_batchedUpdates,createStringInterpolator:Ds,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Ru=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new rc(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=uc(e)||"Anonymous";return(e=Sa.str(e)?i[e]||(i[e]=ac(e,o)):e[cc]||(e[cc]=ac(e,o))).displayName=`Animated(${t})`,e};return Ia(e,((t,n)=>{Sa.arr(e)&&(n=uc(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cu[t]||(Cu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=wu(t,r[t]);Su.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Nu(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Fu=Ru.animated;const Lu=e=>e+1,Du=e=>({top:e.offsetTop,left:e.offsetLeft});var Uu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,u.useRef)(),l=(0,f.useReducedMotion)()||!r,[a,s]=(0,u.useReducer)(Lu,0),[c,p]=(0,u.useReducer)(Lu,0),[d,m]=(0,u.useState)({x:0,y:0}),y=(0,u.useMemo)((()=>i.current?Du(i.current):null),[o]),g=(0,u.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Ml.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,u.useLayoutEffect)((()=>{a&&p()}),[a]),(0,u.useLayoutEffect)((()=>{if(!y)return;if(l)return void g();i.current.style.transform=void 0;const e=Du(i.current);s(),m({x:Math.round(y.left-e.left),y:Math.round(y.top-e.top)})}),[o]),hu({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const ju=".block-editor-block-list__block",zu=".block-list-appender",Vu=".block-editor-button-block-appender";function Gu(e,t){return t.closest([ju,zu,Vu].join(","))===e}function Hu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ju);return t?t.id.slice("block-".length):void 0}function Wu(e){const t=(0,u.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(xr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,m.useSelect)(xr);return(0,u.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Gu(t.current,i.activeElement))return;const l=Ml.focus.tabbable.find(t.current).filter((e=>(0,Ml.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Gu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Ml.focus.tabbable.findNext(t.current);if(e&&Gu(t.current,e)&&(0,Ml.isFormElement)(e))return void e.focus()}(0,Ml.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function $u(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Ku(){const e=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().outlineMode}),[]);return(0,f.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",$u),t.addEventListener("mouseover",$u),()=>{t.removeEventListener("mouseout",$u),t.removeEventListener("mouseover",$u),t.classList.remove("is-hovered")}}),[e])}function qu(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:f}=t(xr),{outlineMode:m}=s(),y=n(e),g=o(e),h=l(e),v=c(e,!0),b=i(e);return d()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":b,"is-partially-selected":b&&!p()&&!f(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(h)),"is-dragging":y,"has-child-selected":v,"remove-outline":g&&m&&u()})}),[e])}function Ju(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlockName(e),r=(0,a.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function Yu(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr),o=r(e);if(null==o||!o.className)return;const i=(0,a.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function Qu(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(xr);if(!l(e))return;const a=n();return a?d()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function Zu(e){const{isBlockSelected:t}=(0,m.useSelect)(xr),{selectBlock:n,selectionChange:r}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Gu(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var Xu=window.wp.keycodes;function ep(e){const t=(0,m.useSelect)((t=>t(xr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,m.useSelect)(xr),{insertDefaultBlock:o,removeBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Xu.ENTER&&a!==Xu.BACKSPACE&&a!==Xu.DELETE||s!==l||(0,Ml.isTextField)(s)||(t.preventDefault(),a===Xu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function tp(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(xr),{setNavigationMode:r,selectBlock:o}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function np(){const e=(0,u.useContext)($h);return(0,f.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function rp(e){return(0,m.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(xr);return n(e)}),[e])}function op(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,u.useContext)(ip),{index:l,mode:s,name:c,blockApiVersion:p,blockTitle:y,isPartOfSelection:g,adjustScrolling:h,enableAnimation:v}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:l,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:p,isFirstMultiSelectedBlock:d}=e(xr),{getActiveBlockVariation:f}=e(a.store),m=c(n),y=u(n)||p(n),g=i(n),h=(0,a.getBlockType)(g),v=f(g,t(n));return{index:r(n),mode:o(n),name:g,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:(null==v?void 0:v.title)||(null==h?void 0:h.title),isPartOfSelection:m||y,adjustScrolling:m||d(n),enableAnimation:!l()&&s()<=200}}),[n]),b=rp(n),k=(0,_.sprintf)((0,_.__)("Block: %s"),y),E="html"!==s||t?"":"-visual",S=(0,f.useMergeRefs)([e.ref,Wu(n),Zr(n),Zu(n),ep(n),tp(n),Ku(),np(),Uu({isSelected:g,adjustScrolling:h,enableAnimation:v,triggerAnimationOnChange:l}),(0,f.useDisabled)({isDisabled:!b})]),w=Nr();return p<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...o,...e,ref:S,id:`block-${n}${E}`,role:"document","aria-label":k,"data-block":n,"data-type":c,"data-title":y,className:d()(d()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":b}),r,e.className,o.className,qu(n),Ju(n),Yu(n),Qu(n)),style:{...o.style,...e.style}}}op.save=a.__unstableGetBlockProps;const ip=(0,u.createContext)();function lp(e){let{children:t,isHtml:n,...r}=e;return(0,u.createElement)("div",op(r,{__unstableIsHtml:n}),t)}const ap=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(xr),p=s(n),d=o(n),f=a(r),m=c(n,r),y=u(n,r),{name:g,attributes:h,isValid:v}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:m,canMove:y,block:p,name:g,attributes:h,isValid:v,isSelected:d}})),sp=(0,m.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:l,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p}=e(xr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(xr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:l}=n.select(xr),a=l(r);o(e,a+1,i)},onMerge(e){const{clientId:r,rootClientId:l}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:d,getBlockAttributes:f,getBlockName:m,getBlockOrder:y,getBlockIndex:g,getBlockRootClientId:h,canInsertBlockType:v}=n.select(xr);function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=h(e),i=y(e),[l]=i;if(1===i.length&&(0,a.isUnmodifiedBlock)(d(l)))p(e);else{if(v(m(l),r))u([l],e,r,g(e));else{const i=(0,a.switchToBlockType)(d(l),(0,a.getDefaultBlockName)());i&&i.length&&n.batch((()=>{o(i,g(e),r,t),p(l,!1)}))}!y(e).length&&(0,a.isUnmodifiedBlock)(d(e))&&p(e,!1)}}if(e){if(l){const e=c(l);if(e){if(m(l)!==m(e))return void i(l,e);{const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(e),e,l),p(e,!1)}))}}}const e=c(r);if(!e)return;y(e).length?b(e,!1):i(r,e)}else{const e=s(r);if(e)i(e,r);else if(l){const e=s(l);if(e&&m(l)===m(e)){const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(l),l,e),p(l,!1)}))}b(l)}}},onReplace(e,n,r){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),l([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var cp=(0,f.compose)(f.pure,ap,sp,(0,f.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,g.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:s,isSelectionEnabled:c,className:p,__unstableLayoutClassNames:f,name:y,isValid:g,attributes:h,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:E,toggleSelection:S}=e;const{themeSupportsLayout:w,hasContentLockedParent:C,isContentBlock:I,isContentLocking:A,isTemporarilyEditingAsBlocks:x}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr),i=!!n(l);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(a.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:i,isContentLocking:"contentOnly"===r(l)&&!i,isTemporarilyEditingAsBlocks:o()===l}}),[y,l]),{removeBlock:B}=(0,m.useDispatch)(xr),P=(0,u.useCallback)((()=>B(l)),[l]),T=cl()||{};let O=(0,u.createElement)(jl,{name:y,isSelected:s,attributes:h,setAttributes:b,insertBlocksAfter:o?void 0:k,onReplace:i?_:void 0,onRemove:i?P:void 0,mergeBlocks:i?E:void 0,clientId:l,isSelectionEnabled:c,toggleSelection:S,__unstableLayoutClassNames:f,__unstableParentLayout:Object.keys(T).length?T:void 0});const N=(0,a.getBlockType)(y);C&&!I&&(v={...v,tabIndex:-1}),null!=N&&N.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=d()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,N.getEditWrapperProps(h)));const M=v&&!!v["data-align"]&&!w;let R;if(M&&(O=(0,u.createElement)("div",{className:"wp-block","data-align":v["data-align"]},O)),g)R="html"===r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{display:"none"}},O),(0,u.createElement)(lp,{isHtml:!0},(0,u.createElement)(Xl,{clientId:l}))):(null==N?void 0:N.apiVersion)>1?O:(0,u.createElement)(lp,v,O);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(N,h);R=(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Kl,{clientId:l}),(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(e)))}const{"data-align":F,...L}=null!==(t=v)&&void 0!==t?t:{},D={clientId:l,className:d()({"is-content-locked":A,"is-content-locked-temporarily-editing-as-blocks":x,"is-content-block":C&&I},F&&w&&`align${F}`,p),wrapperProps:L,isAligned:M},U=(0,u.useMemo)((()=>D),Object.values(D));return(0,u.createElement)(ip.Provider,{value:U},(0,u.createElement)(Ql,{fallback:(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Jl,null))},R))})),up=window.wp.htmlEntities;var pp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const dp=[(0,u.createInterpolateElement)((0,_.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,_.__)("Drag files into the editor to automatically insert media blocks."),(0,_.__)("Change a block's type by pressing the block icon on the toolbar.")];var fp=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*dp.length));return(0,u.createElement)(g.Tip,null,dp[e])};var mp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var yp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var hp=(0,u.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o,context:i}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:gp});const l=(0,u.createElement)(g.Icon,{icon:n&&n.src?n.src:n,context:i}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,u.createElement)("span",{style:a,className:d()("block-editor-block-icon",o,{"has-colors":r})},l)}));var vp=function(e){let{title:t,icon:n,description:r,blockType:o,className:i}=e;o&&($()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o));const{parentNavBlockClientId:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(xr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,m.useDispatch)(xr);return(0,u.createElement)("div",{className:d()("block-editor-block-card",i)},l&&(0,u.createElement)(g.Button,{onClick:()=>a(l),label:(0,_.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0}),(0,u.createElement)(hp,{icon:n,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-block-card__content"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,u.createElement)("span",{className:"block-editor-block-card__description"},r)))};const bp=(0,f.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,u.createElement)(e,c({registry:r},o));const[i,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,m.createRegistry)({},r);e.registerStore(Sr,Ar),l(e)}),[r]),i?(0,u.createElement)(m.RegistryProvider,{value:i},(0,u.createElement)(e,c({registry:i},o))):null}))),"withRegistryProvider");const _p=()=>{};function kp(e){let{clientId:t=null,value:n,selection:r,onChange:o=_p,onInput:i=_p}=e;const l=(0,m.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:p,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=l.dispatch(xr),{getBlockName:y,getBlocks:g}=l.select(xr),h=(0,m.useSelect)((e=>!t||e(xr).areInnerBlocksControlled(t)),[t]),v=(0,u.useRef)({incoming:null,outgoing:[]}),b=(0,u.useRef)(!1),_=()=>{n&&(f(),t?l.batch((()=>{d(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));b.current&&(v.current.incoming=e),f(),p(t,e)})):(b.current&&(v.current.incoming=n),s(n)))},k=(0,u.useRef)(i),E=(0,u.useRef)(o);(0,u.useEffect)((()=>{k.current=i,E.current=o}),[i,o]),(0,u.useEffect)((()=>{v.current.outgoing.includes(n)?v.current.outgoing[v.current.outgoing.length-1]===n&&(v.current.outgoing=[]):g(t)!==n&&(v.current.outgoing=[],_(),r&&c(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,u.useEffect)((()=>{h||(v.current.outgoing=[],_())}),[h]),(0,u.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:a}=l.select(xr);let s=g(t),c=o(),u=!1;b.current=!0;const p=l.subscribe((()=>{if(null!==t&&null===y(t))return;if(!(!t||a(t)))return;const l=o(),p=g(t),d=p!==s;if(s=p,d&&(v.current.incoming||i()))return v.current.incoming=null,void(c=l);if(d||u&&!d&&l&&!c){c=l,v.current.outgoing.push(s);(c?E.current:k.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>{b.current=!1,p()}}),[l,t])}const Ep=bp((e=>{const{children:t,settings:n,stripExperimentalSettings:r=!1}=e,{__experimentalUpdateSettings:o}=Ir((0,m.useDispatch)(xr));return(0,u.useEffect)((()=>{o({...n,__internalIsInitialized:!0},r)}),[n]),kp(e),(0,u.createElement)(Qr,null,t)}));var Sp=e=>(0,u.createElement)(Ep,c({},e,{stripExperimentalSettings:!0}),e.children);function wp(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,m.useSelect)(xr),{clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clearBlockSelection:o}=e();return(0,f.useRefEffect)((e=>{if(o)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(o){(t()||n())&&o.target===e&&r()}}),[t,n,r,o])}function Cp(e){return(0,u.createElement)("div",c({ref:wp()},e))}function Ip(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(xr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Ap(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,m.useSelect)(Ip,[]);return(0,f.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function xp(e,t,n,r){let o,i=Ml.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(ju)===t.closest(ju)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Ml.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}}))}function Bp(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,m.useSelect)(xr),{selectBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:p,ctrlKey:d,altKey:f,metaKey:m}=s,y=c===Xu.UP,g=c===Xu.DOWN,h=c===Xu.LEFT,v=c===Xu.RIGHT,b=y||h,_=h||v,k=y||g,E=_||k,S=p||d||f||m,w=k?Ml.isVerticalEdge:Ml.isHorizontalEdge,{ownerDocument:C}=l,{defaultView:I}=C;if(!E)return;if(r()){if(p)return;if(!o())return;return s.preventDefault(),void(b?i(e()):i(t(),-1))}if(!function(e,t,n){if((t===Xu.UP||t===Xu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,S))return;k?a||(a=(0,Ml.computeCaretRect)(I)):a=null;const A=(0,Ml.isRTL)(u)?!b:b,{keepCaretInsideBlock:x}=n();if(p)(function(e,t){const n=xp(e,t,l);return n&&Hu(n)})(u,b)&&w(u,b)&&(l.contentEditable=!0,l.focus());else if(!k||!(0,Ml.isVerticalEdge)(u,b)||f&&!(0,Ml.isHorizontalEdge)(u,A)||x){if(_&&I.getSelection().isCollapsed&&(0,Ml.isHorizontalEdge)(u,A)&&!x){const e=xp(u,A,l);(0,Ml.placeCaretAtHorizontalEdge)(e,b),s.preventDefault()}}else{const e=xp(u,b,l,!0);e&&((0,Ml.placeCaretAtVerticalEdge)(e,f?!b:b,f?void 0:a),s.preventDefault())}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Pp=window.wp.keyboardShortcuts;function Tp(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(xr),{multiSelect:r,selectBlock:o}=(0,m.useDispatch)(xr),i=(0,Pp.__unstableUseShortcutEventMatch)();return(0,f.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ml.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function Op(e,t){e.contentEditable=t,t&&e.focus()}function Np(){const{startMultiSelect:e,stopMultiSelect:t}=(0,m.useDispatch)(xr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;Op(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),Op(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Mp(e,t){e.contentEditable=t,t&&e.focus()}function Rp(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,m.useDispatch)(xr),{getBlockParents:r,getBlockSelectionStart:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Mp(n,!1);let c=Hu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Hu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=Hu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Mp(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Fp(){const{selectBlock:e}=(0,m.useDispatch)(xr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=Hu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Lp(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,m.useSelect)(xr),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===Xu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?o(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):i()):p.keyCode===Xu.BACKSPACE||p.keyCode===Xu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?l(t()):n()?s(p.keyCode===Xu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===Xu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function Dp(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),r=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,m.useSelect)(xr),{setNavigationMode:a}=(0,m.useDispatch)(xr),s=(0,m.useSelect)((e=>e(xr).isNavigationMode()),[])?void 0:"0",c=(0,u.useRef)();function p(t){if(c.current)c.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Ml.focus.tabbable[n](t.target).focus()}}const d=(0,u.createElement)("div",{ref:t,tabIndex:s,onFocus:p}),y=(0,u.createElement)("div",{ref:n,tabIndex:s,onFocus:p}),g=(0,f.useRefEffect)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Xu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Xu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===s&&a(!0));if(((0,Ml.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Ml.isFormElement)(Ml.focus.tabbable[l](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(r){var o;if(r.keyCode!==Xu.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Ml.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=s,{defaultView:m}=f;return m.addEventListener("keydown",d),s.addEventListener("keydown",u),s.addEventListener("focusout",p),()=>{m.removeEventListener("keydown",d),s.removeEventListener("keydown",u),s.removeEventListener("focusout",p)}}),[]);return[d,(0,f.useMergeRefs)([e,g]),y]}(),r=(0,m.useSelect)((e=>e(xr).hasMultiSelection()),[]);return[e,(0,f.useMergeRefs)([t,Lp(),Np(),Rp(),Fp(),Ap(),Tp(),Bp(),(0,f.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,_.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Up=(0,u.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,l]=Dp();return(0,u.createElement)(u.Fragment,null,o,(0,u.createElement)("div",c({},r,{ref:(0,f.useMergeRefs)([i,t]),className:d()(r.className,"block-editor-writing-flow")}),n),l)}));function jp(e){return(0,u.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function zp(e){let{contentRef:t,children:n,head:r,tabIndex:o=0,scale:i=1,frameSize:l=0,readonly:a,forwardedRef:s,...p}=e;const y=(0,m.useSelect)((e=>e(xr).getSettings().__unstableResolvedAssets),[]),[,h]=(0,u.useReducer)((()=>({}))),[v,b]=(0,u.useState)(),[k,E]=(0,u.useState)([]),S=jp(null==y?void 0:y.styles),w=S.map((e=>e.id)),C=(0,u.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:r}=t;if(null===n)return e;if(!r)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(r)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.push(r.cloneNode(!0))}return e}),[])),[]).filter((e=>!w.includes(e.id))),I=jp(null==y?void 0:y.scripts),A=wp(),[x,B,P]=Dp(),[T,{height:O}]=(0,f.useResizeObserver)(),N=(0,f.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),b(r),A(l),E(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),M=(0,f.useRefEffect)((e=>{I.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{h()}))}),[]),R=(0,f.useDisabled)({isDisabled:!a}),F=(0,f.useMergeRefs)([t,A,B,R]),L=(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...S,...C].map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const a=t.toLowerCase();return"style"===a?(0,u.createElement)(a,{id:r,key:r},l):(0,u.createElement)(a,{href:n,id:r,rel:o,media:i,key:r})}))),D=(0,u.useMemo)((()=>""+(0,u.renderToString)(L)),[]);return(0,u.createElement)(u.Fragment,null,o>=0&&x,(0,u.createElement)("iframe",c({},p,{ref:(0,f.useMergeRefs)([s,N]),tabIndex:o,srcDoc:D,title:(0,_.__)("Editor canvas")}),v&&(0,u.createPortal)((0,u.createElement)(u.Fragment,null,(0,u.createElement)("head",{ref:M},L,r,(0,u.createElement)("style",null,`html { transition: background 5s; ${l?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,u.createElement)("body",{ref:F,className:d()("block-editor-iframe__body","editor-styles-wrapper",...k),style:{marginBottom:`-${O*(1-i)-l}px`,marginTop:l,transform:`scale( ${i} )`}},T,(0,u.createElement)(g.__experimentalStyleProvider,{document:v},n))),v.documentElement)),o>=0&&P)}var Vp=(0,u.forwardRef)((function(e,t){return(0,m.useSelect)((e=>e(xr).getSettings().__internalIsInitialized),[])?(0,u.createElement)(zp,c({},e,{forwardedRef:t})):null})),Gp={grad:.9,turn:360,rad:360/(2*Math.PI)},Hp=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Wp=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$p=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Kp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qp=function(e){return{r:$p(e.r,0,255),g:$p(e.g,0,255),b:$p(e.b,0,255),a:$p(e.a)}},Jp=function(e){return{r:Wp(e.r),g:Wp(e.g),b:Wp(e.b),a:Wp(e.a,3)}},Yp=/^#([0-9a-f]{3,8})$/i,Qp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Zp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},Xp=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},ed=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),l:$p(e.l,0,100),a:$p(e.a)}},td=function(e){return{h:Wp(e.h),s:Wp(e.s),l:Wp(e.l),a:Wp(e.a,3)}},nd=function(e){return Xp((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},rd=function(e){return{h:(t=Zp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},od=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,id=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ad=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sd={string:[[function(e){var t=Yp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Wp(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Wp(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ld.exec(e)||ad.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qp({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=od.exec(e)||id.exec(e);if(!t)return null;var n,r,o=ed({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Gp[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return nd(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Hp(t)&&Hp(n)&&Hp(r)?qp({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=ed({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return nd(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),v:$p(e.v,0,100),a:$p(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Xp(l)},"hsv"]]},cd=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Qp(Wp(255*o)):"","#"+Qp(t)+Qp(n)+Qp(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Jp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return td(rd(this.rgba))},e.prototype.toHslString=function(){return t=(e=td(rd(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=Zp(this.rgba),{h:Wp(e.h),s:Wp(e.s),v:Wp(e.v),a:Wp(e.a,3)};var e},e.prototype.invert=function(){return yd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,-e))},e.prototype.grayscale=function(){return yd(pd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?yd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Wp(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rd(this.rgba);return"number"==typeof e?yd({h:e,s:t.s,l:t.l,a:t.a}):Wp(t.h)},e.prototype.isEqual=function(e){return this.toHex()===yd(e).toHex()},e}(),yd=function(e){return e instanceof md?e:new md(e)},gd=[],hd=function(e){e.forEach((function(e){gd.indexOf(e)<0&&(e(md,sd),gd.push(e))}))};function vd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f(s=_d(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Ed=n(3124),Sd=n.n(Ed);const wd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Cd(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=w()||C());)!1!==t&&(n.push(t),m(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function m(e){let t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){const t=i();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 s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Id(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 h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Id(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(wd,""),value:n?Id(n[0]).replace(wd,""):""});return d(/^[;\s]*/),r}function v(){const e=[];if(!c())return s("missing '{'");let t;for(m(e);t=h();)!1!==t&&(e.push(t),m(e));return u()?e:s("missing '}'")}function b(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=S("import"),k=S("charset"),E=S("namespace");function S(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=m();for(;o=b();)l.push(o),l=l.concat(m());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@media missing '{'");const r=m().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Id(t[1]),media:Id(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@supports missing '{'");const r=m().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||E()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Id(t[1]),r=Id(t[2]);if(!c())return s("@document missing '{'");const o=m().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=m();for(;n=h();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=m().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=m();for(;t=h();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function C(){const e=i(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:v()})):s("selector missing")}return Ad(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Id(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ad(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Ad(e,r)})):n&&"object"==typeof n&&Ad(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var xd=n(8575),Bd=n.n(xd),Pd=Td;function Td(e){this.options=e||{}}Td.prototype.emit=function(e){return e},Td.prototype.visit=function(e){return this[e.type](e)},Td.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Ld(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Dd(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const jd=/^(body|html|:root).*$/;var zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(jd)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(zd(t)),r&&o.push(Ud(r)),o.length?Fd(n,(0,f.compose)(o)):n}))};const Gd=".editor-styles-wrapper";function Hd(e){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Gd);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=yd(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Wd(e){let{styles:t}=e;const n=(0,u.useMemo)((()=>Vd(t,Gd)),[t]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",{ref:Hd(t)}),n.map(((e,t)=>(0,u.createElement)("style",{key:t},e))))}function $d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=yd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Kd(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,u.createElement)("style",null,r)}function qd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,u.createElement)("style",null,n)}function Jd(e){let{id:t,colors:n}=e;const r=$d(n);return(0,u.createElement)(g.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,u.createElement)("defs",null,(0,u.createElement)("filter",{id:t},(0,u.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,u.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,u.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,u.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,u.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,u.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,u.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Yd(e){let{preset:t}=e;return(0,u.createElement)(Jd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let Qd;hd([vd,kd]);const Zd=2e3;function Xd(e){let{viewportWidth:t,containerWidth:n,minHeight:r,additionalStyles:o=[]}=e;t||(t=n);const[i,{height:l}]=(0,f.useResizeObserver)(),{styles:a,duotone:s}=(0,m.useSelect)((e=>{var t,n;const r=e(xr).getSettings();return{styles:r.styles,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,u.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:a),[a,o]),p=(0,u.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);Qd=Qd||(0,f.pure)(Jh);const d=n/t;return(0,u.createElement)(g.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,height:l*d,maxHeight:l>Zd?Zd*d:void 0,minHeight:r}},(0,u.createElement)(Vp,{head:(0,u.createElement)(Wd,{styles:c}),contentRef:(0,f.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:Zd,minHeight:0!==d&&d<1&&r?r/d:r}},i,p.map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug}))),(0,u.createElement)(Qd,{renderAppender:!1})))}function ef(e){const[t,{width:n}]=(0,f.useResizeObserver)();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,u.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,u.createElement)(Xd,c({},e,{containerWidth:n}))))}var tf=(0,u.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:r,additionalStyles:o=[],__experimentalMinHeight:i,__experimentalPadding:l}=e;i&&(r=i,$()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],$()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,m.useSelect)((e=>e(xr).getSettings()),[]),s=(0,u.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,u.createElement)(Ep,{value:c,settings:s},(0,u.createElement)(ef,{viewportWidth:n,minHeight:r,additionalStyles:o})):null}));function nf(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings()),[]),i=(0,u.useMemo)((()=>({...o,__unstableIsPreviewMode:!0})),[o]),l=(0,f.useDisabled)(),a=(0,f.useMergeRefs)([n.ref,l]),s=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),c=(0,u.createElement)(Ep,{value:s,settings:i},(0,u.createElement)(Qh,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:a,className:d()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?c:null}}var rf=function(e){var t;let{item:n}=e;const{name:r,title:o,icon:i,description:l,initialAttributes:s,example:c}=n,p=(0,a.isReusableBlock)(n);return(0,u.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,u.createElement)("div",{className:"block-editor-inserter__preview"},p||c?(0,u.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,u.createElement)(tf,{blocks:c?(0,a.getBlockFromExample)(r,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,a.createBlock)(r,s),viewportWidth:null!==(t=null==c?void 0:c.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,_.__)("No Preview Available."))),!p&&(0,u.createElement)(vp,{title:o,icon:i,description:l}))};var of=(0,u.createContext)();var lf=(0,u.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const l=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeItem,c({ref:t,state:l,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,u.createElement)(r,t,o):"function"==typeof o?o(t):(0,u.createElement)(g.Button,t,o)}))}));var af=(0,u.createElement)(V.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function sf(e){let{count:t,icon:n,isPattern:r}=e;const o=r&&(0,_.__)("Pattern");return(0,u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,u.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,u.createElement)(g.FlexItem,null,n?(0,u.createElement)(hp,{icon:n}):o||(0,_.sprintf)((0,_._n)("%d block","%d blocks",t),t)),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:af})))))}var cf=e=>{let{isEnabled:t,blocks:n,icon:r,children:o,isPattern:i}=e;const l={type:"inserter",blocks:n};return(0,u.createElement)(g.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:r,isPattern:i})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var uf=(0,u.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:l,...s}=e;const p=(0,u.useRef)(!1),f=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,u.useMemo)((()=>[(0,a.createBlock)(r.name,r.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]),y=(0,a.isReusableBlock)(r)||(0,a.isTemplatePart)(r);return(0,u.createElement)(cf,{isEnabled:l&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:l,onDragStart:a,onDragEnd:m}=e;return(0,u.createElement)("div",{className:d()("block-editor-block-types-list__list-item",{"is-synced":y}),draggable:l,onDragStart:e=>{p.current=!0,a&&(i(null),a(e))},onDragEnd:e=>{p.current=!1,m&&m(e)}},(0,u.createElement)(lf,c({isFirst:n,className:d()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Xu.ENTER&&(e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null))},onMouseEnter:()=>{p.current||i(r)},onMouseLeave:()=>i(null)},s),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,u.createElement)(hp,{icon:r.icon,showColors:!0})),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var pf=(0,u.forwardRef)((function(e,t){const[n,r]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,dn.speak)((0,_.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,u.createElement)("div",c({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var df=(0,u.forwardRef)((function(e,t){const n=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeGroup,c({state:n,role:"presentation",ref:t},e))}));var ff=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,u.createElement)(pf,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let r=0,o=e.length;r(0,u.createElement)(df,{key:t},e.map(((e,o)=>(0,u.createElement)(uf,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:l&&!e.isDisabled,isFirst:0===t&&0===o})))))),o)};var mf=function(e){let{title:t,icon:n,children:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,u.createElement)(g.Icon,{icon:n})),(0,u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var yf=(e,t)=>{const{categories:n,collections:r,items:o}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(xr),{getCategories:r,getCollections:o}=t(a.store);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,u.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=(0,a.createBlock)(r,o,(0,a.createBlocksFromInnerBlocksTemplate)(i));t(l,void 0,n)}),[t])]};var gf=function(e){let{children:t}=e;const n=(0,g.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,u.createElement)(of.Provider,{value:n},t)};const hf=[];var vf=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,a,s]=yf(t,n),c=(0,u.useMemo)((()=>J(i,"frecency","desc").slice(0,6)),[i]),p=(0,u.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,u.useMemo)((()=>(0,f.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,y.groupBy)(e,"category")))(i)),[i]),m=(0,u.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,a]);(0,u.useEffect)((()=>()=>r(null)),[]);const g=(0,f.useAsyncList)(l),h=l.length===g.length,v=(0,u.useMemo)((()=>Object.entries(a)),[a]),b=(0,f.useAsyncList)(h?v:hf);return(0,u.createElement)(gf,null,(0,u.createElement)("div",null,o&&!!c.length&&(0,u.createElement)(mf,{title:(0,_._x)("Most used","blocks")},(0,u.createElement)(ff,{items:c,onSelect:s,onHover:r,label:(0,_._x)("Most used","blocks")})),g.map((e=>{const t=d[e.slug];return t&&t.length?(0,u.createElement)(mf,{key:e.slug,title:e.title,icon:e.icon},(0,u.createElement)(ff,{items:t,onSelect:s,onHover:r,label:e.title})):null})),h&&p.length>0&&(0,u.createElement)(mf,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,_.__)("Uncategorized")},(0,u.createElement)(ff,{items:p,onSelect:s,onHover:r,label:(0,_.__)("Uncategorized")})),b.map((e=>{let[t,n]=e;const o=m[t];return o&&o.length?(0,u.createElement)(mf,{key:t,title:n.title,icon:n.icon},(0,u.createElement)(ff,{items:o,onSelect:s,onHover:r,label:n.title})):null}))))},bf=window.wp.notices;var _f=(e,t)=>{const{patternCategories:n,patterns:r}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(xr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,m.useDispatch)(bf.store),i=(0,u.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>(0,a.cloneBlock)(e))),t.name),o((0,_.sprintf)((0,_.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]};const kf=e=>{let{showTooltip:t,title:n,children:r}=e;return t?(0,u.createElement)(g.Tooltip,{text:n},r):(0,u.createElement)(u.Fragment,null,r)};function Ef(e){let{isDraggable:t,pattern:n,onClick:r,onHover:o,composite:i,showTooltip:l}=e;const[a,s]=(0,u.useState)(!1),{blocks:p,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,f.useInstanceId)(Ef)}`;return(0,u.createElement)(cf,{isEnabled:t,blocks:p,isPattern:!!n},(e=>{let{draggable:t,onDragStart:f,onDragEnd:y}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),f&&(null==o||o(null),f(e))},onDragEnd:e=>{s(!1),y&&y(e)}},(0,u.createElement)(kf,{showTooltip:l,title:n.title},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},i,{className:"block-editor-block-patterns-list__item",onClick:()=>{r(n,p),null==o||o(null)},onMouseEnter:()=>{a||null==o||o(n)},onMouseLeave:()=>null==o?void 0:o(null),"aria-label":n.title,"aria-describedby":n.description?m:void 0}),(0,u.createElement)(tf,{blocks:p,viewportWidth:d}),!l&&(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,u.createElement)(g.VisuallyHidden,{id:m},n.description))))}))}function Sf(){return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var wf=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onHover:o,onClickPattern:i,orientation:l,label:a=(0,_.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const p=(0,g.__unstableUseCompositeState)({orientation:l});return(0,u.createElement)(g.__unstableComposite,c({},p,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,u.createElement)(Ef,{key:e.name,pattern:e,onClick:i,onHover:o,isDraggable:t,composite:p,showTooltip:s}):(0,u.createElement)(Sf,{key:e.name}))))};function Cf(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,u.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,u.createElement)(g.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function If(e){let{filterValue:t,setFilterValue:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,_.__)("Search for patterns"),placeholder:(0,_.__)("Search")}))}var Af=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,u.createElement)(If,{filterValue:o,setFilterValue:i}),!o&&(0,u.createElement)(Cf,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var xf=function(){return(0,u.createElement)("div",{className:"block-editor-inserter__no-results"},(0,u.createElement)(Xi,{className:"block-editor-inserter__no-results-icon",icon:gp}),(0,u.createElement)("p",null,(0,_.__)("No results found.")))};var Bf=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0,selectBlockOnInsert:s=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(xr),{destinationRootClientId:p,destinationIndex:d}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(xr),c=i();let u,p=t;return void 0!==n?u=n:r?u=a(r):!o&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:f,insertBlocks:y,showInsertionPoint:g,hideInsertionPoint:h}=(0,m.useDispatch)(xr),v=(0,u.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!o&&r&&(0,a.isUnmodifiedDefaultBlock)(r)?f(r.clientId,e,null,l||n?0:null,t):y(e,d,p,s,l||n?0:null,t);const u=Array.isArray(e)?e.length:1,m=(0,_.sprintf)((0,_._n)("%d block added.","%d blocks added.",u),u);(0,dn.speak)(m),i&&i(e)}),[o,c,f,y,p,d,i,l]),b=(0,u.useCallback)((e=>{e?g(p,d):h()}),[g,h,p,d]);return[p,v,b]},Pf=n(4793),Tf=n.n(Pf);function Of(e){return e.toLowerCase()}var Nf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Mf=/[^A-Z0-9]+/gi;function Rf(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?Nf:n,o=t.stripRegexp,i=void 0===o?Mf:o,l=t.transform,a=void 0===l?Of:l,s=t.delimiter,c=void 0===s?" ":s,u=Ff(Ff(e,r,"$1\0$2"),i,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(a).join(c)}function Ff(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Lf=e=>e.name||"",Df=e=>e.title,Uf=e=>e.description||"",jf=e=>e.keywords||[],zf=e=>e.category,Vf=()=>null;function Gf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Rf(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Hf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Tf()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Gf(Hf(e))},$f=(e,t)=>e.filter((e=>!Wf(t).some((t=>t.includes(e))))),Kf=(e,t,n,r)=>{if(0===Wf(r).length)return e;return qf(e,r,{getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===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}})},qf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wf(t);if(0===r.length)return e;const o=e.map((e=>[e,Jf(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Lf,getTitle:o=Df,getDescription:i=Uf,getKeywords:l=jf,getCategory:a=zf,getCollection:s=Vf}=n,c=r(e),u=o(e),p=i(e),d=l(e),f=a(e),m=s(e),y=Hf(t),g=Hf(u);let h=0;if(y===g)h+=30;else if(g.startsWith(y))h+=20;else{const e=[c,u,p,...d,f,m].join(" "),t=Gf(y);0===$f(t,e).length&&(h+=10)}if(0!==h&&c.startsWith("core/")){h+=c!==e.id?1:2}return h}function Yf(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,u.createElement)(g.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,_.sprintf)((0,_._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qf=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,f.useDebounce)(dn.speak,500),[i,l]=Bf({shouldFocusBlock:!0}),[a,,s]=_f(l,i),c=(0,u.useMemo)((()=>r.map((e=>e.name))),[r]),p=(0,u.useMemo)((()=>t?qf(a,t):a.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,a]);(0,u.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=(0,f.useAsyncList)(p,{step:2}),m=!(null==p||!p.length);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},m&&(0,u.createElement)(Yf,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,u.createElement)(gf,null,!m&&(0,u.createElement)(xf,null),m&&(0,u.createElement)(wf,{shownPatterns:d,blockPatterns:p,onClickPattern:s,isDraggable:!1})))};function Zf(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,u.useState)(""),[i,l]=(0,u.useState)(null==t?void 0:t.name);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,u.createElement)(Af,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,u.createElement)(Qf,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xf=function(e){let{onModalClose:t,...n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,u.createElement)(Zf,n))};function em(e){let{title:t}=e;return(0,u.createElement)(g.__experimentalVStack,{spacing:0},(0,u.createElement)(g.__experimentalView,null,(0,u.createElement)(g.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,u.createElement)(g.__experimentalHStack,{spacing:2},(0,u.createElement)(g.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0,"aria-label":(0,_.__)("Navigate to the previous view")}),(0,u.createElement)(g.__experimentalSpacer,null,(0,u.createElement)(g.__experimentalHeading,{level:5},t))))))}function tm(e){let{categories:t,children:n}=e;return(0,u.createElement)(g.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,u.createElement)(g.__experimentalNavigatorScreen,{path:"/"},(0,u.createElement)(g.__experimentalItemGroup,null,t.map((e=>(0,u.createElement)(g.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:g.__experimentalItem,isAction:!0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?yp:mp}))))))),t.map((e=>(0,u.createElement)(g.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,u.createElement)(em,{title:(0,_.__)("Back")}),n(e)))))}const nm=()=>{},rm=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function om(e){const[t,n]=_f(void 0,e),r=(0,u.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),o=(0,u.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].some((e=>rm.includes(e)))?[n,r].every((e=>rm.includes(e)))?rm.indexOf(n)-rm.indexOf(r):rm.includes(n)?-1:1:0}));return t.some((e=>!r(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,_._x)("Uncategorized")}),e}),[t,n]);return o}function im(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const l=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(l.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,u.createElement)("div",{ref:l,className:"block-editor-inserter__patterns-category-dialog"},(0,u.createElement)(lm,{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}))}function lm(e){let{rootClientId:t,onInsert:n,onHover:r=nm,category:o,showTitlesAsTooltip:i}=e;const[l,,a]=_f(n,t),s=om(t),c=(0,u.useMemo)((()=>l.filter((e=>{var t,n,r;if("uncategorized"!==o.name)return null===(r=e.categories)||void 0===r?void 0:r.includes(o.name);return 0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[l,o]),p=(0,f.useAsyncList)(c);return(0,u.useEffect)((()=>()=>r(null)),[]),c.length?(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},o.label),(0,u.createElement)("p",null,o.description),(0,u.createElement)(wf,{shownPatterns:p,blockPatterns:c,onClickPattern:a,onHover:r,label:o.label,orientation:"vertical",category:o.label,isDraggable:!0,showTitlesAsTooltip:i})):null}var am=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:r,rootClientId:o}=e;const[i,l]=(0,u.useState)(!1),a=om(o),s=n||a[0],c=(0,f.useViewportMatch)("medium","<");return(0,u.createElement)(u.Fragment,null,!c&&(0,u.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Block pattern categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,_.__)("Explore all patterns")))))),c&&(0,u.createElement)(tm,{categories:a},(e=>(0,u.createElement)(lm,{onInsert:r,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),i&&(0,u.createElement)(Xf,{initialCategory:s,patternCategories:a,onModalClose:()=>l(!1)}))},sm=window.wp.url;function cm(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=yf(r,n),l=(0,u.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,u.createElement)(xf,null):(0,u.createElement)(mf,{title:(0,_.__)("Reusable blocks")},(0,u.createElement)(ff,{items:l,onSelect:i,onHover:t,label:(0,_.__)("Reusable blocks")}))}var um=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cm,{onHover:r,onInsert:n,rootClientId:t}),(0,u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,sm.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,_.__)("Manage Reusable blocks"))))};function pm(e){const[t,n]=(0,u.useState)([]),{canInsertImage:r,canInsertVideo:o,canInsertAudio:i}=(0,m.useSelect)((t=>{const{canInsertBlockType:n}=t(xr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),l=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),r=(0,u.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return r}();return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!l)return;const t=new Map(await Promise.all(l.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:r,video:o,audio:i};l.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,o,i,l]),t}var dm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var fm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"})),mm=window.wp.blob;const ym={image:"img",video:"video",audio:"audio"};function gm(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},r=e.url,o=e.alt||void 0;"image"===t?(n.url=r,n.alt=o):["video","audio"].includes(t)&&(n.src=r);const i=ym[t],l=(0,u.createElement)(i,{src:e.previewUrl||r,alt:o,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=r)}});return[(0,a.createBlock)(`core/${t}`,n),l]}const hm=["image"],vm={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function bm(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const r=t.getReportUrl(n);return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,_.__)("Options"),popoverProps:vm,icon:dm},(()=>(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:()=>window.open(r,"_blank").focus(),icon:fm},(0,_.sprintf)((0,_.__)("Report %s"),t.mediaType)))))}function _m(e){let{onClose:t,onSubmit:n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,u.createElement)(g.__experimentalVStack,{spacing:3},(0,u.createElement)("p",null,(0,_.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,u.createElement)("p",null,(0,_.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:t},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",onClick:n},(0,_.__)("Insert")))))}function km(e){var t;let{media:n,onClick:r,composite:o,category:i}=e;const[l,s]=(0,u.useState)(!1),[p,f]=(0,u.useState)(!1),[y,h]=(0,u.useState)(!1),[v,b]=(0,u.useMemo)((()=>gm(n,i.mediaType)),[n,i.mediaType]),{createErrorNotice:k,createSuccessNotice:E}=(0,m.useDispatch)(bf.store),S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useCallback)((e=>{if(y)return;const t=(0,a.cloneBlock)(e),{id:n,url:o,caption:i}=t.attributes;n?r(t):(h(!0),window.fetch(o).then((e=>e.blob())).then((e=>{S({filesList:[e],additionalData:{caption:i},onFileChange(e){let[n]=e;(0,mm.isBlobURL)(n.url)||(r({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),E((0,_.__)("Image uploaded and inserted."),{type:"snackbar"}),h(!1))},allowedTypes:hm,onError(e){k(e,{type:"snackbar"}),h(!1)}})})).catch((()=>{s(!0),h(!1)})))}),[y,r,S,k,E]),C=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let I;if(C.length>25){const e="...";I=C.slice(0,25-e.length)+e}const A=(0,u.useCallback)((()=>f(!0)),[]),x=(0,u.useCallback)((()=>f(!1)),[]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cf,{isEnabled:!0,blocks:[v]},(e=>{let{draggable:t,onDragStart:r,onDragEnd:l}=e;return(0,u.createElement)("div",{className:d()("block-editor-inserter__media-list__list-item",{"is-hovered":p}),draggable:t,onDragStart:r,onDragEnd:l},(0,u.createElement)(g.Tooltip,{text:I||C},(0,u.createElement)("div",{onMouseEnter:A,onMouseLeave:x},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:"block-editor-inserter__media-list__item",onClick:()=>w(v),"aria-label":C}),(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},b,y&&(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,u.createElement)(g.Spinner,null)))),!y&&(0,u.createElement)(bm,{category:i,media:n}))))})),l&&(0,u.createElement)(_m,{onClose:()=>s(!1),onSubmit:()=>{r((0,a.cloneBlock)(v)),E((0,_.__)("Image inserted."),{type:"snackbar"}),s(!1)}}))}var Em=function(e){let{mediaList:t,category:n,onClick:r,label:o=(0,_.__)("Media List")}=e;const i=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},i,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o}),t.map(((e,t)=>(0,u.createElement)(km,{key:e.id||e.sourceId||t,media:e,category:n,onClick:r,composite:i}))))};function Sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,u.useState)(e),[r,o]=(0,u.useState)(e),i=(0,f.useDebounce)(o,250);return(0,u.useEffect)((()=>{r!==t&&i(t)}),[r,t]),[t,n,r]}function wm(e){let{rootClientId:t,onInsert:n,category:r}=e;const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(o.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,u.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,u.createElement)(Cm,{rootClientId:t,onInsert:n,category:r}))}function Cm(e){let{rootClientId:t,onInsert:n,category:r}=e;const[o,i,l]=Sm(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=(0,u.useState)(),[o,i]=(0,u.useState)(!1),l=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{var n;const o=JSON.stringify({category:e.name,...t});l.current=o,i(!0),r([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));o===l.current&&(r(a),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:o}}(r,{per_page:l?20:10,search:l}),c="block-editor-inserter__media-panel",p=r.labels.search_items||(0,_.__)("Search");return(0,u.createElement)("div",{className:c},(0,u.createElement)(g.SearchControl,{className:`${c}-search`,onChange:i,value:o,label:p,placeholder:p}),s&&(0,u.createElement)("div",{className:`${c}-spinner`},(0,u.createElement)(g.Spinner,null)),!s&&!(null!=a&&a.length)&&(0,u.createElement)(xf,null),!s&&!(null==a||!a.length)&&(0,u.createElement)(Em,{rootClientId:t,onClick:n,mediaList:a,category:r}))}var Im=function(e){let{fallback:t=null,children:n}=e;const r=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().mediaUpload}),[]);return r?n:t};var Am=(0,g.withFilters)("editor.MediaUpload")((()=>null));const xm=["image","video","audio"];var Bm=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:r,onInsert:o}=e;const i=pm(t),l=(0,f.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,u.useCallback)((e=>{if(null==e||!e.url)return;const[t]=gm(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return(0,u.createElement)(u.Fragment,null,!l&&(0,u.createElement)("div",{className:`${a}-container`},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Media categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:a},i.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>r(e),className:d()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.labels.name),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(Im,null,(0,u.createElement)(Am,{multiple:!1,onSelect:s,allowedTypes:xm,render:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,_.__)("Open Media Library"))}})))))),l&&(0,u.createElement)(tm,{categories:c},(e=>(0,u.createElement)(Cm,{onInsert:o,rootClientId:t,category:e}))))};const{Fill:Pm,Slot:Tm}=(0,g.createSlotFill)("__unstableInserterMenuExtension");Pm.Slot=Tm;var Om=Pm;const Nm=[];var Mm=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:p=!1,isDraggable:d=!0,shouldFocusBlock:m=!0,prioritizePatterns:y,selectBlockOnInsert:h,orderInitialBlockItems:v}=e;const b=(0,f.useDebounce)(dn.speak,500),[k,E]=Bf({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,I]=yf(k,E),[A,,x]=_f(E,k),B=(0,u.useMemo)((()=>{if(0===s)return[];const e=qf(A,t);return void 0!==s?e.slice(0,s):e}),[t,A,s]);let P=c;y&&B.length>2&&(P=0);const T=(0,u.useMemo)((()=>{if(0===P)return[];let e=J(S,"frecency","desc");!t&&v&&(e=v(e));const n=Kf(e,w,C,t);return void 0!==P?n.slice(0,P):n}),[t,S,w,C,c,v]);(0,u.useEffect)((()=>{if(!t)return;const e=T.length+B.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const O=(0,f.useAsyncList)(T,{step:9}),N=(0,f.useAsyncList)(O.length===T.length?B:Nm),M=T.length>0||B.length>0,R=!!T.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Blocks"))},(0,u.createElement)(ff,{items:O,onSelect:I,onHover:r,label:(0,_.__)("Blocks"),isDraggable:d})),F=!!B.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Block Patterns"))},(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,u.createElement)(wf,{shownPatterns:N,blockPatterns:B,onClickPattern:x,onHover:r,isDraggable:d})));return(0,u.createElement)(gf,null,!p&&!M&&(0,u.createElement)(xf,null),y?F:R,!!T.length&&!!B.length&&(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),y?R:F,p&&(0,u.createElement)(Om.Slot,{fillProps:{onSelect:I,onHover:r,filterValue:t,hasItems:M,rootClientId:k}},(e=>e.length?e:M?null:(0,u.createElement)(xf,null))))};const Rm={name:"blocks",title:(0,_.__)("Blocks")},Fm={name:"patterns",title:(0,_.__)("Patterns")},Lm={name:"reusable",title:(0,_.__)("Reusable"),icon:G},Dm={name:"media",title:(0,_.__)("Media")};var Um=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,showMedia:o=!1,onSelect:i,prioritizePatterns:l}=e;const a=(0,u.useMemo)((()=>{const e=[];return l&&n&&e.push(Fm),e.push(Rm),!l&&n&&e.push(Fm),o&&e.push(Dm),r&&e.push(Lm),e}),[l,Rm,n,Fm,r,o,Lm]);return(0,u.createElement)(g.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)};var jm=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:p=!0,prioritizePatterns:f}=e;const[y,h,v]=Sm(c),[b,k]=(0,u.useState)(null),[E,S]=(0,u.useState)(null),[w,C]=(0,u.useState)(null),[I,A]=(0,u.useState)(null),[x,B,P]=Bf({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:p}),{showPatterns:T,inserterItems:O}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(xr);return{showPatterns:!!t(x).length,inserterItems:n(x)}}),[x]),N=(0,u.useMemo)((()=>O.some((e=>{let{category:t}=e;return"reusable"===t}))),[O]),M=!!pm(x).length,R=(0,u.useCallback)(((e,t,n)=>{B(e,t,n),l()}),[B,l]),F=(0,u.useCallback)(((e,t)=>{B(e,{patternName:t}),l()}),[B,l]),L=(0,u.useCallback)((e=>{P(!!e),k(e)}),[P,k]),D=(0,u.useCallback)((e=>{P(!!e)}),[P]),U=(0,u.useCallback)((e=>{S(e)}),[S]),j=(0,u.useMemo)((()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__block-list"},(0,u.createElement)(vf,{rootClientId:x,onInsert:R,onHover:L,showMostUsedBlocks:s})),a&&(0,u.createElement)("div",{className:"block-editor-inserter__tips"},(0,u.createElement)(g.VisuallyHidden,{as:"h2"},(0,_.__)("A tip for using the block editor")),(0,u.createElement)(fp,null)))),[x,R,L,v,s,a]),z=(0,u.useMemo)((()=>(0,u.createElement)(am,{rootClientId:x,onInsert:F,onSelectCategory:U,selectedCategory:E})),[x,F,U,E]),V=(0,u.useMemo)((()=>(0,u.createElement)(um,{rootClientId:x,onInsert:R,onHover:L})),[x,R,L]),G=(0,u.useMemo)((()=>(0,u.createElement)(Bm,{rootClientId:x,selectedCategory:w,onSelectCategory:C,onInsert:R})),[x,R,w,C]),H=(0,u.useCallback)((e=>"blocks"===e.name?j:"patterns"===e.name?z:"reusable"===e.name?V:"media"===e.name?G:void 0),[j,z,V,G]),W=(0,u.useRef)();(0,u.useImperativeHandle)(t,(()=>({focusSearch:()=>{W.current.focus()}})));const $="patterns"===I&&!v&&E,K=!v&&(T||N||M),q="media"===I&&!v&&w;return(0,u.createElement)("div",{className:"block-editor-inserter__menu"},(0,u.createElement)("div",{className:d()("block-editor-inserter__main-area",{"show-as-tabs":K})},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&k(null),h(e)},value:y,label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search"),ref:W}),!!v&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,u.createElement)(Mm,{filterValue:v,onSelect:l,onHover:L,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:p})),K&&(0,u.createElement)(Um,{showPatterns:T,showReusableBlocks:N,showMedia:M,prioritizePatterns:f,onSelect:A},H),!v&&!K&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},j)),q&&(0,u.createElement)(wm,{rootClientId:x,onInsert:R,category:w}),a&&b&&(0,u.createElement)(rf,{item:b}),$&&(0,u.createElement)(im,{rootClientId:x,onInsert:F,onHover:D,category:E,showTitlesAsTooltip:!0}))}));function zm(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a}=e;const[s,c]=(0,u.useState)(""),[p,f]=Bf({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:l}),[y]=yf(p,f),[h]=_f(f,p),{setInserterIsOpened:v,insertionIndex:b}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(xr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),k=h.length&&(!!s||i),E=k&&h.length>6||y.length>6;(0,u.useEffect)((()=>{v&&v(!1)}),[v]);let S=0;return k&&(S=i?4:2),(0,u.createElement)("div",{className:d()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":v})},E&&(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search")}),(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,u.createElement)(Mm,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:S,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a})),v&&(0,u.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:s})},"aria-label":(0,_.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,_.__)("Browse all")))}const Vm=e=>{let{onToggle:t,disabled:n,isOpen:r,blockTitle:o,hasSingleBlockType:i,toggleProps:l={},prioritizePatterns:a}=e;const{as:s=g.Button,label:p,onClick:d,...f}=l;let m=p;return!m&&i?m=(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),o):!m&&a?m=(0,_.__)("Add pattern"):m||(m=(0,_._x)("Add block","Generic label for block inserter button")),(0,u.createElement)(s,c({icon:pp,label:m,tooltipPosition:"bottom",onClick:function(e){t&&t(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&r,disabled:n},f))};class Gm extends u.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=Vm,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:p}=this.props;return l?(0,u.createElement)(zm,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a,selectBlockOnInsert:c,orderInitialBlockItems:p}):(0,u.createElement)(jm,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,u.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:d()("block-editor-inserter__popover",{"is-quick":o}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,_.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const Hm=(0,f.compose)([(0,m.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:o,shouldDirectInsert:i=!0}=t;const{getBlockRootClientId:l,hasInserterItems:s,getAllowedBlocks:c,__experimentalGetDirectInsertBlock:u,getSettings:p}=e(xr),{getBlockVariations:d}=e(a.store);o=o||l(r)||void 0;const f=c(o),m=i&&u(o),y=p(),g=1===(null==f?void 0:f.length)&&0===(null===(n=d(f[0].name,"inserter"))||void 0===n?void 0:n.length);let h=!1;return g&&(h=f[0]),{hasItems:s(o),hasSingleBlockType:g,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:m,rootClientId:o,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:p}=t;if(!l&&!c)return;const{insertBlock:d}=e(xr);let f;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=r(xr);if(!e||!o&&!n)return{};const l={};let a={};if(o){const e=t(o),n=t(i(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);f=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else f=(0,a.createBlock)(s.name);var m;(d(f,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:a}=r(xr);if(o)return e(o);const s=t();return!i&&s&&a(s)===n?e(s)+1:l(n).length}(),n,p),u)&&u({clientId:null===(m=f)||void 0===m?void 0:m.clientId});const y=(0,_.sprintf)((0,_.__)("%s block added"),s.title);(0,dn.speak)(y)}}})),(0,f.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(Gm);var Wm=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Hm,c({ref:t},e,{orderInitialBlockItems:void 0}))));var $m=(0,f.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(xr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(xr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,up.decodeEntities)(o)||(0,_.__)("Type / to choose a block");return(0,u.createElement)("div",{"data-root-client-id":i||"",className:d()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,u.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,_.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Xu.ENTER!==e.keyCode&&Xu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,u.createElement)(Wm,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Km(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,u.createElement)(Wm,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:p}=e;n=p?(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),c):(0,_._x)("Add block","Generic label for block inserter button");const f=!p;let m=(0,u.createElement)(g.Button,{ref:t,onFocus:o,tabIndex:i,className:d()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!p&&(0,u.createElement)(g.VisuallyHidden,{as:"span"},n),(0,u.createElement)(Xi,{icon:pp}));return(f||p)&&(m=(0,u.createElement)(g.Tooltip,{text:n},m)),m},isAppender:!0})}const qm=(0,u.forwardRef)(((e,t)=>($()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Km(e,t))));var Jm=(0,u.forwardRef)(Km);function Ym(e){let{rootClientId:t}=e;return(0,m.useSelect)((e=>e(xr).canInsertBlockType((0,a.getDefaultBlockName)(),t)))?(0,u.createElement)($m,{rootClientId:t}):(0,u.createElement)(Jm,{rootClientId:t,className:"block-list-appender__toggle"})}var Qm=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:o="div"}=e;const i=function(e,t){const{hideInserter:n,isParentSelected:r}=(0,m.useSelect)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:r,__unstableGetEditorMode:o}=t(xr),i=r();return{hideInserter:!!n(e)||"zoom-out"===o(),isParentSelected:e===i||!e&&!i}}),[e]);return n||!1===t?null:t?(0,u.createElement)(t,null):r?(0,u.createElement)(Ym,{rootClientId:e}):null}(t,n);return i?(0,u.createElement)(o,{tabIndex:-1,className:d()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},i):null};const Zm=Number.MAX_SAFE_INTEGER;(0,u.createContext)();var Xm=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...l}=e;const[a,s]=(0,u.useReducer)((e=>(e+1)%Zm),0),{orientation:p,rootClientId:f,isVisible:y}=(0,m.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(xr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),h=eo(t),v=eo(n),b="vertical"===p,k=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return{};const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(b)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,_.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[h,v,b,a,y]),E=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return;const{ownerDocument:e}=h||v;return{ownerDocument:e,getBoundingClientRect(){const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return b?(r=e?e.bottom:t.top,n=(0,_.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,_.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[h,v,a,b,y]),S=qo(i);return(0,u.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(s);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]),(0,u.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(s);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,u.useLayoutEffect)((()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=h.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[h]),(h||v)&&y?(0,u.createElement)(g.Popover,c({ref:S,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+f},l,{className:d()("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"bottom-start",variant:"unstyled"}),(0,u.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const ey={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var ty=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:r}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(xr),r=n(),o=t(r.rootClientId);return o.length?{clientId:o[r.index]}:{}}),[]),o=(0,f.useReducedMotion)();return(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,u.createElement)(g.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?ey.show:ey.hide,animate:ey.show,exit:o?ey.show:ey.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const ny=(0,u.createContext)();function ry(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,m.useDispatch)(xr),i=(0,u.useContext)(ny),l=(0,u.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:p,isInserterShown:y,isDistractionFree:h,isNavigationMode:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(xr),u=o(),p=n(u.rootClientId);if(!p.length)return{};let d=p[u.index-1],f=p[u.index];for(;i(d);)d=l(d);for(;i(f);)f=a(f);const m=s();return{previousClientId:d,nextClientId:f,orientation:(null===(t=r(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:m.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),b=(0,f.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:y?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},k={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h&&!v)return null;const E=d()("block-editor-block-list__insertion-point","is-"+a);return(0,u.createElement)(Xm,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,u.createElement)(g.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&c&&r(c,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:d()(E,{"is-with-inserter":y}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,u.createElement)(g.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),y&&(0,u.createElement)(g.__unstableMotion.div,{variants:k,className:d()("block-editor-block-list__insertion-point-inserter")},(0,u.createElement)(Wm,{position:"bottom center",clientId:c,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function oy(e){const{insertionPoint:t,isVisible:n}=(0,m.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(xr);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,u.createElement)(ty,c({key:`${t.rootClientId}-${t.index}`},e)):(0,u.createElement)(ry,e):null}function iy(){const e=(0,u.useContext)(ny),t=(0,m.useSelect)((e=>e(xr).getSettings().isDistractionFree||"zoom-out"===e(xr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,m.useSelect)(xr),{showInsertionPoint:p,hideInsertionPoint:d}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)};function i(t){var r;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void d();let i;if(!t.target.classList.contains("is-root-container")){i=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(i))return;const u=(null===(r=n(i))||void 0===r?void 0:r.orientation)||"vertical",f=t.clientY,m=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>f||e.classList.contains("wp-block")&&"horizontal"===u&&t.left>m}));if(!y)return void d();if(!y.id&&(y=y.firstElementChild,!y))return void d();const g=y.id.slice("block-".length);if(!g||c(g))return;if(a().includes(g))return;const h=y.getBoundingClientRect();if("horizontal"===u&&(t.clientY>h.bottom||t.clientYh.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,ay="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function sy(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(xr),{getBlockType:o,getActiveBlockVariation:i}=t(a.store),l=n(e),s=o(l);if(!s)return null;const c=r(e),u=i(l,c),p=(0,a.isReusableBlock)(s)||(0,a.isTemplatePart)(s),d={isSynced:p,title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{isSynced:p,title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function cy(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:o,name:i,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(xr),i=n(t);if(!i)return{};const l=(0,a.isReusableBlock)((0,a.getBlockType)(i));return{attributes:r(t),name:i,reusableBlockTitle:l&&o(r(t).ref)}}),[t]),s=sy(t);if(!i||!s)return null;const c=(0,a.getBlockType)(i),u=c?(0,a.__experimentalGetBlockLabel)(c,o,r):null,p=l||u,d=p&&p!==c.title?p:s.title;if(n&&n>0&&d.length>n){const e="...";return d.slice(0,n-e.length)+e}return d}function uy(e){let{clientId:t,maximumLength:n,context:r}=e;return cy({clientId:t,maximumLength:n,context:r})}var py=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:s,icon:c}=(0,m.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(xr),l=o(n[0]),s=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,u.useRef)(!1),[d,f,y]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,u.useCallback)((o=>{e.current=o.clientY,n.current=(0,Ml.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:v}=(0,m.useDispatch)(xr);if((0,u.useEffect)((()=>()=>{p.current&&v()}),[]),!s)return t({draggable:!1});const b={type:"block",srcClientIds:n,srcRootClientId:l};return(0,u.createElement)(g.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:b,onDragStart:e=>{h(n),p.current=!0,d(e),o&&o()},onDragOver:f,onDragEnd:()=>{v(),p.current=!1,y(),i&&i()},__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:c})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var dy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var fy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const my=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,_.isRTL)()?"left":"right":"down":null;function yy(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,_.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=my("down",i);if("down"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=my("down",i);if("down"===e)return(0,_.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=my("up",i);if("up"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=my("up",i);if("up"===e)return(0,_.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,_.sprintf)((0,_.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const gy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?mp:yp:dy:"down"===e?"horizontal"===t?(0,_.isRTL)()?yp:mp:fy:null,hy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move right"):(0,_.__)("Move left"):(0,_.__)("Move up"):"down"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move left"):(0,_.__)("Move right"):(0,_.__)("Move down"):null,vy=(0,u.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const l=(0,f.useInstanceId)(vy),s=Array.isArray(n)?n:[n],p=s.length,{blockType:y,isDisabled:h,rootClientId:v,isFirst:b,isLast:_,firstIndex:k,orientation:E="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(xr),u=s[0],p=n(u),d=t(u),f=t(s[s.length-1]),m=i(p),y=l(u),g=0===d,h=f===m.length-1,{orientation:v}=c(p)||{};return{blockType:y?(0,a.getBlockType)(y.name):null,isDisabled:"up"===r?g:h,rootClientId:p,firstIndex:d,isFirst:g,isLast:h,orientation:o||v}}),[n,r]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(xr),C="up"===r?w:S,I=`block-editor-block-mover-button__description-${l}`;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,c({ref:t,className:d()("block-editor-block-mover-button",`is-${r}-button`),icon:gy(r,E),label:hy(r,E),"aria-describedby":I},i,{onClick:h?null:e=>{C(n,v),i.onClick&&i.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,u.createElement)(g.VisuallyHidden,{id:I},yy(p,y&&y.title,k,b,_,"up"===r?-1:1,E)))})),by=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"up",ref:t},e)))),_y=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"down",ref:t},e))));var ky=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:l,orientation:a}=(0,m.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(xr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&l&&!o)return null;const s=(0,_.__)("Drag");return(0,u.createElement)(g.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,u.createElement)(py,{clientIds:t},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,u.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(by,c({clientIds:t},e)))),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(_y,c({clientIds:t},e))))))};var Ey=function(e){let{clientId:t,rootClientId:n}=e;const r=sy(t),o=(0,m.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(xr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:i,name:l,attributes:s,blockMovingMode:p,orientation:f,editorMode:y}=o,{setNavigationMode:h,removeBlock:v}=(0,m.useDispatch)(xr),b=(0,u.useRef)(),k=(0,a.getBlockType)(l),E=(0,a.__experimentalGetAccessibleBlockLabel)(k,s,i+1,f);(0,u.useEffect)((()=>{b.current.focus(),(0,dn.speak)(E)}),[E]);const S=eo(t),{hasBlockMovingClientId:w,getBlockIndex:C,getBlockRootClientId:I,getClientIdsOfDescendants:A,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,m.useSelect)(xr),{selectBlock:O,clearSelectedBlock:N,setBlockMovingClientId:M,moveBlockToPosition:R}=(0,m.useDispatch)(xr),F=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!p}),L=(0,_.__)("Drag");return(0,u.createElement)("div",{className:F},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:null==r?void 0:r.icon,showColors:!0})),(0,u.createElement)(g.FlexItem,null,"zoom-out"===y&&(0,u.createElement)(ky,{clientIds:[t],hideDragHandle:!0}),"navigation"===y&&(0,u.createElement)(py,{clientIds:[t]},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-selection-button_drag-handle","aria-hidden":"true",label:L,tabIndex:"-1"},e))))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{ref:b,onClick:"navigation"===y?()=>h(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===Xu.UP,o=n===Xu.DOWN,i=n===Xu.LEFT,l=n===Xu.RIGHT,a=n===Xu.TAB,s=n===Xu.ESCAPE,c=n===Xu.ENTER,u=n===Xu.SPACE,p=e.shiftKey;if(n===Xu.BACKSPACE||n===Xu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),m=P(f||d),y=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=m;else if(h)k=y;else if(b){var E;k=null!==(E=I(d))&&void 0!==E?E:d}else if(_){var F;k=null!==(F=A([d])[0])&&void 0!==F?F:d}const L=w();if(s&&L&&!e.defaultPrevented&&(M(null),e.preventDefault()),(c||u)&&L){const e=I(L),t=I(d),n=C(L);let r=C(d);n{!function(e){const[t]=Ml.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",a),(0,u.useEffect)((()=>{i&&a()}),[n,i,a]),(0,u.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Sy(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Sy(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Cy=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const l=(0,u.useRef)(),a=function(e){const[t,n]=(0,u.useState)(!0),r=(0,u.useCallback)((()=>{const t=!Ml.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("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,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(l);return wy(l,n,a,r,o),a?(0,u.createElement)(g.Toolbar,c({label:i["aria-label"],ref:l},i),t):(0,u.createElement)(g.NavigableMenu,c({orientation:"horizontal",role:"toolbar",ref:l},i),t)};const{clearTimeout:Iy,setTimeout:Ay}=window,xy=()=>{},By=200;function Py(e){let{ref:t,isFocused:n,debounceTimeout:r=By,onChange:o=xy}=e;const[i,l]=(0,u.useState)(!1),a=(0,u.useRef)(),s=e=>{null!=t&&t.current&&l(e),o(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=a.current;e&&Iy&&Iy(e)};return(0,u.useEffect)((()=>()=>{s(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),a.current=Ay((()=>{c()&&s(!1)}),r)}}}function Ty(e){let{ref:t,debounceTimeout:n=By,onChange:r=xy}=e;const[o,i]=(0,u.useState)(!1),{showMovers:l,debouncedShowMovers:a,debouncedHideMovers:s}=Py({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,u.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),a())},r=()=>{p()||(i(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,a,s]),{showMovers:l,gestures:{onMouseMove:a,onMouseLeave:s}}}function Oy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(xr),{firstParentClientId:n,shouldHide:r,isDistractionFree:o}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(xr),{hasBlockSupport:i}=e(a.store),l=n(r()),s=l[l.length-1],c=t(s),u=(0,a.getBlockType)(c),p=o();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),isDistractionFree:p.isDistractionFree}}),[]),i=sy(n),l=(0,u.useRef)(),{gestures:s}=Ty({ref:l,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,u.createElement)("div",c({className:"block-editor-block-parent-selector",key:n,ref:l},s),(0,u.createElement)(g.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,_.sprintf)((0,_.__)("Select %s"),null==i?void 0:i.title),showTooltip:!0,icon:(0,u.createElement)(hp,{icon:null==i?void 0:i.icon})}))}var Ny=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 My(e){let{blocks:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(tf,{viewportWidth:500,blocks:t})))))}function Ry(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,u.createElement)(Fy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function Fy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:o,icon:i,title:l,isDisabled:s}=t;return(0,u.createElement)(g.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),n(o)},disabled:s,onMouseLeave:()=>r(null),onMouseEnter:()=>r(o)},(0,u.createElement)(hp,{icon:i,showColors:!0}),l)}var Ly=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,u.useState)(),{priorityTextTransformations:s,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,u.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r](0,u.createElement)(Fy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:l}))),!p&&d),!!p&&(0,u.createElement)(g.MenuGroup,{className:t},d))};var Dy=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Uy=window.wp.tokenList,jy=n.n(Uy);function zy(e,t,n){const r=new(jy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function Vy(e){return null==e?void 0:e.find((e=>e.isDefault))}function Gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:o,blockType:i,className:l}=(0,m.useSelect)((e=>{const{getBlock:n}=e(xr),r=n(t);if(!r)return{};const o=(0,a.getBlockType)(r.name),{getBlockStyles:i}=e(a.store);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:s}=(0,m.useDispatch)(xr),c=function(e){return e&&0!==e.length?Vy(e)?e:[{name:"default",label:(0,_._x)("Default","block style"),isDefault:!0},...e]:[]}(r),p=function(e,t){for(const n of new(jy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(r)return r}return Vy(e)}(c,l),d=function(e,t){return(0,u.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,a.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=zy(l,p,e);s(t,{className:r}),n()},stylesToRender:c,activeStyle:p,genericPreviewBlock:d,className:l}}const Hy=()=>{};function Wy(e){let{clientId:t,onSwitch:n=Hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=Gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,u.createElement)(u.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,u.createElement)(g.MenuItem,{key:e.name,icon:i.name===e.name?Dy:null,onClick:()=>r(e)},(0,u.createElement)(g.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function $y(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,u.createElement)(Wy,{clientId:r,onSwitch:n}))}const Ky=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=Ky(e,t,n);if(r)return r}}},qy=(e,t)=>{const n=((e,t)=>{const n=(0,a.__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}};var Jy=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=Ky(o,t.name,r);if(n){e=!0,r.add(n.clientId),qy(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Yy(e){let{patterns:t,onSelect:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Qy,{patterns:t,onSelect:n})))))}function Qy(e){let{patterns:t,onSelect:n}=e;const r=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,_.__)("Patterns list")}),t.map((e=>(0,u.createElement)(Zy,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Zy(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,f.useInstanceId)(Zy,`${o}-list__item-description`);return(0,u.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,u.createElement)(tf,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,u.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,u.createElement)(g.VisuallyHidden,{id:i},t.description))}var Xy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,u.useState)(!1),l=Jy(n,t);return l.length?(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,u.createElement)(Yy,{patterns:l,onSelect:r}),(0,u.createElement)(g.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:mp},(0,_.__)("Patterns"))):null};const eg=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r,multiSelect:o}=(0,m.useDispatch)(xr),i=sy(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:d}=(0,m.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:o,__experimentalGetPatternTransformItems:l}=e(xr),{getBlockStyles:s,getBlockType:c}=e(a.store),{canRemoveBlocks:u}=e(xr),p=r(Array.isArray(t)?t[0]:t),[{name:d}]=n,f=1===n.length,m=f&&s(d);let y;if(f)y=null==i?void 0:i.icon;else{var g;y=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(g=c(d))||void 0===g?void 0:g.icon:Ny}return{possibleBlockTransformations:o(n,p),canRemove:u(t,p),hasBlockStyles:!(null==m||!m.length),icon:y,patterns:l(n,p)}}),[t,n,null==i?void 0:i.icon]),f=cy({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),y=1===n.length&&(0,a.isReusableBlock)(n[0]),h=1===n.length&&(0,a.isTemplatePart)(n[0]);function v(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const b=!!l.length&&s&&!h,k=!(null==d||!d.length)&&s;if(!c&&!b)return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f))}));const E=f,S=1===n.length?(0,_.sprintf)((0,_.__)("%s: Change block type or style"),f):(0,_.sprintf)((0,_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),w=c||b||k;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(g.DropdownMenu,{className:"block-editor-block-switcher",label:E,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return w&&(0,u.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,u.createElement)(Xy,{blocks:n,patterns:d,onSelect:e=>{!function(e){r(t,e),v(e)}(e),o()}}),b&&(0,u.createElement)(Ly,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{!function(e){const o=(0,a.switchToBlockType)(n,e);r(t,o),v(o)}(e),o()}}),c&&(0,u.createElement)($y,{hoveredBlock:n[0],onSwitch:o}))})))))};var tg=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(xr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,u.createElement)(eg,{clientIds:t,blocks:n})};const{Fill:ng,Slot:rg}=(0,g.createSlotFill)("__unstableBlockToolbarLastItem");ng.Slot=rg;var og=ng;function ig(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function lg(){const{getBlockName:e}=(0,m.useSelect)(xr),{getBlockType:t}=(0,m.useSelect)(a.store),{createSuccessNotice:n}=(0,m.useDispatch)(bf.store);return(0,u.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,_.sprintf)((0,_.__)('Copied "%s" to clipboard.'),a):(0,_.sprintf)((0,_.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,_.sprintf)((0,_._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,_.sprintf)((0,_._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function ag(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:o,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:c}=(0,m.useSelect)(xr),{flashBlock:u,removeBlocks:p,replaceBlocks:d,__unstableDeleteSelection:y,__unstableExpandSelection:g,insertBlocks:h}=(0,m.useDispatch)(xr),v=lg();return(0,f.useRefEffect)((f=>{function m(m){const b=t();if(0===b.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ml.documentHasUncollapsedSelection)(t):(0,Ml.documentHasSelection)(t))return}if(!f.contains(m.target.ownerDocument.activeElement))return;const _=m.defaultPrevented;m.preventDefault();const k=l(),E=i()||o(),S=!E&&!k;if("copy"===m.type||"cut"===m.type)if(1===b.length&&u(b[0]),S)g();else{let t;if(v(m.type,b),E)t=e(b);else{const[n,r]=s();t=[n,...e(b.slice(1,b.length-1)),r]}const n=m.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,a.createBlock)(n,JSON.parse(m.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,a.serialize)(t);m.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Ml.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),m.clipboardData.setData("text/html",r)}if("cut"===m.type)E&&!S?p(b):y();else if("paste"===m.type){if(_)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n,files:o}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Ml.getFilesFromDataTransfer)(t);return o.length&&!ig(o,r)?{files:o}:{html:r,plainText:n,files:[]}}(m);let i=[];if(o.length){const e=(0,a.getBlockTransforms)("from");i=o.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat()}else i=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===b.length){const[e]=b;if(i.every((t=>c(t.name,e))))return void h(i,void 0,e)}d(b,i,i.length-1,-1)}}return f.ownerDocument.addEventListener("copy",m),f.ownerDocument.addEventListener("cut",m),f.ownerDocument.addEventListener("paste",m),()=>{f.ownerDocument.removeEventListener("copy",m),f.ownerDocument.removeEventListener("cut",m),f.ownerDocument.removeEventListener("paste",m)}}),[])}var sg=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:ag()},t)};const cg="align",ug="__experimentalBorder",pg="color",dg="customClassName",fg="typography.__experimentalFontFamily",mg="typography.fontSize",yg="__experimentalLayout",gg=[...["typography.lineHeight",mg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",fg,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],ug,pg,"spacing"];const hg={align:e=>(0,a.hasBlockSupport)(e,cg),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,ug);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]))}(e,"color"),backgroundColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.background},textColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.text},gradient:e=>{const t=(0,a.getBlockSupport)(e,pg);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,a.hasBlockSupport)(e,dg,!0),fontFamily:e=>(0,a.hasBlockSupport)(e,fg),fontSize:e=>(0,a.hasBlockSupport)(e,mg),layout:e=>(0,a.hasBlockSupport)(e,yg),style:e=>gg.some((t=>(0,a.hasBlockSupport)(e,t)))};function vg(e,t){return Object.entries(hg).reduce(((n,r)=>{let[o,i]=r;return i(e.name)&&i(t.name)&&(n[o]=e.attributes[o]),n}),{})}function bg(e,t,n){for(let r=0;r{let l="";try{if(!window.navigator.clipboard)return void o((0,_.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});l=await window.navigator.clipboard.readText()}catch(e){return void o((0,_.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!l||!function(e){try{const t=(0,a.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(l))return void r((0,_.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,a.parse)(l);if(1===s.length?e.batch((()=>{bg(i,i.map((()=>s[0])),t)})):e.batch((()=>{bg(i,s,t)})),1===i.length){var c;const e=null===(c=(0,a.getBlockType)(i[0].name))||void 0===c?void 0:c.title;n((0,_.sprintf)((0,_.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,_.sprintf)((0,_.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,r,o])}function kg(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:s,canRemoveBlocks:c}=(0,m.useSelect)(xr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,m.useSelect)(a.store),d=l(t),f=i(t[0]),y=d.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,f))),g=o(u(),f),h=s(t,f),v=c(t,f),{removeBlocks:b,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:E,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:A}=(0,m.useDispatch)(xr),x=lg(),B=_g();return n({canDuplicate:y,canInsertDefaultBlock:g,canMove:h,canRemove:v,rootClientId:f,blocks:d,onDuplicate(){return k(t,r)},onRemove(){return b(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;S(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){I(!0),A(t[0]),C(t[0])},onGroup(){if(!d.length)return;const e=p(),n=(0,a.switchToBlockType)(d,e);n&&_(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&w(e[0]),x("copy",e)},async onPasteStyles(){await B(d)}})}const Eg=()=>{};var Sg=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(xr),l=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:l?(0,a.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=Eg,clientId:r}=t;return{onToggleMode(){e(xr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!(0,a.hasBlockSupport)(t,"html",!0)||!i)return null;const l="visual"===n?(0,_.__)("Edit as HTML"):(0,_.__)("Edit visually");return(0,u.createElement)(g.MenuItem,{onClick:r},!o&&l)}));var wg=(0,f.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(xr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(xr).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,_.__)("Convert to Blocks");return(0,u.createElement)(g.MenuItem,{onClick:n},!r&&o)}));const{Fill:Cg,Slot:Ig}=(0,g.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Cg.Slot=Ig;var Ag=Cg;function xg(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(xr),{getGroupingBlockName:l}=e(a.store),s=i(),c=l(),u=o(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}function Bg(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:s}=(0,m.useDispatch)(xr);return n||r?(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(o,i);e&&s(t,e)})(),l()}},(0,_._x)("Group","verb")),r&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&s(t,e)})(),l()}},(0,_._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Pg(e){return(0,m.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(xr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var Tg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Og=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));var Ng=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const Mg=["core/block","core/navigation"];function Rg(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Fg(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:s}=Pg(t),{allowsEditLocking:c,templateLock:p,hasTemplateLock:d}=(0,m.useSelect)((e=>{var n,r;const{getBlockName:o,getBlockAttributes:i}=e(xr),l=o(t),s=(0,a.getBlockType)(l);return{allowsEditLocking:Mg.includes(l),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[y,h]=(0,u.useState)(!!p),{updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=sy(t),k=(0,f.useInstanceId)(Fg,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!s,...c?{edit:!i}:{}})}),[i,l,s,c]);const E=Object.values(r).every(Boolean),S=Object.values(r).some(Boolean)&&!E;return(0,u.createElement)(g.Modal,{title:(0,_.sprintf)((0,_.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,u.createElement)("p",null,(0,_.__)("Choose specific attributes to restrict or lock all available options.")),(0,u.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:y?Rg(r):void 0}),n()}},(0,u.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,u.createElement)("span",{id:k},(0,_.__)("Lock all")),checked:E,indeterminate:S,onChange:e=>o({move:e,remove:e,...c?{edit:e}:{}})}),(0,u.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},c&&(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Restrict editing"),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.edit?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Disable movement"),checked:r.move,onChange:e=>o((t=>({...t,move:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.move?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Prevent removal"),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.remove?Ng:Tg}))),d&&(0,u.createElement)(g.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_.__)("Apply to all blocks inside"),checked:y,disabled:r.move&&!r.remove,onChange:()=>h(!y)})),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:n},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",type:"submit"},(0,_.__)("Apply"))))))}function Lg(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Pg(t),[o,i]=(0,u.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,_.__)("Unlock"):(0,_.__)("Lock");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{icon:r?Tg:Og,onClick:i},l),o&&(0,u.createElement)(Fg,{clientId:t,onClose:i}))}const{Fill:Dg,Slot:Ug}=(0,g.createSlotFill)("BlockSettingsMenuControls");function jg(e){let{...t}=e;return(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(Dg,t))}jg.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:l}=(0,m.useSelect)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(xr),i=null!==n?n:r();return{selectedBlocks:t(i),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:a}=Pg(i[0]),s=1===i.length&&a,p=xg(),{isGroupable:d,isUngroupable:f}=p,y=(d||f)&&l;return(0,u.createElement)(Ug,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!y&&!s?null:(0,u.createElement)(g.MenuGroup,null,s&&(0,u.createElement)(Lg,{clientId:i[0]}),e,y&&(0,u.createElement)(Bg,c({},p,{onClose:null==t?void 0:t.onClose})))))};var zg=jg;const Vg=()=>{},Gg={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function Hg(e){let{blocks:t,onCopy:n,label:r}=e;const o=(0,f.useCopyToClipboard)((()=>(0,a.serialize)(t)),n),i=t.length>1?(0,_.__)("Copy blocks"):(0,_.__)("Copy block"),l=r||i;return(0,u.createElement)(g.MenuItem,{ref:o},l)}var Wg=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:o,...i}=e;const l=Array.isArray(t)?t:[t],s=l.length,p=l[0],{firstParentClientId:d,isDistractionFree:y,onlyBlock:h,parentBlockType:v,previousBlockClientId:b,nextBlockClientId:k,selectedBlockClientIds:E}=(0,m.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:s,getBlockAttributes:c}=e(xr),{getActiveBlockVariation:u}=e(a.store),d=r(p),f=d&&n(d);return{firstParentClientId:d,isDistractionFree:s().isDistractionFree,onlyBlock:1===t(d),parentBlockType:d&&(u(f,c(d))||(0,a.getBlockType)(f)),previousBlockClientId:o(p),nextBlockClientId:i(p),selectedBlockClientIds:l()}}),[p]),S=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Pp.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")}}),[]),{selectBlock:w,toggleBlockHighlight:C}=(0,m.useDispatch)(xr),I=(0,u.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Vg,[n]),A=cy({clientId:p,maximumLength:25}),x=(0,u.useCallback)(n?()=>{const e=b||k||d;e&&E.includes(p)&&!E.includes(e)&&n(e)}:Vg,[n,b,k,d,E]),B=(0,_.sprintf)((0,_.__)("Remove %s"),A),P=1===s?B:(0,_.__)("Remove blocks"),T=(0,u.useRef)(),{gestures:O}=Ty({ref:T,onChange(e){e&&y||C(d,e)}}),N=null==E?void 0:E.includes(d);return(0,u.createElement)(kg,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:l,canMove:a,canRemove:m,onDuplicate:y,onInsertAfter:b,onInsertBefore:k,onRemove:E,onCopy:C,onPasteStyles:A,onMoveTo:B,blocks:M}=e;return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Gg,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Ag.Slot,{fillProps:{onClose:i}}),!N&&!!d&&(0,u.createElement)(g.MenuItem,c({},O,{ref:T,icon:(0,u.createElement)(hp,{icon:v.icon}),onClick:()=>w(d)}),(0,_.sprintf)((0,_.__)("Select parent block (%s)"),v.title)),1===s&&(0,u.createElement)(wg,{clientId:p}),(0,u.createElement)(Hg,{blocks:M,onCopy:C}),n&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,y,I),shortcut:S.duplicate},(0,_.__)("Duplicate")),l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,k),shortcut:S.insertBefore},(0,_.__)("Insert before")),(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,b),shortcut:S.insertAfter},(0,_.__)("Insert after"))),a&&!h&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,B)},(0,_.__)("Move to")),1===s&&(0,u.createElement)(Sg,{clientId:p,onToggle:i})),(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Hg,{blocks:M,onCopy:C,label:(0,_.__)("Copy styles")}),(0,u.createElement)(g.MenuItem,{onClick:A},(0,_.__)("Paste styles"))),(0,u.createElement)(zg.Slot,{fillProps:{onClose:i},clientIds:t,__unstableDisplayLocation:o}),"function"==typeof r?r({onClose:i}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:i}))),m&&(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,E,x),shortcut:S.remove},P)))}))}))};var $g=function(e){let{clientIds:t,...n}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(Wg,c({clientIds:t,toggleProps:e},n)))))};function Kg(e){let{clientId:t}=e;const n=sy(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Pg(t),[a,s]=(0,u.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,u.createElement)(g.ToolbarButton,{icon:Ng,label:(0,_.sprintf)((0,_.__)("Unlock %s"),n.title),onClick:s})),a&&(0,u.createElement)(Fg,{clientId:t,onClose:s})):null}var qg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var Jg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var Yg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Qg={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Zg=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=xg(),{replaceBlocks:o}=(0,m.useDispatch)(xr),{canRemove:i,variations:l}=(0,m.useSelect)((e=>{const{canRemoveBlocks:r}=e(xr),{getBlockVariations:o}=e(a.store);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),s=r=>{const i=(0,a.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),i&&i.length>0&&(i[0].attributes.layout=Qg[r],o(t,i))};if(!r||!i)return null;const c=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{icon:qg,label:(0,_._x)("Group","verb"),onClick:s}),c&&(0,u.createElement)(g.ToolbarButton,{icon:Jg,label:(0,_._x)("Row","single horizontal line"),onClick:()=>s("row")}),p&&(0,u.createElement)(g.ToolbarButton,{icon:Yg,label:(0,_._x)("Stack","verb"),onClick:()=>s("stack")}))};function Xg(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,m.useSelect)((e=>!!n&&"html"===e(xr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,m.useDispatch)(xr);return r?(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{onClick:()=>{o(n)}},(0,_.__)("Edit visually"))):null}var eh=(0,u.createContext)("");var th=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,isDistractionFree:l,isValid:s,isVisual:p,isContentLocked:y}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l,__unstableGetContentLockingParent:s}=e(xr),c=r(),u=c[0],p=i(u),d=l();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,a.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,isDistractionFree:d.isDistractionFree,rootClientId:p,isValid:c.every((e=>o(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,m.useDispatch)(xr),v=(0,u.useRef)(),{showMovers:b,gestures:_}=Ty({ref:v,onChange(e){e&&l||h(r,e)}}),k=(0,f.useViewportMatch)("medium","<")||i;if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const E=k||b;if(0===n.length)return null;const S=s&&p,w=n.length>1,C=(0,a.isReusableBlock)(o)||(0,a.isTemplatePart)(o),I=d()("block-editor-block-toolbar",{"is-showing-movers":E,"is-synced":C});return(0,u.createElement)("div",{className:I},!w&&!k&&!y&&(0,u.createElement)(Oy,null),(0,u.createElement)("div",c({ref:v},_),(S||w)&&!y&&(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,u.createElement)(tg,{clientIds:n}),!w&&(0,u.createElement)(Kg,{clientId:n[0]}),(0,u.createElement)(ky,{clientIds:n,hideDragHandle:t}))),S&&w&&(0,u.createElement)(Zg,null),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(eh.Provider,{value:null==o?void 0:o.name},(0,u.createElement)(og.Slot,null))),(0,u.createElement)(Xg,{clientIds:n}),!y&&(0,u.createElement)($g,{clientIds:n}))};var nh=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:o}=e(xr),{getBlockType:i}=e(a.store),l=r(),s=l[0],c=n(s),u=i(t(c[c.length-1]));return{blockType:s&&i(t(s)),hasParents:c.length,showParentSelector:u&&(0,a.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&l.length<=1&&!o(s)}}),[]);if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const s=d()("block-editor-block-contextual-toolbar",{"has-parent":i&&l,"is-fixed":n});return(0,u.createElement)(Cy,c({focusOnMount:t,className:s,"aria-label":(0,_.__)("Block tools")},r),(0,u.createElement)(th,{hideDragHandle:n}))};const{CustomSelectControl:rh}=Ir(g.privateApis),oh="position",ih="block-editor-hooks__position-selection__select-control__option",lh={key:"default",value:"",name:(0,_.__)("Default"),className:ih},ah={key:"sticky",value:"sticky",name:(0,_._x)("Sticky","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will stick to the top of the window instead of scrolling.")},sh={key:"fixed",value:"fixed",name:(0,_._x)("Fixed","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will not move when the page is scrolled.")},ch=["top","right","bottom","left"],uh=["sticky","fixed"];function ph(e){return!!(0,a.getBlockSupport)(e,oh)}function dh(e){var t,n;const r=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===r||"fixed"===r}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("position.fixed"),n=yo("position.sticky"),r=!t&&!n;return!ph(e)||r}function mh(e){var t;const{attributes:{style:n={}},clientId:r,name:o,setAttributes:i}=e,l=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.fixed)}(o),s=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.sticky)}(o),c=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:p}=(0,m.useSelect)((e=>{const{getBlockParents:t}=e(xr);return{hasParents:t(r).length}}),[r]),d=(0,u.useMemo)((()=>{const e=[lh];return(s&&!p||c===ah.value)&&e.push(ah),(l||c===sh.value)&&e.push(sh),e}),[l,s,p,c]),f=c&&d.find((e=>e.value===c))||lh;return u.Platform.select({web:d.length>1?(0,u.createElement)(Wo,{group:"position"},(0,u.createElement)(g.BaseControl,{className:"block-editor-hooks__position-selection"},(0,u.createElement)(rh,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,_.__)("Position"),hideLabelFromVision:!0,describedBy:(0,_.sprintf)((0,_.__)("Currently selected position: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};i({style:Ro(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const yh=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,oh)&&!fh(t)&&(0,u.createElement)(mh,c({key:"position"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),gh=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i;const{name:l,attributes:s}=t,p=(0,a.hasBlockSupport)(l,oh)&&!fh(t),m=(0,f.useInstanceId)(e),y=(0,u.useContext)(Jh.__unstableElementContext);let g;p&&(g=function(e){let{selector:t,style:n}=e,r="";const{type:o}=(null==n?void 0:n.position)||{};return uh.includes(o)?(r+=`${t} {`,r+=`position: ${o};`,ch.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(r+=`${e}: ${n.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(r+="z-index: 10"),r+="}",r):r}({selector:`.wp-container-${m}.wp-container-${m}`,style:null==s?void 0:s.style})||"");const h=d()(null==t?void 0:t.className,{[`wp-container-${m}`]:p&&!!g,[`is-position-${null==s||null===(n=s.style)||void 0===n||null===(r=n.position)||void 0===r?void 0:r.type}`]:p&&!!g&&!(null==s||null===(o=s.style)||void 0===o||null===(i=o.position)||void 0===i||!i.type)});return(0,u.createElement)(u.Fragment,null,p&&y&&!!g&&(0,u.createPortal)((0,u.createElement)("style",null,g),y),(0,u.createElement)(e,c({},t,{className:h})))}));(0,s.addFilter)("editor.BlockListBlock","core/editor/position/with-position-styles",gh),(0,s.addFilter)("editor.BlockEdit","core/editor/position/with-inspector-controls",yh);const hh={placement:"top-start"},vh={...hh,flip:!1,shift:!0},bh={...hh,flip:!0,shift:!1};function _h(e,t,n,r,o){if(!e||!t)return vh;const i=(null==n?void 0:n.scrollTop)||0,l=t.getBoundingClientRect(),a=i+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+r,u=l.top>c,p=l.height>s-r;return o||!u&&!p?bh:vh}function kh(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isBlockInterfaceHidden:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=Ir(e(xr));return{editorMode:t(),hasMultiSelection:r(),isMultiSelecting:n(),isTyping:o(),isBlockInterfaceHidden:i(),hasFixedToolbar:l().hasFixedToolbar,isDistractionFree:l().isDistractionFree,lastClientId:r()?a():null}}function Eh(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,showContents:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:p,isMultiSelecting:y,isTyping:g,isBlockInterfaceHidden:h,hasFixedToolbar:v,isDistractionFree:b,lastClientId:_}=(0,m.useSelect)(kh,[]),k=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(xr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),E=(0,f.useViewportMatch)("medium"),S=(0,u.useRef)(!1),{stopTyping:w}=(0,m.useDispatch)(xr),C=!g&&"edit"===s&&r,I=!p&&("navigation"===s||"zoom-out"===s),A="edit"===s&&!v&&E&&!y&&!C&&!g&&!h,x=!("edit"!==s||A||v||b||r);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",(()=>{S.current=!0,w(!0)}),{isDisabled:!x}),(0,u.useEffect)((()=>{S.current=!1}));const B=(0,u.useRef)(),P=function(e){let{contentElement:t,clientId:n}=e;const r=eo(n),[o,i]=(0,u.useState)(0),{blockIndex:l,isSticky:a}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockAttributes:r}=e(xr);return{blockIndex:t(n),isSticky:dh(r(n))}}),[n]),s=(0,u.useMemo)((()=>{if(t)return(0,Ml.getScrollContainer)(t)}),[t]),[c,p]=(0,u.useState)((()=>_h(t,r,s,o,a))),d=(0,f.useRefEffect)((e=>{i(e.offsetHeight)}),[]),y=(0,u.useCallback)((()=>p(_h(t,r,s,o,a))),[t,r,s,o]);return(0,u.useLayoutEffect)(y,[l,y]),(0,u.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",y);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(y),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",y),l&&l.disconnect()}}),[y,t,r]),{...c,ref:d}}({contentElement:null==a?void 0:a.current,clientId:t});return C?(0,u.createElement)(Yo,c({clientId:i||t,__unstableCoverTarget:!0,bottomClientId:_,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1,shift:!1},P),(0,u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,u.createElement)(Wm,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):I||A?(0,u.createElement)(Yo,c({clientId:i||t,bottomClientId:_,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1},P),A&&o&&(0,u.createElement)(nh,{focusOnMount:S.current,__experimentalInitialIndex:B.current,__experimentalOnIndexChange:e=>{B.current=e},key:t}),I&&(0,u.createElement)(Ey,{clientId:t,rootClientId:n})):null}function Sh(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,getSettings:l,isNavigationMode:s,__experimentalGetBlockListSettingsForBlocks:c}=e(xr),u=t()||n();if(!u)return;const{name:p,attributes:d={}}=o(u)||{},f=i(u),m=c(f),y=f.find((e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),g=l();return{clientId:u,rootClientId:r(u),name:p,isDistractionFree:g.isDistractionFree,isNavigationMode:s(),isEmptyDefaultBlock:p&&(0,a.isUnmodifiedDefaultBlock)({name:p,attributes:d}),capturingClientId:y}}function wh(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,m.useSelect)(Sh,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:p}=r;return l?(0,u.createElement)(Eh,{clientId:o,rootClientId:i,isEmptyDefaultBlock:a,showContents:!c||p,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Ch(e){let{children:t}=e;const n=(0,u.useContext)(ny),r=(0,u.useContext)(g.Disabled.Context);return n||r?t:($()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,u.createElement)(oy,{__unstablePopoverSlot:"block-toolbar"},(0,u.createElement)(wh,{__unstablePopoverSlot:"block-toolbar"}),t))}var Ih=(0,f.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Nr();return(0,u.createElement)(e,c({},t,{clientId:n}))}),"withClientId");var Ah=Ih((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,u.createElement)(Jm,{className:d()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xh=(0,f.compose)([Ih,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(xr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,u.createElement)($m,{rootClientId:t})}));const Bh=new WeakMap;function Ph(e,t,n,r,o,i,l){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,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"===p){l();const e=d.map((e=>(0,a.cloneBlock)(e)));i(e,!0,null)}if("block"===p){const i=n(u[0]);if(c===e&&i===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;o(u,c,l&&i{if(!n)return;const l=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(n=>"files"===n.type&&o(n.blockName,e)&&n.isMatch(t)));if(l){const e=l.transform(t,r);i(e)}}}function Oh(e,t,n){return e=>{const t=(0,a.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function Nh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:r="insert"}=n,o=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),{canInsertBlockType:i,getBlockIndex:l,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,m.useSelect)(xr),{insertBlocks:p,moveBlocksToPosition:d,updateBlockAttributes:f,clearSelectedBlock:y,replaceBlocks:g,removeBlocks:h}=(0,m.useDispatch)(xr),v=(0,m.useRegistry)(),b=(0,u.useCallback)((function(n){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===r){const r=s(e)[t];g(r,n,void 0,i)}else p(n,t,e,o,i)}),[r,s,p,g,t,e]),_=(0,u.useCallback)(((n,o,i)=>{if("replace"===r){const r=c(n),o=s(e)[t];v.batch((()=>{h(n,!1),g(o,r,void 0,0)}))}else d(n,o,e,i)}),[r,s,c,p,d,h,t,e]),k=Ph(e,t,l,a,_,b,y),E=Th(e,0,o,f,i,b),S=Oh(0,0,b);return e=>{const t=(0,Ml.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?S(n):t.length?E(t):k(e)}}function Mh(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Mh(e,t,o);(void 0===n||i=e.x&&t.top<=e.y&&t.bottom>=e.y}function Lh(e,t){var n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i="horizontal"===o?["left","right"]:["top","bottom"],l=(0,_.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:r,blockIndex:o}=e;const u=r();let[p,d]=Rh(t,u,i);n&&Fh(t,u)&&(p=0),p0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,u.useState)({index:null,operation:"insert"}),r=(0,m.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(xr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o,getBlocks:i,getBlockIndex:l}=(0,m.useSelect)(xr),{showInsertionPoint:s,hideInsertionPoint:c}=(0,m.useDispatch)(xr),p=Nh(e,t.index,{operation:t.operation}),d=(0,f.useThrottle)((0,u.useCallback)(((t,r)=>{var c;const u=i(e);if(0===u.length)return void n({index:0,operation:"insert"});const p=u.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,a.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>r.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:l(t)}})),[d,f]=Lh(p,{x:t.clientX,y:t.clientY},null===(c=o(e))||void 0===c?void 0:c.orientation);n({index:d,operation:f}),s(e,d,{operation:f})}),[e]),200);return(0,f.__experimentalUseDropZone)({isDisabled:r,onDrop:p,onDragOver(e){d(e,e.currentTarget.ownerDocument)},onDragLeave(){d.cancel(),c()},onDragEnd(){d.cancel(),c()}})}const Uh={};function jh(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:s,templateInsertUpdatesSelection:c,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:d,renderAppender:f,orientation:y,placeholder:g,layout:h}=e;!function(e,t,n,r,o,i,l,a){const{updateBlockListSettings:s}=(0,m.useDispatch)(xr),c=(0,m.useRegistry)(),{blockListSettings:p,parentLock:d}=(0,m.useSelect)((t=>{const n=t(xr).getBlockRootClientId(e);return{blockListSettings:t(xr).getBlockListSettings(e),parentLock:t(xr).getTemplateLock(n)}}),[e]),f=(0,u.useMemo)((()=>t),t);(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,templateLock:void 0===o||"contentOnly"===d?d:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=il(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),Ko()(p,t)||(Bh.get(c)||Bh.set(c,[]),Bh.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bh.get(c))&&void 0!==e&&e.length&&c.batch((()=>{Bh.get(c).forEach((e=>{s(...e)})),Bh.set(c,[])}))})))}),[e,p,f,n,r,o,d,i,l,s,a,c])}(t,n,r,o,l,p,y,h),function(e,t,n,r){const{getBlocks:o,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,m.useSelect)(xr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,m.useDispatch)(xr),{innerBlocks:p}=(0,m.useSelect)((t=>({innerBlocks:t(xr).getBlocks(e)})),[e]),d=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const p=o(e),f=0===p.length||"all"===n||"contentOnly"===n,m=!b()(t,d.current);if(!f||!m)return;d.current=t;const y=(0,a.synchronizeBlocksWithTemplate)(p,t);b()(y,p)||(c(),s(e,y,0===p.length&&r&&0!==y.length&&l(e),i()))})),()=>{u=!0}}),[p,t,n,e])}(t,i,l,c);const v=function(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlock(e);if(!n)return;const r=t(a.store).getBlockType(n.name);return r&&0!==Object.keys(r.providesContext).length?Object.fromEntries(Object.entries(r.providesContext).map((e=>{let[t,r]=e;return[t,n.attributes[r]]}))):void 0}),[e])}(t),_=(0,m.useSelect)((e=>{var n;return null===(n=e(xr).getBlock(t))||void 0===n?void 0:n.name}),[t]),k=(0,a.getBlockSupport)(_,"__experimentalLayout")||Uh,{allowSizingOnChildren:E=!1}=k,S=yo("layout")||Uh,w=h||k,C=(0,u.useMemo)((()=>({...S,...w,...E&&{allowSizingOnChildren:!0}})),[S,w,E]);return(0,u.createElement)(Fl,{value:v},(0,u.createElement)(Qh,{rootClientId:t,renderAppender:f,__experimentalAppenderTagName:d,__experimentalLayout:C,wrapperRef:s,placeholder:g}))}function zh(e){return kp(e),(0,u.createElement)(jh,e)}const Vh=(0,u.forwardRef)(((e,t)=>{const n=Gh({ref:t},e);return(0,u.createElement)("div",{className:"block-editor-inner-blocks"},(0,u.createElement)("div",n))}));function Gh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:r}=t,{clientId:o,layout:i=null,__unstableLayoutClassNames:l=""}=Nr(),s=(0,f.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:p,hasOverlay:y}=(0,m.useSelect)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:r,__unstableGetEditorMode:i}=e(xr),l=t(o),c="navigation"===i()||s;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(l,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==l&&!n(o)&&!r(o,!0)&&c}}),[o,s]),g=Dh({rootClientId:o}),h=(0,f.useMergeRefs)([e.ref,r?null:g]),v={__experimentalCaptureToolbars:p,layout:i,...t},b=v.value&&v.onChange?zh:jh;return{...e,ref:h,className:d()(e.className,"block-editor-block-list__layout",n?"":l,{"has-overlay":y}),children:o?(0,u.createElement)(b,c({},v,{clientId:o})):(0,u.createElement)(Qh,t)}}Gh.save=a.__unstableGetInnerBlocksProps,Vh.DefaultBlockAppender=xh,Vh.ButtonBlockAppender=Ah,Vh.Content=()=>Gh.save().children;var Hh=Vh;const Wh=(0,u.createContext)(),$h=(0,u.createContext)(),Kh=new WeakMap;function qh(e){let{className:t,...n}=e;const[r,o]=(0,u.useState)(),i=(0,f.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:a,editorMode:s}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(xr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),c=(0,m.useRegistry)(),{setBlockVisibility:p}=(0,m.useDispatch)(xr),y=(0,f.useDebounce)((0,u.useCallback)((()=>{const e={};Kh.get(c).forEach((t=>{let[n,r]=t;e[n]=r})),p(e)}),[c]),300,{trailing:!0}),g=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Kh.get(c)||Kh.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");Kh.get(c).push([e,t.isIntersecting])}y()}))}),[]),h=Gh({ref:(0,f.useMergeRefs)([wp(),iy(),o]),className:d()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":a&&i,"is-navigate-mode":"navigation"===s})},n);return(0,u.createElement)(Wh.Provider,{value:r},(0,u.createElement)($h.Provider,{value:g},(0,u.createElement)("div",h)))}function Jh(e){return function(){const{patterns:e,isPreviewMode:t}=(0,m.useSelect)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(xr).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,u.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,r=-1;const o=()=>{r++,r>=e.length||((0,m.select)(xr).__experimentalGetParsedPattern(e[r].name),n=ly(o))};return n=ly(o),()=>ay(n)}),[e,t])}(),(0,u.createElement)(Ch,null,(0,u.createElement)(Or,{value:Pr},(0,u.createElement)(qh,e)))}function Yh(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=ll}=e;const{order:l,selectedBlocks:a,visibleBlocks:s}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(xr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,u.createElement)(sl,{value:i},l.map((e=>(0,u.createElement)(m.AsyncModeProvider,{key:e,value:!s.has(e)&&!a.includes(e)},(0,u.createElement)(cp,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,u.createElement)(Qm,{tagName:o,rootClientId:n,renderAppender:r}))}function Qh(e){return(0,u.createElement)(m.AsyncModeProvider,{value:!1},(0,u.createElement)(Yh,e))}function Zh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||Zh(Object.values(n).filter(Boolean))||"px"}function ev(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=Zh(r),l=0===o||o?`${o}${i}`:void 0;return l}function tv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ev(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function nv(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function rv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,l=ev(o);void 0===l&&(l=Xh(n));const a=nv(o)&&tv(o),s=a?(0,_.__)("Mixed"):null;return(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":(0,_.__)("Border radius"),disableUnits:a,isOnly:!0,value:l,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}Jh.__unstableElementContext=Wh;const ov={topLeft:(0,_.__)("Top left"),topRight:(0,_.__)("Top right"),bottomLeft:(0,_.__)("Bottom left"),bottomRight:(0,_.__)("Bottom right")};function iv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const l=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...a,[e]:r})},a="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,u.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(ov).map((e=>{let[t,o]=e;const[s,p]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(a[t]),d=a[t]?p:n[t]||n.flat;return(0,u.createElement)(g.Tooltip,{text:o,position:"top",key:t},(0,u.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":o,value:[s,d].join(""),onChange:l(t),onUnitChange:(f=t,e=>{const t={...n};t[f]=e,r(t)}),size:"__unstable-large"}))));var f})))}function lv(e){let{isLinked:t,...n}=e;const r=t?(0,_.__)("Unlink radii"):(0,_.__)("Link radii");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",null,(0,u.createElement)(g.Button,c({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r}))))}const av={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sv={px:100,em:20,rem:20};function cv(e){let{onChange:t,values:n}=e;const[r,o]=(0,u.useState)(!nv(n)||!tv(n)),[i,l]=(0,u.useState)({flat:"string"==typeof n?(0,g.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]}),s=Xh(i),c=a&&a.find((e=>e.value===s)),p=(null==c?void 0:c.step)||1,[d]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(ev(n));return(0,u.createElement)("fieldset",{className:"components-border-radius-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Radius")),(0,u.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(rv,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:a}),(0,u.createElement)(g.RangeControl,{label:(0,_.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:sv[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,u.createElement)(iv,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||av,units:a}),(0,u.createElement)(lv,{onClick:()=>o(!r),isLinked:r})))}function uv(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(cv,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=Ro({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}hd([vd,kd]);const pv=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},dv=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function fv(e,t){if(e&&t)return`has-${(0,y.kebabCase)(t)}-${e}`}function mv(){const e={disableCustomColors:!yo("color.custom"),disableCustomGradients:!yo("color.customGradient")},t=yo("color.palette.custom"),n=yo("color.palette.theme"),r=yo("color.palette.default"),o=yo("color.defaultPalette");e.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,_._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=yo("color.gradients.custom"),l=yo("color.gradients.theme"),a=yo("color.gradients.default"),s=yo("color.defaultGradients");return e.gradients=(0,u.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),s&&a&&a.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,_._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,a]),e}const yv="__experimentalBorder",gv=["top","right","bottom","left"],hv=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},vv=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},bv=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=vv(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=vv(t,"color",r);return o||{color:r}};function _v(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function kv(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:o}=t,{colors:i}=mv(),l=Ev(e.name),s=yo("border.color")&&Ev(e.name,"color"),c=yo("border.radius")&&Ev(e.name,"radius"),p=yo("border.style")&&Ev(e.name,"style"),d=yo("border.width")&&Ev(e.name,"width");if([!s,!c,!p,!d].every(Boolean)||!l)return null;const f=(0,a.getBlockSupport)(e.name,[yv,"__experimentalDefaultControls"]),m=(null==f?void 0:f.color)||(null==f?void 0:f.width),y=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=bv({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return gv.forEach((e=>{var n;const r=_v(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=bv({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,i);return(0,u.createElement)(Wo,{group:"border"},(d||s)&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,g.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,_.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:Ro({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:m,resetAllFilter:hv,panelId:n},(0,u.createElement)(g.__experimentalBorderBoxControl,{colors:i,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,l={...e};if((0,g.__experimentalHasSplitBorders)(e))l={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},gv.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=bv({colors:i,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(l[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=bv({colors:i,customColor:t});r.slug&&(n=r.slug,l.color=void 0)}const a=Ro({...o,border:{radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius,...l}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",size:"__unstable-large",value:y,__experimentalIsRenderedInSidebar:!0})),c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,_.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Sv(r,"radius")})}(e),isShownByDefault:null==f?void 0:f.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,u.createElement)(uv,e)))}function Ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,yv);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 Sv(e,t){return Ro({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function wv(e,t,n){if(!Ev(t,"color")||Uo(t,yv,"color"))return e;const r=Cv(n),o=d()(e.className,r);return e.className=o||void 0,e}function Cv(e){var t;const{borderColor:n,style:r}=e,o=fv("border-color",n);return d()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Iv=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i,l,a,s,p,d;const{name:f,attributes:m}=t,{borderColor:y,style:g}=m,{colors:h}=mv();if(!Ev(f,"color")||Uo(f,yv,"color"))return(0,u.createElement)(e,t);const{color:v}=bv({colors:h,namedColor:y}),{color:b}=bv({colors:h,namedColor:_v(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=bv({colors:h,namedColor:_v(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=bv({colors:h,namedColor:_v(null==g||null===(l=g.border)||void 0===l||null===(a=l.bottom)||void 0===a?void 0:a.color)}),{color:E}=bv({colors:h,namedColor:_v(null==g||null===(s=g.border)||void 0===s||null===(p=s.left)||void 0===p?void 0:p.color)}),S={borderTopColor:b||v,borderRightColor:_||v,borderBottomColor:k||v,borderLeftColor:E||v};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...S}},(0,u.createElement)(e,c({},t,{wrapperProps:w}))}));function Av(e){if(e)return`has-${e}-gradient-background`}function xv(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Bv(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}function Pv(e,t){const n=Bv(e,t);return n&&n.slug}function Tv(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Nr(),r=yo("color.gradients.custom"),o=yo("color.gradients.theme"),i=yo("color.gradients.default"),l=(0,u.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:a,customGradient:s}=(0,m.useSelect)((r=>{const{getBlockAttributes:o}=r(xr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,m.useDispatch)(xr),p=(0,u.useCallback)((r=>{const o=Pv(l,r);c(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,c]),d=Av(a);let f;return f=a?xv(l,a):s,{gradientClass:d,gradientValue:f,setGradient:p}}(0,s.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ev(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",wv),(0,s.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ev(e,"color")||Uo(e,yv,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),wv(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Iv);const Ov=["colors","disableCustomColors","gradients","disableCustomGradients"],Nv={name:"color",title:"Solid",value:"color"},Mv={name:"gradient",title:"Gradient",value:"gradient"},Rv=[Nv,Mv];function Fv(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,className:l,label:a,onColorChange:s,onGradientChange:c,colorValue:p,gradientValue:f,clearable:m,showTitle:h=!0,enableAlpha:v}=e;const b=s&&(!(0,y.isEmpty)(t)||!r),_=c&&(!(0,y.isEmpty)(n)||!o);if(!b&&!_)return null;const k={[Nv.value]:(0,u.createElement)(g.ColorPalette,{value:p,onChange:_?e=>{s(e),c()}:s,colors:t,disableCustomColors:r,__experimentalIsRenderedInSidebar:i,clearable:m,enableAlpha:v}),[Mv.value]:(0,u.createElement)(g.GradientPicker,{__nextHasNoMargin:!0,value:f,onChange:b?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,clearable:m})},E=e=>(0,u.createElement)("div",{className:"block-editor-color-gradient-control__panel"},k[e]);return(0,u.createElement)(g.BaseControl,{__nextHasNoMarginBottom:!0,className:d()("block-editor-color-gradient-control",l)},(0,u.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,u.createElement)(g.__experimentalVStack,{spacing:1},h&&(0,u.createElement)("legend",null,(0,u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,u.createElement)(g.BaseControl.VisualLabel,null,a))),b&&_&&(0,u.createElement)(g.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Rv,initialTabName:f?Mv.value:!!b&&Nv.value},(e=>E(e.value))),!_&&E(Nv.value),!b&&E(Mv.value))))}function Lv(e){const t={};return t.colors=yo("color.palette"),t.gradients=yo("color.gradients"),t.disableCustomColors=!yo("color.custom"),t.disableCustomGradients=!yo("color.customGradient"),(0,u.createElement)(Fv,c({},t,e))}var Dv=function(e){return Ov.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(Fv,e):(0,u.createElement)(Lv,e)};const Uv=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,u.createElement)(g.__experimentalToolsPanelItem,c({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},jv=e=>{let{colorValue:t,label:n}=e;return(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(g.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,u.createElement)(g.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},zv=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:d()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,u.createElement)(g.Button,l,(0,u.createElement)(jv,{colorValue:o,label:i}))};function Vv(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:l,settings:a,__experimentalIsRenderedInSidebar:s,...p}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,u.createElement)(u.Fragment,null,a.map(((e,a)=>{var d;const f={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:l,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},m={colorValue:null!==(d=e.gradientValue)&&void 0!==d?d:e.colorValue,label:e.label};return e&&(0,u.createElement)(Uv,c({key:a,setting:e},p),(0,u.createElement)(g.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:zv(m),renderContent:()=>(0,u.createElement)(g.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,u.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,u.createElement)(Dv,f)))}))})))}hd([vd,kd]);var Gv=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:a,linkColor:s,enableAlphaChecker:c=!1}=e;const p=t||n;if(!p)return null;const d=a||r,f=s||o;if(!d&&!f)return null;const m=[{color:d,description:(0,_.__)("text color")},{color:f,description:(0,_.__)("link color")}],y=yd(p),h=y.alpha()<1,v=y.brightness(),b={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",E="";for(const e of m){if(!e.color)continue;const t=yd(e.color),n=t.isReadable(y,b),r=t.alpha()<1;if(!n){if(h||r)continue;k=vnull==e?void 0:e.colorValue));(0,u.useEffect)((()=>{var e;if(!o)return;if(!m.length)return i&&l(),a&&s(),void(p&&s());if(!f.current)return;s(Hv(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(Hv(t).color);let n=f.current,r=Hv(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=Hv(n).backgroundColor;l(r)}));const y=mv();return(0,u.createElement)(Wo,{group:"color"},(0,u.createElement)(Vv,c({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalIsRenderedInSidebar:!0},y)),o&&(0,u.createElement)(Gv,{backgroundColor:i,textColor:a,enableAlphaChecker:t,linkColor:p}))}const $v="color",Kv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},qv=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.link},Jv=e=>{const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.gradients},Yv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.background},Qv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.text},Zv=(e,t)=>Ro(Lo(t,e,void 0)),Xv=e=>({textColor:void 0,style:Zv(["color","text"],e.style)}),eb=e=>({style:Zv(["elements","link","color","text"],e.style)}),tb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function nb(e,t,n){var r,o,i,l,a,s;if(!Kv(t)||Uo(t,$v))return e;const c=Jv(t),{backgroundColor:u,textColor:p,gradient:f,style:m}=n,y=e=>!Uo(t,$v,e),g=y("text")?fv("color",p):void 0,h=y("gradients")?Av(f):void 0,v=y("background")?fv("background-color",u):void 0,b=y("background")||y("gradients"),_=u||(null==m||null===(r=m.color)||void 0===r?void 0:r.background)||c&&(f||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient)),k=d()(e.className,g,h,{[v]:!(c&&null!=m&&null!==(i=m.color)&&void 0!==i&&i.gradient||!v),"has-text-color":y("text")&&(p||(null==m||null===(l=m.color)||void 0===l?void 0:l.text)),"has-background":b&&_,"has-link-color":y("link")&&(null==m||null===(a=m.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const rb=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?pv(e,n[1]).color:t};function ob(e){var t,n,r,o,i,l;const{name:s,attributes:c}=e,p=yo("color.palette.custom"),d=yo("color.palette.theme"),f=yo("color.palette.default"),m=(0,u.useMemo)((()=>[...p||[],...d||[],...f||[]]),[p,d,f]),y=yo("color.gradients.custom"),g=yo("color.gradients.theme"),h=yo("color.gradients.default"),v=(0,u.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),b=yo("color.custom"),k=yo("color.customGradient"),E=yo("color.background"),S=yo("color.link"),w=yo("color.text"),C=b||!d||(null==d?void 0:d.length)>0,I=k||!g||(null==g?void 0:g.length)>0,A=(0,u.useRef)(c);if((0,u.useEffect)((()=>{A.current=c}),[c]),!Kv(s))return null;const x=qv(s)&&S&&C,B=Qv(s)&&w&&C,P=Yv(s)&&E&&C,T=Jv(s)&&I;if(!(x||B||P||T))return null;const{style:O,textColor:N,backgroundColor:M,gradient:R}=c;let F;if(T&&R)F=xv(v,R);else if(T){var L;F=null==O||null===(L=O.color)||void 0===L?void 0:L.gradient}const D=t=>n=>{var r,o;const i=dv(m,n),l=t+"Color",a={...A.current.style,color:{...null===(r=A.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:Ro(a),[l]:s};e.setAttributes(c),A.current={...A.current,...c}},U=(0,a.getBlockSupport)(e.name,[$v,"__experimentalDefaultControls"]),j="web"===u.Platform.OS&&!R&&!(null!=O&&null!==(t=O.color)&&void 0!==t&&t.gradient)&&P&&(x||B)&&!1!==(0,a.getBlockSupport)(e.name,[$v,"enableContrastChecker"]);return(0,u.createElement)(Wv,{enableContrastChecking:j,clientId:e.clientId,enableAlpha:!0,settings:[...B?[{label:(0,_.__)("Text"),onColorChange:D("text"),colorValue:pv(m,N,null==O||null===(n=O.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==U?void 0:U.text,resetAllFilter:Xv}]:[],...P||T?[{label:(0,_.__)("Background"),onColorChange:P?D("background"):void 0,colorValue:pv(m,M,null==O||null===(r=O.color)||void 0===r?void 0:r.background).color,gradientValue:F,onGradientChange:T?t=>{const n=Pv(v,t);let r;if(n){var o,i,l;const e={...null===(o=A.current)||void 0===o?void 0:o.style,color:{...null===(i=A.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:Ro(e),gradient:n}}else{var a,s,c;const e={...null===(a=A.current)||void 0===a?void 0:a.style,color:{...null===(s=A.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Ro(e),gradient:void 0}}e.setAttributes(r),A.current={...A.current,...r}}:void 0,isShownByDefault:null==U?void 0:U.background,resetAllFilter:tb}]:[],...x?[{label:(0,_.__)("Link"),onColorChange:t=>{var n;const r=dv(m,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=Ro(Lo(null===(n=A.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),A.current={...A.current,style:i}},colorValue:rb(m,null==O||null===(o=O.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.text),isShownByDefault:null==U?void 0:U.link,resetAllFilter:eb}]:[]]})}const ib=(0,f.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:l}=o,a=yo("color.palette.custom"),s=yo("color.palette.theme"),p=yo("color.palette.default"),d=(0,u.useMemo)((()=>[...a||[],...s||[],...p||[]]),[a,s,p]);if(!Kv(r)||Uo(r,$v))return(0,u.createElement)(e,t);const f={};var m,y;l&&!Uo(r,$v,"text")&&(f.color=null===(m=pv(d,l))||void 0===m?void 0:m.color);i&&!Uo(r,$v,"background")&&(f.backgroundColor=null===(y=pv(d,i))||void 0===y?void 0:y.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,u.createElement)(e,c({},t,{wrapperProps:g}))})),lb={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,s.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Kv(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Jv(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",nb),(0,s.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Kv(e)||Uo(e,$v))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),nb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ib),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return Do({linkColor:qv(o),textColor:Qv(o),backgroundColor:Yv(o),gradient:Jv(o)},lb,e,t,n,r)}));const ab=[{name:(0,_._x)("Regular","font style"),value:"normal"},{name:(0,_._x)("Italic","font style"),value:"italic"}],sb=[{name:(0,_._x)("Thin","font weight"),value:"100"},{name:(0,_._x)("Extra Light","font weight"),value:"200"},{name:(0,_._x)("Light","font weight"),value:"300"},{name:(0,_._x)("Regular","font weight"),value:"400"},{name:(0,_._x)("Medium","font weight"),value:"500"},{name:(0,_._x)("Semi Bold","font weight"),value:"600"},{name:(0,_._x)("Bold","font weight"),value:"700"},{name:(0,_._x)("Extra Bold","font weight"),value:"800"},{name:(0,_._x)("Black","font weight"),value:"900"}],cb=(e,t)=>e?t?(0,_.__)("Appearance"):(0,_.__)("Font style"):(0,_.__)("Font weight");function ub(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...l}=e,a=n||r,s=cb(n,r),p={key:"default",name:(0,_.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,u.useMemo)((()=>n&&r?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;sb.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,_.sprintf)((0,_.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return sb.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),f=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return a&&(0,u.createElement)(g.CustomSelectControl,c({},l,{className:"components-font-appearance-control",label:s,describedBy:f?n?r?(0,_.sprintf)((0,_.__)("Currently selected font appearance: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font style: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font weight: %s"),f.name):(0,_.__)("No selected font appearance"),options:d,value:f,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const pb=1.5,db=.1;var fb=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const l=function(e){return void 0!==e&&""!==e}(t),a=l?t:"";r||$()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const s=r?void 0:{marginBottom:24};return(0,u.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,u.createElement)(g.__experimentalNumberControl,c({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return pb;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,_.__)("Line height"),placeholder:pb,step:db,value:a,min:0,spinControls:"custom"})))};const mb="typography.lineHeight";function yb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(fb,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Ro(t)})},size:"__unstable-large"})}function gb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("typography.lineHeight");return!(0,a.hasBlockSupport)(e,mb)||t}const hb="typography.__experimentalFontStyle",vb="typography.__experimentalFontWeight";function bb(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!_b(e),l=!kb(e),a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,u.createElement)(ub,{onChange:e=>{o({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:a,fontWeight:s},size:"__unstable-large"})}function _b(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,hb),n=yo("typography.fontStyle");return!t||!n}function kb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,vb),n=yo("typography.fontWeight");return!t||!n}function Eb(e){const t=_b(e),n=kb(e);return t&&n}function Sb(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=yo("typography.fontFamilies");if(r||(r=i),!r||0===r.length)return null;const l=[{value:"",label:(0,_.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,u.createElement)(g.SelectControl,c({label:(0,_.__)("Font"),options:l,value:t,onChange:n,labelPosition:"top"},o))}const wb="typography.__experimentalFontFamily";function Cb(e,t,n){if(!(0,a.hasBlockSupport)(t,wb))return e;if(Uo(t,p_,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(jy())(e.className);r.add(`has-${(0,y.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function Ib(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=yo("typography.fontFamilies"),i=null==o||null===(t=o.find((e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,u.createElement)(Sb,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=null==o?void 0:o.find((t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Ab(e){let{name:t}=e;const n=yo("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,wb)}(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,wb)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Cb),(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,wb))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Cb(r,e,n)},e}));const xb=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}};function Bb(e,t){const n=null==e?void 0:e.find((e=>{let{size:n}=e;return n===t}));return n||{size:t}}function Pb(e){if(e)return`has-${(0,y.kebabCase)(e)}-font-size`}var Tb=function(e){const t=yo("typography.fontSizes"),n=!yo("typography.customFontSize");return(0,u.createElement)(g.FontSizePicker,c({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Ob="1600px",Nb="768px",Mb=1,Rb=.75;function Fb(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Nb,maximumViewPortWidth:i=Ob,scaleFactor:l=Mb,minimumFontSizeFactor:a=Rb,minimumFontSizeLimit:s}=e;if(s=Lb(s)?s:"14px",r){const e=Lb(r);if(null==e||!e.unit)return null;const o=Lb(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Db(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Lb(t),u=(null==c?void 0:c.unit)||"rem",p=Lb(n,{coerceTo:u});if(!c||!p)return null;const d=Lb(t,{coerceTo:"rem"}),f=Lb(i,{coerceTo:u}),m=Lb(o,{coerceTo:u});if(!f||!m||!d)return null;const y=Db(m.value/100,3),g=Db(y,3)+u,h=Db(((p.value-c.value)/(f.value-m.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Lb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Db(u,3),unit:c}}function Db(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Ub="typography.fontSize";function jb(e,t,n){if(!(0,a.hasBlockSupport)(t,Ub))return e;if(Uo(t,p_,"fontSize"))return e;const r=new(jy())(e.className);r.add(Pb(n.fontSize));const o=r.value;return e.className=o||void 0,e}function zb(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=yo("typography.fontSizes"),a=xb(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),s=(null==a?void 0:a.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,u.createElement)(Tb,{onChange:e=>{const t=Bb(l,e).slug;i({style:Ro({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:s,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Vb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Ub)||!n}const Gb=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=yo("typography.fontSizes"),{name:i,attributes:{fontSize:l,style:s},wrapperProps:c}=t;if(!(0,a.hasBlockSupport)(i,Ub)||Uo(i,p_,"fontSize")||!l||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,u.createElement)(e,t);const p=xb(o,l,null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...c,style:{fontSize:p,...null==c?void 0:c.style}}};return(0,u.createElement)(e,d)}),"withFontSizeInlineStyles"),Hb={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,s.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Ub)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jb),(0,s.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Ub))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),jb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Gb),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const o=e.name;return Do({fontSize:(0,a.hasBlockSupport)(o,Ub)},Hb,e,t,n,r)})),(0,s.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,a.hasBlockSupport)(e,Ub)||Uo(e,p_,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=null===(r=(0,m.select)(xr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o?void 0:o.fluid,s="object"==typeof a?a:{},c=l&&a?Fb({fontSize:l,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?i:{...i,style:{...null==i?void 0:i.style,fontSize:c}}},e}),11);var Wb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 11.5h10V13H7z"}));var $b=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var Kb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 qb=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Underline"),value:"underline",icon:$b},{name:(0,_.__)("Strikethrough"),value:"line-through",icon:Kb}];function Jb(e){let{value:t,onChange:n,className:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-decoration-control",r)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Decoration")),(0,u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qb.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Yb="typography.__experimentalTextDecoration";function Qb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(Jb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Zb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Yb),n=yo("typography.textDecoration");return t||!n}var Xb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var e_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var t_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 n_=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Uppercase"),value:"uppercase",icon:Xb},{name:(0,_.__)("Lowercase"),value:"lowercase",icon:e_},{name:(0,_.__)("Capitalize"),value:"capitalize",icon:t_}];function r_(e){let{className:t,value:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-transform-control",t)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Letter case")),(0,u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n_.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const o_="typography.__experimentalTextTransform";function i_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(r_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function l_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,o_),n=yo("typography.textTransform");return t||!n}function a_(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,u.createElement)(g.__experimentalUnitControl,c({},o,{label:(0,_.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const s_="typography.__experimentalLetterSpacing";function c_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(a_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function u_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,s_),n=yo("typography.letterSpacing");return t||!n}const p_="typography",d_=[mb,Ub,hb,vb,wb,Yb,o_,s_];function f_(e){const{clientId:t}=e,n=Ab(e),r=Vb(e),o=Eb(e),i=gb(e),l=Zb(e),s=l_(e),c=u_(e),p=!_b(e),d=!kb(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Eb(e),Vb(e),gb(e),Ab(e),Zb(e),l_(e),u_(e)];return t.filter(Boolean).length===t.length}(e),m=m_(e.name);if(f||!m)return null;const y=(0,a.getBlockSupport)(e.name,[p_,"__experimentalDefaultControls"]),h=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,u.createElement)(Wo,{group:"typography"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,_.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==y?void 0:y.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,u.createElement)(Ib,e)),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,_.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Ro({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,u.createElement)(zb,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:cb(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,u.createElement)(bb,e)),!i&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,_.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.lineHeight,resetAllFilter:h("lineHeight"),panelId:t},(0,u.createElement)(yb,e)),!c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,_.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==y?void 0:y.letterSpacing,resetAllFilter:h("letterSpacing"),panelId:t},(0,u.createElement)(c_,e)),!l&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,_.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textDecoration,resetAllFilter:h("textDecoration"),panelId:t},(0,u.createElement)(Qb,e)),!s&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,_.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textTransform,resetAllFilter:h("textTransform"),panelId:t},(0,u.createElement)(i_,e)))}const m_=e=>d_.some((t=>(0,a.hasBlockSupport)(e,t)));const y_=[...d_,yv,$v,yi,gi],g_=e=>y_.some((t=>(0,a.hasBlockSupport)(e,t)));function h_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,nl.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const v_={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$v],[`${p_}.__experimentalSkipSerialization`]:[p_],[`${yi}.__experimentalSkipSerialization`]:[yi],[`${gi}.__experimentalSkipSerialization`]:[gi]},b_={...v_,[`${gi}`]:["spacing.blockGap"]},__={gradients:"gradient"};function k_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let r=e;return n||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;k_(r[t],[n],!0)}else 1===e.length&&delete r[e[0]]})),r}function E_(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b_;if(!g_(t))return e;let{style:o}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const i=(0,a.getBlockSupport)(t,n);!0===i&&(o=k_(o,r)),Array.isArray(i)&&i.forEach((e=>{const t=__[e]||e;o=k_(o,[[...r,t]])}))})),e.style={...h_(o),...e.style},e}const S_=(0,f.createHigherOrderComponent)((e=>t=>{const n=Mr();return(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ob,t),(0,u.createElement)(f_,t),(0,u.createElement)(kv,t),(0,u.createElement)(_i,t)),(0,u.createElement)(e,t))}),"withToolbarControls"),w_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=`wp-elements-${(0,f.useInstanceId)(e)}`,i=Uo(t.name,$v,"link"),l=(0,u.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:i||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,nl.compileCSS)(n,{selector:`.editor-styles-wrapper .${o} ${a.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),s=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,l&&s&&(0,u.createPortal)((0,u.createElement)("style",{dangerouslySetInnerHTML:{__html:l}}),s),(0,u.createElement)(e,c({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?d()(t.className,o):t.className})))}));(0,s.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return g_(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",E_),(0,s.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!g_(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),E_(r,e,n,v_)},e})),(0,s.addFilter)("editor.BlockEdit","core/style/with-block-controls",S_),(0,s.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",w_);(0,s.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var C_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var I_=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}=e;return t="unset"===l?(0,u.createElement)(g.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,u.createElement)(g.DuotoneSwatch,{values:l}):(0,u.createElement)(Xi,{icon:C_}),(0,u.createElement)(g.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_.__)("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,u.createElement)(g.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},label:(0,_.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Duotone")},(0,u.createElement)("div",{className:"block-editor-duotone-control__description"},(0,_.__)("Create a two-tone color effect without losing your original image.")),(0,u.createElement)(g.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}))})};const A_=[];function x_(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,u.createElement)(qd,{selector:t}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jd,{id:n,colors:r}),(0,u.createElement)(Kd,{id:n,selector:t}))}function B_(e){let{presetSetting:t,defaultSetting:n}=e;const r=!yo(n),o=yo(`${t}.custom`)||A_,i=yo(`${t}.theme`)||A_,l=yo(`${t}.default`)||A_;return(0,u.useMemo)((()=>[...o,...i,...r?A_:l]),[r,o,i,l])}function P_(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=B_({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=B_({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!yo("color.custom"),c=!yo("color.customDuotone")||0===(null==a?void 0:a.length)&&s;return 0===(null==l?void 0:l.length)&&c?null:(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(I_,{duotonePalette:l,colorPalette:a,disableCustomDuotone:c,disableCustomColors:s,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}hd([vd]);const T_=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&!r&&(0,u.createElement)(P_,t))}),"withDuotoneControls");const O_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o;const i=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),l=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!l)return(0,u.createElement)(e,t);const s=`wp-duotone-${(0,f.useInstanceId)(e)}`,p=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${s}`,i),m=d()(null==t?void 0:t.className,s),y=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,y&&(0,u.createPortal)((0,u.createElement)(x_,{selector:p,id:s,colors:l}),y),(0,u.createElement)(e,c({},t,{className:m})))}),"withDuotoneStyles");(0,s.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",T_),(0,s.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",O_);const N_="__experimentalLayout";function M_(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,m.useSelect)((e=>{var t;const{getSettings:n}=e(xr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),o=yo("layout")||{},{attributes:i={},name:l}=n,{layout:s}=i,{default:c}=(0,a.getBlockSupport)(l,N_)||{},u=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},p=[];var d,f;null!=o&&null!==(e=o.definitions)&&void 0!==e&&null!==(t=e[(null==u?void 0:u.type)||"default"])&&void 0!==t&&t.className&&p.push(null==o||null===(d=o.definitions)||void 0===d||null===(f=d[(null==u?void 0:u.type)||"default"])||void 0===f?void 0:f.className);return(null!=u&&u.inherit||null!=u&&u.contentSize||"constrained"===(null==u?void 0:u.type))&&r&&p.push("has-global-padding"),null!=u&&u.orientation&&p.push(`is-${(0,y.kebabCase)(u.orientation)}`),null!=u&&u.justifyContent&&p.push(`is-content-justification-${(0,y.kebabCase)(u.justifyContent)}`),null!=u&&u.flexWrap&&"nowrap"===u.flexWrap&&p.push("is-nowrap"),p}function R_(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=il((null==a?void 0:a.type)||"default"),c=yo("layout")||{},u=yo("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function F_(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=yo("layout"),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().supportsLayout}),[]),s=(0,a.getBlockSupport)(r,N_,{}),{allowSwitching:c,allowEditing:p=!0,allowInheriting:d=!0,default:f}=s;if(!p)return null;const y=!(!d||!i||null!=o&&o.type&&"default"!==(null==o?void 0:o.type)&&"constrained"!==(null==o?void 0:o.type)&&(null==o||!o.inherit)),h=o||f||{},{inherit:v=!1,type:b="default",contentSize:k=null}=h;if(("default"===b||"constrained"===b)&&!l)return null;const E=il(b),S=il("constrained"),w=!h.type&&(k||v),C=!!v||!!k,I=e=>t({layout:e});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Layout")},y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,_.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||C,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||C?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||C?(0,_.__)("Nested blocks use content width with options for full and wide widths."):(0,_.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&c&&(0,u.createElement)(L_,{type:b,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,u.createElement)(E.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}),S&&w&&(0,u.createElement)(S.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}))),!v&&E&&(0,u.createElement)(E.toolBarControls,{layout:h,onChange:I,layoutBlockSupport:s}))}function L_(e){let{type:t,onChange:n}=e;return(0,u.createElement)(g.ButtonGroup,null,ol.map((e=>{let{name:r,label:o}=e;return(0,u.createElement)(g.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const D_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,N_)&&(0,u.createElement)(F_,c({key:"layout"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),U_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:o}=t,i=(0,a.hasBlockSupport)(n,N_),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=i&&!l,p=(0,f.useInstanceId)(e),y=yo("layout")||{},g=(0,u.useContext)(Jh.__unstableElementContext),{layout:h}=r,{default:v}=(0,a.getBlockSupport)(n,N_)||{},b=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||v||{},_=i?M_(o):null,k=`.wp-container-${p}.wp-container-${p}`,E=null!==yo("spacing.blockGap");let S;if(s){var w;const e=il((null==b?void 0:b.type)||"default");S=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:b,layoutDefinitions:null==y?void 0:y.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:E})}const C=d()({[`wp-container-${p}`]:s&&!!S},_);return(0,u.createElement)(u.Fragment,null,s&&g&&!!S&&(0,u.createPortal)((0,u.createElement)(ul,{blockName:n,selector:k,css:S,layout:b,style:null==r?void 0:r.style}),g),(0,u.createElement)(e,c({},t,{__unstableLayoutClassNames:C})))})),j_=(0,f.createHigherOrderComponent)((e=>t=>{const{attributes:n}=t,{style:{layout:r={}}={}}=n,{selfStretch:o,flexSize:i}=r,l=o||i,a=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=l&&!a,p=(0,u.useContext)(Jh.__unstableElementContext),y=(0,f.useInstanceId)(e),g=`.wp-container-content-${y}`;let h="";"fixed"===o&&i?h+=`${g} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o&&(h+=`${g} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const v=d()(null==t?void 0:t.className,{[`wp-container-content-${y}`]:s&&!!h});return(0,u.createElement)(u.Fragment,null,s&&p&&!!h&&(0,u.createPortal)((0,u.createElement)("style",null,h),p),(0,u.createElement)(e,c({},t,{className:v})))}));function z_(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(xr);return n(t)||r(t,!0)}),[t]);return(0,u.useEffect)((()=>{r||n()}),[r]),null}(0,s.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,N_)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",U_),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",j_),(0,s.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",D_);const V_=(0,f.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,m.useSelect)(xr),o=(0,u.useRef)(),{templateLock:i,isLockedByParent:l,isEditingAsBlocks:a}=(0,m.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:p,__unstableSetTemporarilyEditingAsBlocks:f}=(0,m.useDispatch)(xr),y=!l&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:h,updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=(0,u.useCallback)((()=>{h(),v(t.clientId,{templateLock:"contentOnly"}),p(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:o.current}),f()}),[t.clientId,o,s,p,n,h,v,f]);return y||a?(0,u.createElement)(u.Fragment,null,a&&!y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(z_,{clientId:t.clientId,stopEditingAsBlock:b}),(0,u.createElement)(Ur,{group:"other"},(0,u.createElement)(g.ToolbarButton,{onClick:()=>{b()}},(0,_.__)("Done")))),!a&&y&&t.isSelected&&(0,u.createElement)(zg,null,(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuItem,{onClick:()=>{h(),v(t.clientId,{templateLock:void 0}),p(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,s({focusMode:!0}),f(t.clientId),i()}},(0,_.__)("Modify"))})),(0,u.createElement)(e,c({},t,{className:d()(t.className,a&&"is-content-locked-editing-as-blocks")}))):(0,u.createElement)(e,t)}),"withToolbarControls");(0,s.addFilter)("editor.BlockEdit","core/content-lock-ui/with-block-controls",V_);const G_="metadata";function H_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=(0,a.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function W_(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Cv(e)||void 0,style:h_({border:n})}}function $_(e){const{colors:t}=mv(),n=W_(e),{borderColor:r}=e;if(r){const e=bv({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function K_(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:c,style:u}=e,p=fv("background-color",a),f=fv("color",s),m=Av(c),y=m||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:d()(f,m,{[p]:!y&&!!p,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":a||(null==u||null===(r=u.color)||void 0===r?void 0:r.background)||c||(null==u||null===(o=u.color)||void 0===o?void 0:o.gradient),"has-link-color":null==u||null===(i=u.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:h_({color:(null==u?void 0:u.color)||{}})}}(0,s.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||H_(e,"name")&&(e.attributes={...e.attributes,[G_]:{type:"object"}}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return H_(t)&&(e.metadata=n.metadata),e})),(0,s.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||H_(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const q_={};function J_(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=yo("color.palette.custom"),i=yo("color.palette.theme"),l=yo("color.palette.default"),a=yo("color.gradients")||q_,s=(0,u.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),c=(0,u.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),p=K_(e);if(t){const e=pv(s,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=xv(c,r)),n){const e=pv(s,n);p.style.color=e.color}return p}function Y_(e){const{style:t}=e;return{style:h_({spacing:(null==t?void 0:t.spacing)||{}})}}function Q_(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};if(t&&(!0===t||0!==Object.keys(t).length)){var o,i,l,a;const n=Fb({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize,minimumFontSizeLimit:null==t?void 0:t.minFontSize})||(null==e||null===(l=e.style)||void 0===l||null===(a=l.typography)||void 0===a?void 0:a.fontSize);r={...r,fontSize:n}}const s=h_({typography:r}),c=null!=e&&e.fontFamily?`has-${(0,y.kebabCase)(e.fontFamily)}-font-family`:"";return{className:d()(c,Pb(null==e?void 0:e.fontSize)),style:s}}function Z_(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}const X_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},ek=e=>(0,f.createHigherOrderComponent)((t=>n=>(0,u.createElement)(t,c({},n,{colors:e}))),"withCustomColorPalette"),tk=()=>(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette.custom"),r=yo("color.palette.theme"),o=yo("color.palette.default"),i=(0,u.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,u.createElement)(e,c({},t,{colors:i}))}),"withEditorColorPalette");function nk(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,y.kebabCase)(t)}:t})),{});return(0,f.compose)([t,e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=yd(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=X_(t),r=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,r),e}),{})}createSetColor(e,t){return n=>{const r=dv(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return Object.entries(n).reduce(((e,n)=>{let[i,l]=n;const a=pv(o,r[i],r[`custom${X_(i)}`]),s=t[i];return(null==s?void 0:s.color)===a.color&&s?e[i]=s:e[i]={...a,class:fv(l,a.slug)},e}),{})}render(){return(0,u.createElement)(e,c({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function rk(e){return function(){const t=ek(e);for(var n=arguments.length,r=new Array(n),o=0;o{let[t,...n]=e;return t.toUpperCase()+n.join("")};var ak=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${lk(t)}`,e)),{});return(0,f.createHigherOrderComponent)((0,f.compose)([(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("typography.fontSizes")||ik;return(0,u.createElement)(e,c({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(r).reduce(((e,t)=>{let[n,r]=t;return e[`set${lk(n)}`]=this.createSetFontSize(n,r),e}),{})}createSetFontSize(e,t){return n=>{var r;const o=null===(r=this.props.fontSizes)||void 0===r?void 0:r.find((e=>{let{size:t}=e;return t===Number(n)}));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!Object.values(r).some(i))return null;const l=Object.entries(r).filter((e=>{let[t,n]=e;return i(n,t)})).reduce(((e,t)=>{let[r,i]=t;const l=n[r],a=xb(o,l,n[i]);return e[r]={...a,class:Pb(l)},e}),{});return{...t,...l}}render(){return(0,u.createElement)(e,c({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var sk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var ck=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var uk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const pk=[{icon:sk,title:(0,_.__)("Align text left"),align:"left"},{icon:ck,title:(0,_.__)("Align text center"),align:"center"},{icon:uk,title:(0,_.__)("Align text right"),align:"right"}],dk={position:"bottom right",variant:"toolbar"};var fk=function(e){let{value:t,onChange:n,alignmentControls:r=pk,label:o=(0,_.__)("Align text"),describedBy:i=(0,_.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:a}=e;function s(e){return()=>n(t===e?void 0:e)}const p=r.find((e=>e.align===t)),d=a?g.ToolbarGroup:g.ToolbarDropdownMenu,f=a?{isCollapsed:l}:{toggleProps:{describedBy:i},popoverProps:dk};return(0,u.createElement)(d,c({icon:p?p.icon:(0,_.isRTL)()?uk:sk,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:l?"menuitemradio":void 0,onClick:s(n)}}))},f))};const mk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!1})),yk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!0})),gk=()=>{};var hk={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(xr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=yf(t,gk),l=(0,u.useMemo)((()=>(e.trim()?Kf(r,o,i,e):J(r,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),a=(0,u.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[a]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(r))}}},vk=window.wp.apiFetch,bk=n.n(vk);var _k=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var kk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var Ek={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await bk()({path:(0,sm.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{key:"icon",icon:"page"===e.subtype?_k:kk}),e.title)},getOptionCompletion(e){return(0,u.createElement)("a",{href:e.url},e.title)}};const Sk=[];function wk(e){let{completers:t=Sk}=e;const{name:n}=Nr();return(0,u.useMemo)((()=>{let e=[...t,Ek];return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,hk]),(0,s.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=(0,s.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Ck=function(e){return(0,u.createElement)(g.Autocomplete,c({},e,{completers:wk(e)}))};var Ik=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var Ak=function(e){let{isActive:t,label:n=(0,_.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,u.createElement)(g.ToolbarButton,{isActive:t,icon:Ik,label:n,onClick:()=>r(!t),disabled:o})};const xk=()=>{};var Bk=function(e){const{label:t=(0,_.__)("Change matrix alignment"),onChange:n=xk,value:r="center",isDisabled:o}=e,i=(0,u.createElement)(g.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,u.createElement)(g.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==Xu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,u.createElement)(g.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Pk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Tk=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clientId:o,parents:i,hasSelection:l}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(xr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),a=t||(0,_.__)("Document");return(0,u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,_.__)("Block breadcrumb")},(0,u.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},a),!l&&a,!!o&&(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,u.createElement)("li",{key:e},(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,u.createElement)(uy,{clientId:e,maximumLength:35})),(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,u.createElement)(uy,{clientId:o,maximumLength:35})))};const Ok=()=>(0,u.createElement)(g.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,u.createElement)(g.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"})),Nk=e=>{let{style:t,className:n}=e;return(0,u.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,u.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,u.createElement)(Ok,null)))},Mk=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,_.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},icon:(0,u.createElement)(n,null,(0,u.createElement)(t,null,(0,u.createElement)(Nk,null)))}))}};var Rk=e=>{let{children:t,...n}=e;return $()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,u.createElement)(g.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Mk(n),renderContent:()=>t})};var Fk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Lk=Fu(g.__experimentalTreeGridRow);var Dk=(0,u.forwardRef)(((e,t)=>{let{isSelected:n,position:r,level:o,rowCount:i,children:l,className:a,path:s,...p}=e;const m=Uu({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s}),y=(0,f.useMergeRefs)([t,m]);return(0,u.createElement)(Lk,c({ref:y,className:d()("block-editor-list-view-leaf",a),level:o,positionInSet:r,setSize:i},p),l)}));var Uk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"}));var jk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function zk(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var Vk=(0,u.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const f=sy(r),m=cy({clientId:r,context:"list-view"}),{isLocked:y}=Pg(r);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${r}`,"aria-hidden":!0},(0,u.createElement)(zk,{onClick:i}),(0,u.createElement)(hp,{icon:null==f?void 0:f.icon,showColors:!0}),(0,u.createElement)(g.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(g.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==f?void 0:f.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},f.anchor)),y&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))}));const Gk=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:v}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(xr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),b=h&&v===g,_=d()("block-editor-list-view-block-contents",{"is-dropping-before":b}),k=f.includes(g)?f:[g];return(0,u.createElement)(py,{clientIds:k},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(Vk,c({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))}))}));var Hk=Gk;const Wk=(0,u.createContext)({}),$k=()=>(0,u.useContext)(Wk);var Kk=(0,u.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E,isSyncedBranch:S}=t;const w=(0,u.useRef)(null),C=(0,u.useRef)(null),[I,A]=(0,u.useState)(!1),{clientId:x}=n,{isLocked:B,isContentLocked:P,canEdit:T}=Pg(x),O=(0,m.useSelect)((e=>!o&&(!!P&&e(xr).hasSelectedInnerBlock(x,!0))),[P,x,o]),N=!P&&T,M=O||o&&k[0]===x,R=O||o&&k[k.length-1]===x,{toggleBlockHighlight:F}=(0,m.useDispatch)(xr),L=sy(x),D=(0,m.useSelect)((e=>e(xr).getBlockName(x)),[x]),U=(0,a.hasBlockSupport)(D,"__experimentalToolbar",!0),j=`list-view-block-select-button__${(0,f.useInstanceId)(e)}`,z=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let V=(0,_.__)("Link");L&&(V=B?(0,_.sprintf)((0,_.__)("%s link (locked)"),L.title):(0,_.sprintf)((0,_.__)("%s link"),L.title));const G=L?(0,_.sprintf)((0,_.__)("Options for %s block"),L.title):(0,_.__)("Options"),{isTreeGridMounted:H,expand:W,collapse:$}=$k(),K=h&&y>0,q=d()("block-editor-list-view-block__mover-cell",{"is-visible":I||o}),J=d()("block-editor-list-view-block__menu-cell",{"is-visible":I||M});(0,u.useEffect)((()=>{!H&&o&&w.current.focus()}),[]);const Y=(0,u.useCallback)((()=>{A(!0),F(x,!0)}),[x,A,F]),Q=(0,u.useCallback)((()=>{A(!1),F(x,!1)}),[x,A,F]),Z=(0,u.useCallback)((e=>{l(e,x),e.preventDefault()}),[x,l]),X=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),ee=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?$(x):!1===b&&W(x)}),[x,W,$,b]);let te;K?te=2:U||(te=3);const ne=d()({"is-selected":o||O,"is-first-selected":M,"is-last-selected":R,"is-branch-selected":i,"is-synced-branch":S,"is-dragging":r,"has-single-cell":!U,"is-synced":null==L?void 0:L.isSynced}),re=k.includes(x)?k:[x];return function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:r}=e;const o=1===n.length;(0,u.useLayoutEffect)((()=>{if(!t||!o||!r.current)return;const e=(0,Ml.getScrollContainer)(r.current),{ownerDocument:n}=r.current;if(e===n.body||e===n.documentElement||!e)return;const i=r.current.getBoundingClientRect(),l=e.getBoundingClientRect();(i.topl.bottom)&&r.current.scrollIntoView()}),[t,o,r])}({isSelected:o,rowItemRef:C,selectedClientIds:k}),(0,u.createElement)(Dk,{className:ne,onMouseEnter:Y,onMouseLeave:Q,onFocus:Y,onBlur:Q,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${x}`,"data-block":x,isExpanded:N?b:void 0,"aria-selected":!!o||O,ref:C},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:te,ref:w,"aria-label":V,"aria-selected":!!o||O,"aria-expanded":N?b:void 0,"aria-describedby":j},(e=>{let{ref:t,tabIndex:r,onFocus:i}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(Hk,{block:n,onClick:Z,onToggleExpanded:ee,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:r,onFocus:i,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},z))})),K&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:q,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})))),U&&(0,u.createElement)(g.__experimentalTreeGridCell,{className:J,"aria-selected":!!o||O},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(Wg,{clientIds:re,icon:dm,label:G,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:X})})))}));function qk(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Jk(t,n,r),0):1}const Jk=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+qk(o,e,t,n):r+1},Yk=()=>{};var Qk=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=Yk,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:p,isExpanded:d,parentId:f,shouldShowInnerBlocks:y=!0,isSyncedBranch:g=!1}=t,h=sy(f),v=g||!(null==h||!h.isSynced),b=(0,m.useSelect)((e=>{if(!f)return!0;const t="contentOnly"===e(xr).getTemplateLock(f),n=e(xr).canEditBlock(f);return!t&&n}),[f]),{expandedState:_,draggedClientIds:k}=$k();if(!b)return null;const E=n.filter(Boolean),S=E.length;let w=c;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:f,innerBlocks:g}=t;n>0&&(w+=qk(E[n-1],_,k,d));const{itemInView:h}=p,b=h(w),C=n+1,I=a.length>0?`${a}_${C}`:`${C}`,A=!(null==g||!g.length),x=A&&y?null!==(c=_[f])&&void 0!==c?c:d:void 0,B=!(null==k||!k.includes(f)),P=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,i),T=s||P&&A,O=B||b||P;return(0,u.createElement)(m.AsyncModeProvider,{key:f,value:!P},O&&(0,u.createElement)(Kk,{block:t,selectBlock:r,isSelected:P,isBranchSelected:T,isDragged:B,level:l,position:C,rowCount:S,siblingBlockCount:S,showBlockMovers:o,path:I,isExpanded:x,listPosition:w,selectedClientIds:i,isSyncedBranch:v}),!O&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&x&&!B&&(0,u.createElement)(e,{parentId:f,blocks:g,selectBlock:r,showBlockMovers:o,level:l+1,path:I,listPosition:w+1,fixedListWindow:p,isBranchSelected:T,selectedClientIds:i,isExpanded:d,isSyncedBranch:v}))})))}));function Zk(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function Xk(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const eE=["top","bottom"];function tE(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,eE),u=Fh(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const nE=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var rE=(0,u.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:a,selectedClientIds:s}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:c,shouldShowInnerBlocks:p}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==a?void 0:a.length)>0?n(a).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[a]),{updateBlockSelection:d}=Xk(),[y,h]=(0,u.useReducer)(nE,{}),{ref:v,target:b}=tE(),k=(0,u.useRef)(),E=(0,f.useMergeRefs)([k,v,t]),S=(0,u.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:s[0],setExpandedState:h}),C=(0,u.useCallback)(((e,t)=>{d(e,t),w(t)}),[w,d]);(0,u.useEffect)((()=>{S.current=!0}),[]);const[I]=(0,f.__experimentalUseFixedWindowList)(k,36,c,{useWindowing:!0,windowOverscan:40}),A=(0,u.useCallback)((e=>{e&&h({type:"expand",clientIds:[e]})}),[h]),x=(0,u.useCallback)((e=>{e&&h({type:"collapse",clientIds:[e]})}),[h]),B=(0,u.useCallback)((e=>{var t;A(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[A]),P=(0,u.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&d(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[d]),O=(0,u.useMemo)((()=>({isTreeGridMounted:S.current,draggedClientIds:a,expandedState:y,expand:A,collapse:x})),[S.current,a,y,A,x]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(Zk,{listViewRef:k,blockDropTarget:b}),(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:E,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,_.__)("Block navigation structure")},(0,u.createElement)(Wk.Provider,{value:O},(0,u.createElement)(Qk,{blocks:l,selectBlock:C,showBlockMovers:o,fixedListWindow:I,selectedClientIds:s,isExpanded:i,shouldShowInnerBlocks:p}))))}));function oE(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,u.createElement)(g.Button,c({},i,{ref:o,icon:Fk,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,_.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var iE=(0,u.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;$()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,m.useSelect)((e=>!!e(xr).getBlockCount()),[])&&!n;return(0,u.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,u.createElement)(oE,c({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,u.createElement)("div",{className:"block-editor-block-navigation__container"},(0,u.createElement)("p",{className:"block-editor-block-navigation__label"},(0,_.__)("List view")),(0,u.createElement)(rE,null))})}));function lE(e){var t;let{genericPreviewBlock:n,style:r,className:o,activeStyle:i}=e;const l=null===(t=(0,a.getBlockType)(n.name))||void 0===t?void 0:t.example,s=zy(o,i,r),c=(0,u.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:s+" block-editor-block-styles__block-preview-container"},example:l})),[n,s]);return(0,u.createElement)(rf,{item:c,isStylePreview:!0})}const aE=()=>{};function sE(e){let{clientId:t,onSwitch:n=aE,onHoverClassName:r=aE}=e;const{onSelect:o,stylesToRender:i,activeStyle:l,genericPreviewBlock:a,className:s}=Gy({clientId:t,onSwitch:n}),[c,p]=(0,u.useState)(null),m=(0,f.useViewportMatch)("medium","<");if(!i||0===i.length)return null;const y=(0,f.debounce)(p,250),h=e=>{var t;c!==e?(y(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):y.cancel()};return(0,u.createElement)("div",{className:"block-editor-block-styles"},(0,u.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.isDefault?(0,_.__)("Default"):e.label||e.name;return(0,u.createElement)(g.Button,{className:d()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>h(e),onFocus:()=>h(e),onMouseLeave:()=>h(null),onBlur:()=>h(null),onClick:()=>(e=>{o(e),r(null),p(null),y.cancel()})(e),"aria-current":l.name===e.name},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,u.createElement)(g.Popover,{placement:"left-start",offset:20},(0,u.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>h(null)},(0,u.createElement)(lE,{activeStyle:l,className:s,genericPreviewBlock:a,style:c}))))}var cE=sE;sE.Slot=()=>($()("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);var uE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var pE=function(e){let{icon:t=uE,label:n=(0,_.__)("Choose variation"),instructions:r=(0,_.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const a=d()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,u.createElement)(g.Placeholder,{icon:t,label:n,instructions:r,className:a},(0,u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_.__)("Block variations")},o.map((e=>(0,u.createElement)("li",{key:e.name},(0,u.createElement)(g.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,u.createElement)(g.Button,{variant:"link",onClick:()=>i()},(0,_.__)("Skip"))))};var dE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 fE={carousel:"carousel",grid:"grid"},mE=e=>{let{onBlockPatternSelect:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,u.createElement)(g.Button,{variant:"primary",onClick:t},(0,_.__)("Choose")))},yE=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,u.createElement)(g.Button,{icon:yp,label:(0,_.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,u.createElement)(g.Button,{icon:mp,label:(0,_.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var gE=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:a}=e;const s=t===fE.carousel,c=(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,u.createElement)(g.Button,{icon:vl,label:(0,_.__)("Carousel view"),onClick:()=>n(fE.carousel),isPressed:s}),(0,u.createElement)(g.Button,{icon:dE,label:(0,_.__)("Grid view"),onClick:()=>n(fE.grid),isPressed:t===fE.grid}));return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&(0,u.createElement)(yE,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),c,s&&(0,u.createElement)(mE,{onBlockPatternSelect:a}))};var hE=function(e,t,n){return(0,m.useSelect)((r=>{const{getBlockRootClientId:o,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(xr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const vE=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,showTitles:i}=e;const l=(0,g.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===fE.carousel){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,u.createElement)("div",{className:a},(0,u.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,u.createElement)(_E,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,u.createElement)(g.__unstableComposite,c({},l,{role:"listbox",className:a,"aria-label":(0,_.__)("Patterns list")}),r.map((e=>(0,u.createElement)(bE,{key:e.name,pattern:e,onSelect:o,composite:l,showTitles:i})))))};function bE(e){let{pattern:t,onSelect:n,composite:r,showTitles:o}=e;const i="block-editor-block-pattern-setup-list",{blocks:l,description:a,viewportWidth:s=700}=t,p=(0,f.useInstanceId)(bE,`${i}__item-description`);return(0,u.createElement)("div",{className:`${i}__list-item`,"aria-label":t.title,"aria-describedby":t.description?p:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${i}__item`,onClick:()=>n(l)}),(0,u.createElement)(tf,{blocks:l,viewportWidth:s}),o&&(0,u.createElement)("div",{className:`${i}__item-title`},t.title),!!a&&(0,u.createElement)(g.VisuallyHidden,{id:p},a)))}function _E(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,a=(0,f.useInstanceId)(_E,"block-editor-block-pattern-setup-list__item-description");return(0,u.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?a:void 0},(0,u.createElement)(tf,{blocks:o,minHeight:r}),!!l&&(0,u.createElement)(g.VisuallyHidden,{id:a},l))}var kE=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:o,initialViewMode:i=fE.carousel,showTitles:l=!1}=e;const[s,c]=(0,u.useState)(i),[p,d]=(0,u.useState)(0),{replaceBlock:f}=(0,m.useDispatch)(xr),y=hE(t,n,r);if(null==y||!y.length)return null;const g=o||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));f(t,n)});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,u.createElement)(vE,{viewMode:s,activeSlide:p,patterns:y,onBlockPatternSelect:g,showTitles:l}),(0,u.createElement)(gE,{viewMode:s,setViewMode:c,activeSlide:p,totalSlides:y.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{g(y[p].blocks)}})))};function EE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,u.createElement)("fieldset",{className:t},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Transform to variation")),o.map((e=>(0,u.createElement)(g.Button,{key:e.name,icon:(0,u.createElement)(hp,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,_.sprintf)((0,_.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function SE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,u.createElement)(g.DropdownMenu,{className:t,label:(0,_.__)("Transform to variation"),text:(0,_.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:fy,toggleProps:{iconPosition:"right"}},(()=>(0,u.createElement)("div",{className:`${t}__container`},(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var wE=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,m.useDispatch)(xr),{activeBlockVariation:r,variations:o}=(0,m.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(a.store),{getBlockName:o,getBlockAttributes:i}=e(xr),l=t&&o(t);return{activeBlockVariation:n(l,i(t)),variations:l&&r(l,"transform")}}),[t]),i=null==r?void 0:r.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===o.length)}),[o]);if(null==o||!o.length)return null;const s=l?EE:SE;return(0,u.createElement)(s,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...o.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:o})},CE=(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette"),r=!yo("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,l=!(0,y.isEmpty)(o)||!i;return(0,u.createElement)(e,c({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:l}))}),"withColorContext"),IE=CE(g.ColorPalette);function AE(e){let{onChange:t,value:n,...r}=e;return(0,u.createElement)(Dv,c({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var xE=window.wp.date;const BE=new Date(2022,0,25);function PE(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Date format")),(0,u.createElement)(g.ToggleControl,{label:(0,u.createElement)(u.Fragment,null,(0,_.__)("Default format"),(0,u.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,xE.dateI18n)(n,BE))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,u.createElement)(TE,{format:t,onChange:r}))}function TE(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,_._x)("n/j/Y","short date format"),(0,_._x)("n/j/Y g:i A","short date format with time"),(0,_._x)("M j, Y","medium date format"),(0,_._x)("M j, Y g:i A","medium date format with time"),(0,_._x)("F j, Y","long date format"),(0,_._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,xE.dateI18n)(e,BE),format:e}))),l={key:"custom",name:(0,_.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,_.__)("Enter your own date format")},[a,s]=(0,u.useState)((()=>!!n&&!o.includes(n)));return(0,u.createElement)(g.__experimentalVStack,null,(0,u.createElement)(g.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,_.__)("Choose a format"),options:[...i,l],value:a?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?s(!0):(s(!1),r(t.format))}}),a&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,_.__)("Enter a date or time format string."),{Link:(0,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const OE=["colors","disableCustomColors","gradients","disableCustomGradients"],NE=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:a,title:s,showTitle:c=!0,__experimentalIsRenderedInSidebar:p,enableAlpha:h}=e;const v=(0,f.useInstanceId)(NE),{batch:b}=(0,m.useRegistry)();return(0,y.isEmpty)(n)&&(0,y.isEmpty)(r)&&o&&i&&null!=a&&a.every((e=>(0,y.isEmpty)(e.colors)&&(0,y.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,u.createElement)(g.__experimentalToolsPanel,{className:d()("block-editor-panel-color-gradient-settings",t),label:c?s:void 0,resetAll:()=>{b((()=>{a.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,u.createElement)(Vv,{settings:a,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalIsRenderedInSidebar:p,enableAlpha:h}),!!l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalSpacer,{marginY:4})," ",l))},ME=e=>{const t=mv();return(0,u.createElement)(NE,c({},t,e))};var RE=e=>OE.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(NE,e):(0,u.createElement)(ME,e);const FE=(0,u.createContext)({}),LE=()=>(0,u.useContext)(FE);function DE(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,onFinishEditing:i,onSaveImage:l,children:a}=e;const c=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,i]=(0,u.useState)(),[l,a]=(0,u.useState)(),[c,p]=(0,u.useState)({x:0,y:0}),[d,f]=(0,u.useState)(100),[m,y]=(0,u.useState)(0),g=n/r,[h,v]=(0,u.useState)(g),b=(0,u.useCallback)((()=>{const e=(m+90)%360;let n=g;if(m%180==90&&(n=1/g),0===e)return i(),y(e),v(g),void p({x:-c.y*n,y:c.x*n});const r=new window.Image;r.src=t,r.onload=function(t){const r=document.createElement("canvas");let o=0,l=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(o=r.width),270!==e&&180!==e||(l=r.height);const a=r.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((t=>{i(URL.createObjectURL(t)),y(e),v(r.width/r.height),p({x:-c.y*n,y:c.x*n})}))};const o=(0,s.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof o&&(r.crossOrigin=o)}),[m,g]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:i,crop:l,setCrop:a,position:c,setPosition:p,zoom:d,setZoom:f,rotation:m,setRotation:y,rotateClockwise:b,aspect:h,setAspect:v,defaultAspect:g})),[o,l,c,d,m,b,h,g])}({url:n,naturalWidth:r,naturalHeight:o}),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:a,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:p}=(0,m.useDispatch)(bf.store),[d,f]=(0,u.useState)(!1),y=(0,u.useCallback)((()=>{f(!1),c()}),[f,c]),g=(0,u.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,bk()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,_.sprintf)((0,_.__)("Could not edit image. %s"),(0,Ml.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),c()}))}),[f,t,n,r,o,i,l,s,p,f,c]);return(0,u.useMemo)((()=>({isInProgress:d,apply:g,cancel:y})),[d,g,y])}({id:t,url:n,onSaveImage:l,onFinishEditing:i,...c}),d=(0,u.useMemo)((()=>({...c,...p})),[c,p]);return(0,u.createElement)(FE.Provider,{value:d},a)} +*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var v,b=m.size["$"+n];if(!b)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");v=a(new l(e,t),0,b);var _=arguments.length>5?arguments[5]:"little"===y,k=_?a(f([0,0,0,0,0,0,0,0],v),-b):a(f(v,[0,0,0,0,0,0,0,0]),0,b);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(5604),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(5604);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),m=n(3647),y=n(7511),g=n(1520),h=n(806),v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},b={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(v,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(v));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return m(t,n);if("FLOAT64"===e)return y(t,n);var i=v[e],l=(0,b[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),m=n(7604),y=n(2367),g=n(8172),h=n(1824),v=o("Array.prototype.reverse"),b=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=b(t,0,r),n||v(t),"FLOAT32"===e?f(t):"FLOAT64"===e?m(t):y(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(5604),f=n(9429),m=n(2170),y=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,v){var b=d(e);if(!p(e)&&!b)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(m.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==v&&"UNORDERED"!==v&&"INIT"!==v)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=m.size["$"+n],k=arguments.length>6?arguments[6]:"little"===y,E=u(n,r,k);if(b)throw new o("SharedArrayBuffer is not supported by this implementation");var S=new l(e,t,_);g(E,(function(e,t){S[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),m=c(new i("["+["…","​","￾"].join("")+"]","g")),y=n(4113);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(m(t)||f(t))return NaN;var n=y(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return na+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,m=255&(d>>=8),y=255&(d>>=8),g=255&(d>>=8);return t?[f,m,y,g]:[g,y,m,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,m="11111111111",y="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=m,r="1"+g;else if(isFinite(e))if(0===e)n=y,r="0"+g;else{e=i(e);var h,v=l(e),b=p(v),_=u(e-v);if(b)n=b.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=b+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(y+p(n+f),-11),r=c(r+g+"0",0,52)}else n=m,r="0"+g;for(var E=a+n+r,S=[],w=0;w<8;w++){S[t?8-w-1:w]=o(c(E,8*w,8*(w+1)),2)}return S}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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 r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return mk},AlignmentToolbar:function(){return yk},Autocomplete:function(){return Ck},BlockAlignmentControl:function(){return El},BlockAlignmentToolbar:function(){return Sl},BlockBreadcrumb:function(){return Tk},BlockColorsStyleSelector:function(){return Rk},BlockContextProvider:function(){return Fl},BlockControls:function(){return Ur},BlockEdit:function(){return jl},BlockEditorKeyboardShortcuts:function(){return rI},BlockEditorProvider:function(){return Sp},BlockFormatControls:function(){return Dr},BlockIcon:function(){return hp},BlockInspector:function(){return YC},BlockList:function(){return Jh},BlockMover:function(){return ky},BlockNavigationDropdown:function(){return iE},BlockPreview:function(){return tf},BlockSelectionClearer:function(){return Cp},BlockSettingsMenu:function(){return $g},BlockSettingsMenuControls:function(){return zg},BlockStyles:function(){return cE},BlockTitle:function(){return uy},BlockToolbar:function(){return th},BlockTools:function(){return XC},BlockVerticalAlignmentControl:function(){return Li},BlockVerticalAlignmentToolbar:function(){return Di},ButtonBlockAppender:function(){return Jm},ButtonBlockerAppender:function(){return qm},ColorPalette:function(){return IE},ColorPaletteControl:function(){return AE},ContrastChecker:function(){return Gv},CopyHandler:function(){return sg},DefaultBlockAppender:function(){return $m},FontSizePicker:function(){return Tb},HeightControl:function(){return ni},InnerBlocks:function(){return Hh},Inserter:function(){return Wm},InspectorAdvancedControls:function(){return Ho},InspectorControls:function(){return Wo},JustifyContentControl:function(){return zi},JustifyToolbar:function(){return Vi},LineHeightControl:function(){return fb},MediaPlaceholder:function(){return bw},MediaReplaceFlow:function(){return dw},MediaUpload:function(){return Am},MediaUploadCheck:function(){return Im},MultiSelectScrollIntoView:function(){return oI},NavigableToolbar:function(){return Cy},ObserveTyping:function(){return sI},PanelColorSettings:function(){return _w},PlainText:function(){return eC},RichText:function(){return Qw},RichTextShortcut:function(){return rC},RichTextToolbarButton:function(){return oC},SETTINGS_DEFAULTS:function(){return E},SkipToSelectedBlock:function(){return EC},ToolSelector:function(){return aC},Typewriter:function(){return dI},URLInput:function(){return CS},URLInputButton:function(){return pC},URLPopover:function(){return gw},Warning:function(){return Vl},WritingFlow:function(){return Up},__experimentalBlockAlignmentMatrixControl:function(){return Bk},__experimentalBlockFullHeightAligmentControl:function(){return Ak},__experimentalBlockPatternSetup:function(){return kE},__experimentalBlockPatternsList:function(){return wf},__experimentalBlockVariationPicker:function(){return pE},__experimentalBlockVariationTransforms:function(){return wE},__experimentalBorderRadiusControl:function(){return cv},__experimentalColorGradientControl:function(){return Dv},__experimentalColorGradientSettingsDropdown:function(){return Vv},__experimentalDateFormatPicker:function(){return PE},__experimentalDuotoneControl:function(){return I_},__experimentalFontAppearanceControl:function(){return ub},__experimentalFontFamilyControl:function(){return Sb},__experimentalGetBorderClassesAndStyles:function(){return W_},__experimentalGetColorClassesAndStyles:function(){return K_},__experimentalGetElementClassName:function(){return _I},__experimentalGetGapCSSValue:function(){return Ii},__experimentalGetGradientClass:function(){return Av},__experimentalGetGradientObjectByGradientValue:function(){return Bv},__experimentalGetMatchingVariation:function(){return EI},__experimentalGetSpacingClassesAndStyles:function(){return Y_},__experimentalImageEditor:function(){return mS},__experimentalImageSizeControl:function(){return hS},__experimentalImageURLInputUI:function(){return bC},__experimentalInspectorPopoverHeader:function(){return hI},__experimentalLayoutStyle:function(){return ul},__experimentalLetterSpacingControl:function(){return a_},__experimentalLibrary:function(){return tI},__experimentalLinkControl:function(){return lw},__experimentalLinkControlSearchInput:function(){return qS},__experimentalLinkControlSearchItem:function(){return MS},__experimentalLinkControlSearchResults:function(){return jS},__experimentalListView:function(){return rE},__experimentalPanelColorGradientSettings:function(){return RE},__experimentalPreviewOptions:function(){return _C},__experimentalPublishDateTimePicker:function(){return vI},__experimentalRecursionProvider:function(){return mI},__experimentalResponsiveBlockControl:function(){return nC},__experimentalSpacingSizesControl:function(){return Co},__experimentalTextDecorationControl:function(){return Jb},__experimentalTextTransformControl:function(){return r_},__experimentalUnitControl:function(){return sC},__experimentalUseBlockOverlayActive:function(){return rp},__experimentalUseBlockPreview:function(){return nf},__experimentalUseBorderProps:function(){return $_},__experimentalUseColorProps:function(){return J_},__experimentalUseCustomSides:function(){return Ei},__experimentalUseGradient:function(){return Tv},__experimentalUseHasRecursion:function(){return yI},__experimentalUseMultipleOriginColorsAndGradients:function(){return mv},__experimentalUseResizeCanvas:function(){return kC},__experimentaluseLayoutClasses:function(){return M_},__experimentaluseLayoutStyles:function(){return R_},__unstableBlockNameContext:function(){return eh},__unstableBlockSettingsMenuFirstItem:function(){return Ag},__unstableBlockToolbarLastItem:function(){return og},__unstableDuotoneFilter:function(){return Jd},__unstableDuotoneStylesheet:function(){return Kd},__unstableDuotoneUnsetStylesheet:function(){return qd},__unstableEditorStyles:function(){return Wd},__unstableGetValuesFromColors:function(){return $d},__unstableIframe:function(){return Vp},__unstableInserterMenuExtension:function(){return Om},__unstablePresetDuotoneFilter:function(){return Yd},__unstableRichTextInputEvent:function(){return iC},__unstableUseBlockSelectionClearer:function(){return wp},__unstableUseClipboardHandler:function(){return ag},__unstableUseMouseMoveTypingReset:function(){return lI},__unstableUseTypewriter:function(){return pI},__unstableUseTypingObserver:function(){return aI},createCustomColorsHOC:function(){return rk},getColorClassName:function(){return fv},getColorObjectByAttributeValues:function(){return pv},getColorObjectByColorValue:function(){return dv},getComputedFluidTypographyValue:function(){return Fb},getFontSize:function(){return xb},getFontSizeClass:function(){return Pb},getFontSizeObjectByValue:function(){return Bb},getGradientSlugByValue:function(){return Pv},getGradientValueBySlug:function(){return xv},getPxFromCssUnit:function(){return OI},getTypographyClassesAndStyles:function(){return Q_},privateApis:function(){return MA},store:function(){return xr},storeConfig:function(){return Ar},transformStyles:function(){return Vd},useBlockDisplayInformation:function(){return sy},useBlockEditContext:function(){return Nr},useBlockProps:function(){return op},useCachedTruthy:function(){return Z_},useInnerBlocksProps:function(){return Gh},useSetting:function(){return yo},withColorContext:function(){return CE},withColors:function(){return ok},withFontSizes:function(){return ak}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Qt},__experimentalGetAllowedBlocks:function(){return Bt},__experimentalGetAllowedPatterns:function(){return Nt},__experimentalGetBlockListSettingsForBlocks:function(){return jt},__experimentalGetDirectInsertBlock:function(){return Pt},__experimentalGetGlobalBlocksByName:function(){return se},__experimentalGetLastBlockAttributeChanges:function(){return Gt},__experimentalGetParsedPattern:function(){return Tt},__experimentalGetPatternTransformItems:function(){return Ft},__experimentalGetPatternsByBlockTypes:function(){return Rt},__experimentalGetReusableBlockTitle:function(){return zt},__unstableGetBlockWithoutInnerBlocks:function(){return te},__unstableGetClientIdWithClientIdsTree:function(){return re},__unstableGetClientIdsTree:function(){return oe},__unstableGetContentLockingParent:function(){return tn},__unstableGetEditorMode:function(){return $t},__unstableGetSelectedBlocksWithPartialSelection:function(){return Ge},__unstableGetTemporarilyEditingAsBlocks:function(){return nn},__unstableGetVisibleBlocks:function(){return en},__unstableHasActiveBlockOverlayActive:function(){return rn},__unstableIsFullySelected:function(){return Ue},__unstableIsLastBlockChangeIgnored:function(){return Vt},__unstableIsSelectionCollapsed:function(){return je},__unstableIsSelectionMergeable:function(){return Ve},__unstableIsWithinBlockOverlay:function(){return on},__unstableSelectionHasUnmergeableBlock:function(){return ze},areInnerBlocksControlled:function(){return Yt},canEditBlock:function(){return vt},canInsertBlockType:function(){return dt},canInsertBlocks:function(){return ft},canLockBlockType:function(){return bt},canMoveBlock:function(){return gt},canMoveBlocks:function(){return ht},canRemoveBlock:function(){return mt},canRemoveBlocks:function(){return yt},didAutomaticChange:function(){return qt},getAdjacentBlockClientId:function(){return Ce},getAllowedBlocks:function(){return xt},getBlock:function(){return ee},getBlockAttributes:function(){return X},getBlockCount:function(){return pe},getBlockHierarchyRootClientId:function(){return Se},getBlockIndex:function(){return We},getBlockInsertionPoint:function(){return it},getBlockListSettings:function(){return Lt},getBlockMode:function(){return Ze},getBlockName:function(){return Q},getBlockNamesByClientId:function(){return ue},getBlockOrder:function(){return He},getBlockParents:function(){return ke},getBlockParentsByBlockName:function(){return Ee},getBlockRootClientId:function(){return _e},getBlockSelectionEnd:function(){return ye},getBlockSelectionStart:function(){return me},getBlockTransformItems:function(){return It},getBlocks:function(){return ne},getBlocksByClientId:function(){return ce},getClientIdsOfDescendants:function(){return ie},getClientIdsWithDescendants:function(){return le},getDraggedBlockClientIds:function(){return tt},getFirstMultiSelectedBlockClientId:function(){return Oe},getGlobalBlockCount:function(){return ae},getInserterItems:function(){return Ct},getLastMultiSelectedBlockClientId:function(){return Ne},getLowestCommonAncestorWithSelectedBlock:function(){return we},getMultiSelectedBlockClientIds:function(){return Pe},getMultiSelectedBlocks:function(){return Te},getMultiSelectedBlocksEndClientId:function(){return De},getMultiSelectedBlocksStartClientId:function(){return Le},getNextBlockClientId:function(){return Ae},getPatternsByBlockTypes:function(){return Mt},getPreviousBlockClientId:function(){return Ie},getSelectedBlock:function(){return be},getSelectedBlockClientId:function(){return ve},getSelectedBlockClientIds:function(){return Be},getSelectedBlockCount:function(){return ge},getSelectedBlocksInitialCaretPosition:function(){return xe},getSelectionEnd:function(){return fe},getSelectionStart:function(){return de},getSettings:function(){return Dt},getTemplate:function(){return st},getTemplateLock:function(){return ct},hasBlockMovingClientId:function(){return Kt},hasInserterItems:function(){return At},hasMultiSelection:function(){return Je},hasSelectedBlock:function(){return he},hasSelectedInnerBlock:function(){return Ke},isAncestorBeingDragged:function(){return rt},isAncestorMultiSelected:function(){return Fe},isBlockBeingDragged:function(){return nt},isBlockHighlighted:function(){return Jt},isBlockInsertionPointVisible:function(){return lt},isBlockMultiSelected:function(){return Re},isBlockSelected:function(){return $e},isBlockValid:function(){return Z},isBlockVisible:function(){return Xt},isBlockWithinSelection:function(){return qe},isCaretWithinFormattedText:function(){return ot},isDraggingBlocks:function(){return et},isFirstMultiSelectedBlock:function(){return Me},isLastBlockChangePersistent:function(){return Ut},isMultiSelecting:function(){return Ye},isNavigationMode:function(){return Wt},isSelectionEnabled:function(){return Qe},isTyping:function(){return Xe},isValidTemplate:function(){return at},wasBlockJustInserted:function(){return Zt}});var t={};n.r(t),n.d(t,{__experimentalUpdateSettings:function(){return an},hideBlockInterface:function(){return sn},showBlockInterface:function(){return cn}});var o={};n.r(o),n.d(o,{getLastInsertedBlocksClientIds:function(){return pn},isBlockInterfaceHidden:function(){return un}});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:function(){return Hn},__unstableExpandSelection:function(){return $n},__unstableMarkAutomaticChange:function(){return pr},__unstableMarkLastChangeAsPersistent:function(){return cr},__unstableMarkNextChangeAsNotPersistent:function(){return ur},__unstableSaveReusableBlock:function(){return sr},__unstableSetEditorMode:function(){return fr},__unstableSetTemporarilyEditingAsBlocks:function(){return Er},__unstableSplitSelection:function(){return Wn},clearSelectedBlock:function(){return xn},duplicateBlocks:function(){return yr},enterFormattedText:function(){return nr},exitFormattedText:function(){return rr},flashBlock:function(){return br},hideInsertionPoint:function(){return zn},insertAfterBlock:function(){return hr},insertBeforeBlock:function(){return gr},insertBlock:function(){return Dn},insertBlocks:function(){return Un},insertDefaultBlock:function(){return ir},mergeBlocks:function(){return Kn},moveBlockToPosition:function(){return Ln},moveBlocksDown:function(){return Mn},moveBlocksToPosition:function(){return Fn},moveBlocksUp:function(){return Rn},multiSelect:function(){return An},receiveBlocks:function(){return bn},removeBlock:function(){return Jn},removeBlocks:function(){return qn},replaceBlock:function(){return On},replaceBlocks:function(){return Tn},replaceInnerBlocks:function(){return Yn},resetBlocks:function(){return gn},resetSelection:function(){return vn},selectBlock:function(){return En},selectNextBlock:function(){return wn},selectPreviousBlock:function(){return Sn},selectionChange:function(){return or},setBlockMovingClientId:function(){return mr},setBlockVisibility:function(){return kr},setHasControlledInnerBlocks:function(){return _r},setNavigationMode:function(){return dr},setTemplateValidity:function(){return Vn},showInsertionPoint:function(){return jn},startDraggingBlocks:function(){return er},startMultiSelect:function(){return Cn},startTyping:function(){return Zn},stopDraggingBlocks:function(){return tr},stopMultiSelect:function(){return In},stopTyping:function(){return Xn},synchronizeTemplate:function(){return Gn},toggleBlockHighlight:function(){return vr},toggleBlockMode:function(){return Qn},toggleSelection:function(){return Bn},updateBlock:function(){return kn},updateBlockAttributes:function(){return _n},updateBlockListSettings:function(){return lr},updateSettings:function(){return ar},validateBlocksToTemplate:function(){return hn}});var l={};n.r(l),n.d(l,{GlobalStylesContext:function(){return jI},useGlobalSetting:function(){return GI},useGlobalStyle:function(){return HI},useGlobalStylesOutput:function(){return rA},useGlobalStylesReset:function(){return VI}});var a=window.wp.blocks,s=window.wp.hooks;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),S(o,e.slice(t,t+r),n)}const C=e=>e;function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=new Map,r=[];return n.set(t,r),e.forEach((e=>{const{clientId:t,innerBlocks:o}=e;r.push(t),I(o,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=[],r=[[t,e]];for(;r.length;){const[e,t]=r.shift();t.forEach((t=>{let{innerBlocks:o,...i}=t;n.push([i.clientId,e]),null!=o&&o.length&&r.push([i.clientId,o])}))}return n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;const n=[],r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n.push([o.clientId,t(o)])}return n}function B(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...r}=n.shift();n.push(...e),t[r.clientId]=!0}return t}function P(e){return x(e,(e=>{const{attributes:t,...n}=e;return n}))}function T(e){return x(e,(e=>e.attributes))}function O(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&b()(e.clientIds,t.clientIds)&&function(e,t){return b()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function N(e,t){const n=e.tree,r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n.set(e.clientId,{});for(const t of o)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.tree,o=new Set([]),i=new Set;for(const r of t){let t=n?r:e.parents.get(r);do{if(e.controlledInnerBlocks[t]){i.add(t);break}o.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of o)r.set(e,{...r.get(e)});for(const t of o)r.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>r.get(e)));for(const t of i)r.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>r.get(e)))})}const R=(0,f.pipe)(m.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,o)=>{const{name:i}=t.byClientId.get(o);"core/block"===i&&n.ref===e&&t.attributes.set(o,{...n,ref:r})}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":r.tree=new Map(r.tree),N(r,n.blocks),M(r,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":r.tree=new Map(r.tree),r.tree.set(n.clientId,{...r.tree.get(n.clientId),...r.byClientId.get(n.clientId),attributes:r.attributes.get(n.clientId)}),M(r,[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":r.tree=new Map(r.tree),n.clientIds.forEach((e=>{r.tree.set(e,{...r.tree.get(e),attributes:r.attributes.get(e)})})),M(r,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(n.blocks);r.tree=new Map(r.tree),n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),N(r,n.blocks),M(r,n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents.get(e)||""!==t.parents.get(e)&&!r.byClientId.get(t.parents.get(e))||o.push(t.parents.get(e));M(r,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents.get(o)||""!==t.parents.get(o)&&!r.byClientId.get(t.parents.get(o))||e.push(t.parents.get(o));r.tree=new Map(r.tree),n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e))).forEach((e=>{r.tree.delete(e)})),M(r,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),r.tree=new Map(r.tree),M(r,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=new Map(r.tree),M(r,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];r.attributes.forEach(((t,o)=>{"core/block"===r.byClientId.get(o).name&&t.ref===n.updatedId&&e.push(o)})),r.tree=new Map(r.tree),e.forEach((e=>{r.tree.set(e,{...r.byClientId.get(e),attributes:r.attributes.get(e),innerBlocks:r.tree.get(e).innerBlocks})})),M(r,e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order.get(n.rootClientId)&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order.get(n.rootClientId)}));let i=o;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const o=new Map(i.order);Object.keys(r).forEach((e=>{t.order.get(e)&&o.set(e,t.order.get(e))})),i.order=o,i.tree=new Map(i.tree),Object.keys(r).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(P(n.blocks)),attributes:new Map(T(n.blocks)),order:I(n.blocks),parents:new Map(A(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(null==t?void 0:t.tree),N(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!O(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...r}=t.updates;if(0===Object.values(r).length)return e;const o=new Map(e);return o.set(t.clientId,{...e.get(t.clientId),...r}),o}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),P(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let r=!1;const o=new Map(e);for(const i of t.clientIds){var n;const l=Object.entries(t.uniqueByBlock?t.attributes[i]:null!==(n=t.attributes)&&void 0!==n?n:{});if(0===l.length)continue;let a=!1;const s=e.get(i),c={};l.forEach((e=>{let[t,n]=e;s[t]!==n&&(a=!0,c[t]=n)})),r=r||a,a&&o.set(i,{...s,...c})}return r?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),T(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{var n;const r=I(t.blocks),o=new Map(e);return r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(null!==(n=e.get(""))&&void 0!==n?n:[]).concat(r[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e.get(n)||[],o=I(t.blocks,n),{index:i=r.length}=t,l=new Map(e);return o.forEach(((e,t)=>{l.set(t,e)})),l.set(n,S(r,o.get(n),i)),l}case"MOVE_BLOCKS_TO_POSITION":{var r,o;const{fromRootClientId:n="",toRootClientId:i="",clientIds:l}=t,{index:a=e.get(i).length}=t;if(n===i){const t=e.get(i).indexOf(l[0]),n=new Map(e);return n.set(i,w(e.get(i),t,a,l.length)),n}const s=new Map(e);return s.set(n,null!==(r=null===(o=e.get(n))||void 0===o?void 0:o.filter((e=>!l.includes(e))))&&void 0!==r?r:[]),s.set(i,S(e.get(i),l,a)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=e.get(r);if(!i.length||o===i[0])return e;const l=i.indexOf(o),a=new Map(e);return a.set(r,w(i,l,l-1,n.length)),a}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=n[0],i=n[n.length-1],l=e.get(r);if(!l.length||i===l[l.length-1])return e;const a=l.indexOf(o),s=new Map(e);return s.set(r,w(l,a,a+1,n.length)),s}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=I(t.blocks),o=new Map(e);return t.replacedClientIds.forEach((e=>{o.delete(e)})),r.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...r.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);o.set(t,i)})),o}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,r)=>{var o;const i=null!==(o=null==e?void 0:e.filter((e=>!t.removedClientIds.includes(e))))&&void 0!==o?o:[];i.length!==e.length&&n.set(r,i)})),n}}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return A(t.blocks).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return A(t.blocks,t.rootClientId||"").forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),A(t.blocks,e.get(t.clientIds[0])).forEach((e=>{let[t,r]=e;n.set(t,r)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var L=(0,m.combineReducers)({blocks:R,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:F(o.selectionStart,i),selectionEnd:F(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((e=>{let[n]=e;return!t.clientIds.includes(n)})));case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;if(!t.settings){if(e.hasOwnProperty(n)){const{[n]:t,...r}=e;return r}return e}return b()(e[n],t.settings)?e:{...e,[n]:t.settings}}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:r,__unstableWithInserter:o,operation:i}=t,l={rootClientId:n,index:r,__unstableWithInserter:o,operation:i};return b()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:o}=n,i=(0,m.select)(a.store).getActiveBlockVariation(o,r);let l=null!=i&&i.name?`${o}/${i.name}`:o;const s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[l]:{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"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 e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_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"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":case"REPLACE_INNER_BLOCKS":if(!n.blocks.length)return t;const r=n.blocks.map((e=>e.clientId));return{clientIds:r,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}}),D={};function U(e){return[e]}function j(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r(r,o)=>{let i,l;if("function"==typeof e?(i=e(r),l=e(o)):(i=r[e],l=o[e]),i>l)return"asc"===n?1:-1;if(l>i)return"asc"===n?-1:1;const a=t.findIndex((e=>e===r)),s=t.findIndex((e=>e===o));return a>s?1:s>a?-1:0};function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc";return e.concat().sort(q(t,e,n))}const Y=[];function Q(e,t){const n=e.blocks.byClientId.get(t),r="core/social-link";if("web"!==u.Platform.OS&&(null==n?void 0:n.name)===r){const n=e.blocks.attributes.get(t),{service:o}=null!=n?n:{};return o?`core/social-link-${o}`:r}return n?n.name:null}function Z(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function X(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function ee(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const te=z(((e,t)=>e.blocks.byClientId.has(t)?{...e.blocks.byClientId.get(t),attributes:X(e,t)}:null),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function ne(e,t){var n;const r=t&&Yt(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree.get(r))||void 0===n?void 0:n.innerBlocks)||Y}const re=z(((e,t)=>({clientId:t,innerBlocks:oe(e,t)})),(e=>[e.blocks.order])),oe=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return He(e,t).map((t=>re(e,t)))}),(e=>[e.blocks.order])),ie=z(((e,t)=>{const n=[];for(const r of t)for(const t of He(e,r))n.push(t,...ie(e,[t]));return n}),(e=>[e.blocks.order])),le=z((e=>{const t=[];for(const n of He(e))t.push(n,...ie(e,[n]));return t}),(e=>[e.blocks.order])),ae=z(((e,t)=>{const n=le(e);return t?n.reduce(((n,r)=>e.blocks.byClientId.get(r).name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),se=z(((e,t)=>{if(!t)return Y;const n=le(e).filter((n=>e.blocks.byClientId.get(n).name===t));return n.length>0?n:Y}),(e=>[e.blocks.order,e.blocks.byClientId])),ce=z(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>ee(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),ue=z(((e,t)=>ce(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>ce(e,t)));function pe(e,t){return He(e,t).length}function de(e){return e.selection.selectionStart}function fe(e){return e.selection.selectionEnd}function me(e){return e.selection.selectionStart.clientId}function ye(e){return e.selection.selectionEnd.clientId}function ge(e){const t=Pe(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function he(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ve(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function be(e){const t=ve(e);return t?ee(e,t):null}function _e(e,t){return e.blocks.parents.has(t)?e.blocks.parents.get(t):null}const ke=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents.get(o);)o=e.blocks.parents.get(o),r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),Ee=z((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=ke(e,t,r);return o.map((t=>({id:t,name:Q(e,t)}))).filter((e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})).map((e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function Se(e,t){let n,r=t;do{n=r,r=e.blocks.parents.get(r)}while(r);return n}function we(e,t){const n=ve(e),r=[...ke(e,t),t],o=[...ke(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?Oe(e):Ne(e)),!t)return null;const r=_e(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o.get(r),l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function Ie(e,t){return Ce(e,t,-1)}function Ae(e,t){return Ce(e,t,1)}function xe(e){return e.initialPosition}const Be=z((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return Y;if(t.clientId===n.clientId)return[t.clientId];const r=_e(e,t.clientId);if(null===r)return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Pe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?Y:Be(e)}const Te=z((e=>{const t=Pe(e);return t.length?t.map((t=>ee(e,t))):Y}),(e=>[...Be.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Oe(e){return Pe(e)[0]||null}function Ne(e){const t=Pe(e);return t[t.length-1]||null}function Me(e,t){return Oe(e)===t}function Re(e,t){return-1!==Pe(e).indexOf(t)}const Fe=z(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=_e(e,n),r=Re(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Le(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function De(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ue(e){const t=de(e),n=fe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function je(e){const t=de(e),n=fe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function ze(e){return Be(e).some((t=>{const n=Q(e,t);return!(0,a.getBlockType)(n).merge}))}function Ve(e,t){const n=de(e),r=fe(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const o=_e(e,n.clientId);if(o!==_e(e,r.clientId))return!1;const i=He(e,o);let l,s;i.indexOf(n.clientId)>i.indexOf(r.clientId)?(l=r,s=n):(l=n,s=r);const c=t?s.clientId:l.clientId,u=t?l.clientId:s.clientId,p=Q(e,c);if(!(0,a.getBlockType)(p).merge)return!1;const d=ee(e,u);if(d.name===p)return!0;const f=(0,a.switchToBlockType)(d,p);return f&&f.length}const Ge=e=>{const t=de(e),n=fe(e);if(t.clientId===n.clientId)return Y;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return Y;const r=_e(e,t.clientId);if(r!==_e(e,n.clientId))return Y;const o=He(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId),[s,c]=i>l?[n,t]:[t,n],u=ee(e,s.clientId),p=(0,a.getBlockType)(u.name),d=ee(e,c.clientId),f=(0,a.getBlockType)(d.name),m=u.attributes[s.attributeKey],y=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let v=(0,H.create)({html:m,...K(g)}),b=(0,H.create)({html:y,...K(h)});return v=(0,H.remove)(v,0,s.offset),b=(0,H.remove)(b,c.offset,b.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,H.toHTMLString)({value:v,...K(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,H.toHTMLString)({value:b,...K(h)})}}]};function He(e,t){return e.blocks.order.get(t||"")||Y}function We(e,t){return He(e,_e(e,t)).indexOf(t)}function $e(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return He(e,t).some((t=>$e(e,t)||Re(e,t)||n&&Ke(e,t,n)))}function qe(e,t){if(!t)return!1;const n=Pe(e),r=n.indexOf(t);return r>-1&&rnt(e,t)))}function ot(){return $()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const it=z((e=>{let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=_e(e,i)||void 0,n=We(e,o.clientId)+1):n=He(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionPoint,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function lt(e){return null!==e.insertionPoint}function at(e){return e.template.isValid}function st(e){return e.settings.template}function ct(e,t){var n,r,o;return t?null!==(n=null===(r=Lt(e,t))||void 0===r?void 0:r.templateLock)&&void 0!==n&&n:null!==(o=e.settings.templateLock)&&void 0!==o&&o}const ut=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},pt=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,a.getBlockType)(t),!n)return!1;const{allowedBlockTypes:o}=Dt(e),i=ut(o,t,!0);if(!i)return!1;const l=!!ct(e,r);if(l)return!1;const c=Lt(e,r);if(r&&void 0===c)return!1;const u=null==c?void 0:c.allowedBlocks,p=ut(u,t),d=n.parent,f=Q(e,r),m=ut(d,f);let y=!0;const g=n.ancestor;if(g){y=[r,...ke(e,r)].some((t=>ut(g,Q(e,t))))}const h=y&&(null===p&&null===m||!0===p||!0===m);return h?(0,s.applyFilters)("blockEditor.__unstableCanInsertBlockType",h,n,r,{getBlock:ee.bind(null,e),getBlockParentsByBlockName:Ee.bind(null,e)}):h},dt=z(pt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId.get(n),e.settings.allowedBlockTypes,e.settings.templateLock]));function ft(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>dt(e,Q(e,t),n)))}function mt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return!0;const{lock:o}=r,i=!!ct(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function yt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>mt(e,t,n)))}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=X(e,t);if(null===r)return;const{lock:o}=r,i="all"===ct(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>gt(e,t,n)))}function vt(e,t){const n=X(e,t);if(null===n)return!0;const{lock:r}=n;return!(null!=r&&r.edit)}function bt(e,t){var n;return!!(0,a.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function _t(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const kt=(e,t,n)=>!!(0,a.hasBlockSupport)(t,"inserter",!0)&&pt(e,t.name,n),Et=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=_t(e,r)||{};return{...t,id:r,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:St(o,i)}},St=(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}},wt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let o=!1;(0,a.hasBlockSupport)(t.name,"multiple",!0)||(o=ce(e,le(e)).some((e=>{let{name:n}=e;return n===t.name})));const{time:i,count:l=0}=_t(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:St(i,l)};if("transform"===n)return s;const c=(0,a.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},Ct=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=wt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,o=t=>{let n=G;if("web"===u.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,o=(0,a.getBlockType)(t+r);o&&(n=o.icon)}}const o=`core/block/${t.id}`,{time:i,count:l=0}=_t(e,o)||{},s=St(i,l);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:s}},i=(0,a.getBlockTypes)().filter((n=>kt(e,n,t))).map(n),l=pt(e,"core/block",t)?Ht(e).map(o):[],s=i.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=Et(e,n);t.push(...r.map(o))}return t}),[]),c=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=s.reduce(c,{core:[],noncore:[]}),f=[...p,...d];return[...f,...l]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),It=z((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=Array.isArray(t)?t:[t],[i]=o,l=wt(e,{buildScope:"transform"}),s=(0,a.getBlockTypes)().filter((t=>kt(e,t,r))).map(l),c=Object.fromEntries(Object.entries(s).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,_.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const u=(0,a.getPossibleBlockTransformations)(o).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return J(u,(e=>c[e.name].frecency),"desc")}),((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),At=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,a.getBlockTypes)().some((n=>kt(e,n,t)));if(n)return!0;const r=pt(e,"core/block",t)&&Ht(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Ht(e),(0,a.getBlockTypes)()])),xt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,a.getBlockTypes)().filter((n=>kt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,a.getBlockTypes)()])),Bt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),xt(e,t)}),((e,t)=>[...xt.getDependants(e,t)])),Pt=z((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(ee(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree.get(t)])),Tt=z(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,a.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Ot=z((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=Dt(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return Tt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!ut(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Nt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Ot(e),r=n.filter((n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return dt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId.get(t)])),Mt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;const r=Nt(e,n),o=Array.isArray(t)?t:[t],i=r.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=>o.includes(e)))}));return 0===i.length?Y:i}),((e,t,n)=>[...Nt.getDependants(e,n)])),Rt=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return $()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),Mt(e,t,n)}),((e,t,n)=>[...Nt.getDependants(e,n)])),Ft=z((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return Y;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Yt(e,n)})))return Y;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return Mt(e,r,n)}),((e,t,n)=>[...Mt.getDependants(e,n)]));function Lt(e,t){return e.blockListSettings[t]}function Dt(e){return e.settings}function Ut(e){return e.blocks.isPersistentChange}const jt=z((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),zt=z(((e,t)=>{var n;const r=Ht(e).find((e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Ht(e)]));function Vt(e){return e.blocks.isIgnoredChange}function Gt(e){return e.lastBlockAttributesChange}function Ht(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:Y}function Wt(e){return"navigation"===e.editorMode}function $t(e){return e.editorMode}function Kt(e){return e.hasBlockMovingClientId}function qt(e){return!!e.automaticChangeStatus}function Jt(e,t){return e.highlightedBlock===t}function Yt(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Qt=z(((e,t)=>{if(!t.length)return null;const n=ve(e);if(t.includes(Q(e,n)))return n;const r=Pe(e),o=Ee(e,n||r[0],t);return o?o[o.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Zt(e,t,n){var r;const{lastBlockInserted:o}=e;return(null===(r=o.clientIds)||void 0===r?void 0:r.includes(t))&&o.source===n}function Xt(e,t){var n,r;return null===(n=null===(r=e.blockVisibility)||void 0===r?void 0:r[t])||void 0===n||n}const en=z((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),tn=z(((e,t)=>{let n,r=t;for(;e.blocks.parents.has(r);)r=e.blocks.parents.get(r),r&&"contentOnly"===ct(e,r)&&(n=r);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function nn(e){return e.temporarilyEditingAsBlocks}function rn(e,t){if(!vt(e,t))return!0;const n=$t(e);if("zoom-out"===n&&t&&!_e(e,t))return!0;const r=(0,a.hasBlockSupport)(Q(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!r&&Yt(e,t))&&!$e(e,t)&&!Ke(e,t,!0)}function on(e,t){let n=e.blocks.parents.get(t);for(;n;){if(rn(e,n))return!0;n=e.blocks.parents.get(n)}return!1}const ln=["inserterMediaCategories","blockInspectorAnimation"];function an(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e;if(t&&"web"===u.Platform.OS){n={};for(const t in e)ln.includes(t)||(n[t]=e[t])}return{type:"UPDATE_SETTINGS",settings:n}}function sn(){return{type:"HIDE_BLOCK_INTERFACE"}}function cn(){return{type:"SHOW_BLOCK_INTERFACE"}}function un(e){return e.isBlockInterfaceHidden}function pn(e){var t;return null==e||null===(t=e.lastBlockInserted)||void 0===t?void 0:t.clientIds}var dn=window.wp.a11y;const fn="†";function mn(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(fn)}))}const yn=e=>Array.isArray(e)?e:[e],gn=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(hn(e))},hn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getTemplate(),i=n.getTemplateLock(),l=!o||"all"!==i||(0,a.doBlocksMatchTemplate)(e,o);if(l!==n.isValidTemplate())return r.setTemplateValidity(l),l};function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function bn(e){return $()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function _n(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:yn(e),attributes:t,uniqueByBlock:n}}function kn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function En(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const Sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{let{select:r,dispatch:o}=n;const i=r.getPreviousBlockClientId(e);if(i)o.selectBlock(i,-1);else if(t){const t=r.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}}},wn=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Cn(){return{type:"START_MULTI_SELECT"}}function In(){return{type:"STOP_MULTI_SELECT"}}const An=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,dn.speak)((0,_.sprintf)((0,_._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function xn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function Pn(e,t){var n,r;const o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,a.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:i={}}=e,l=o[n];return{...e,attributes:{...i,className:`${r||""} is-style-${l}`.trim()}}}))}const Tn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=yn(e),t=Pn(yn(t),l.getSettings());const s=l.getBlockRootClientId(e[0]);for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function On(e,t){return Tn(e,t)}const Nn=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:yn(t),rootClientId:n})},Mn=Nn("MOVE_BLOCKS_DOWN"),Rn=Nn("MOVE_BLOCKS_UP"),Fn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function Ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return Fn([e],t,n,r)}function Dn(e,t,n,r,o){return Un([e],t,n,r,0,o)}const Un=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;null!==o&&"object"==typeof o&&(i=o,o=0,$()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=Pn(yn(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function jn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r,operation:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r,operation:o}}const zn=()=>e=>{let{select:t,dispatch:n}=e;t.isBlockInsertionPointVisible()&&n({type:"HIDE_INSERTION_POINT"})};function Vn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const Gn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),o=t.getTemplate(),i=(0,a.synchronizeBlocksWithTemplate)(r,o);n.resetBlocks(i)},Hn=e=>t=>{let{registry:n,select:r,dispatch:o}=t;const i=r.getSelectionStart(),l=r.getSelectionEnd();if(i.clientId===l.clientId)return;if(!i.attributeKey||!l.attributeKey||void 0===i.offset||void 0===l.offset)return!1;const s=r.getBlockRootClientId(i.clientId);if(s!==r.getBlockRootClientId(l.clientId))return;const c=r.getBlockOrder(s);let u,p;c.indexOf(i.clientId)>c.indexOf(l.clientId)?(u=l,p=i):(u=i,p=l);const d=e?p:u,f=r.getBlock(d.clientId),m=(0,a.getBlockType)(f.name);if(!m.merge)return;const y=u,g=p,h=r.getBlock(y.clientId),v=(0,a.getBlockType)(h.name),b=r.getBlock(g.clientId),_=(0,a.getBlockType)(b.name),k=h.attributes[y.attributeKey],E=b.attributes[g.attributeKey],S=v.attributes[y.attributeKey],w=_.attributes[g.attributeKey];let C=(0,H.create)({html:k,...K(S)}),I=(0,H.create)({html:E,...K(w)});C=(0,H.remove)(C,y.offset,C.text.length),I=(0,H.insert)(I,fn,0,g.offset);const A=(0,a.cloneBlock)(h,{[y.attributeKey]:(0,H.toHTMLString)({value:C,...K(S)})}),x=(0,a.cloneBlock)(b,{[g.attributeKey]:(0,H.toHTMLString)({value:I,...K(w)})}),B=e?A:x,P=h.name===b.name?[B]:(0,a.switchToBlockType)(B,m.name);if(!P||!P.length)return;let T;if(e){const e=P.pop();T=m.merge(e.attributes,x.attributes)}else{const e=P.shift();T=m.merge(A.attributes,e.attributes)}const O=mn(T),N=T[O],M=(0,H.create)({html:N,...K(m.attributes[O])}),R=M.text.indexOf(fn),F=(0,H.remove)(M,R,R+1),L=(0,H.toHTMLString)({value:F,...K(m.attributes[O])});T[O]=L;const D=r.getSelectedBlockClientIds(),U=[...e?P:[],{...f,attributes:{...f.attributes,...T}},...e?[]:P];n.batch((()=>{o.selectionChange(f.clientId,O,R,R),o.replaceBlocks(D,U,0,r.getSelectedBlocksInitialCaretPosition())}))},Wn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();if(r.clientId===o.clientId)return;if(!r.attributeKey||!o.attributeKey||void 0===r.offset||void 0===o.offset)return;const i=t.getBlockRootClientId(r.clientId);if(i!==t.getBlockRootClientId(o.clientId))return;const l=t.getBlockOrder(i);let s,c;l.indexOf(r.clientId)>l.indexOf(o.clientId)?(s=o,c=r):(s=r,c=o);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,a.getBlockType)(d.name),m=t.getBlock(p.clientId),y=(0,a.getBlockType)(m.name),g=d.attributes[u.attributeKey],h=m.attributes[p.attributeKey],v=f.attributes[u.attributeKey],b=y.attributes[p.attributeKey];let _=(0,H.create)({html:g,...K(v)}),k=(0,H.create)({html:h,...K(b)});_=(0,H.remove)(_,u.offset,_.text.length),k=(0,H.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,H.toHTMLString)({value:_,...K(v)})}},(0,a.createBlock)((0,a.getDefaultBlockName)()),{...m,attributes:{...m.attributes,[p.attributeKey]:(0,H.toHTMLString)({value:k,...K(b)})}}],1,t.getSelectedBlocksInitialCaretPosition())},$n=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},Kn=(e,t)=>n=>{let{registry:r,select:o,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[s,c]=l,u=o.getBlock(s),p=(0,a.getBlockType)(u.name);if(!p)return;const d=o.getBlock(c);if(p&&!p.merge){const e=(0,a.switchToBlockType)(d,p.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void r.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,s),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const f=(0,a.getBlockType)(d.name),{clientId:m,attributeKey:y,offset:g}=o.getSelectionStart(),h=(m===s?p:f).attributes[y],v=(m===s||m===c)&&void 0!==y&&void 0!==g&&!!h;h||("number"==typeof y?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 y):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,a.cloneBlock)(u),_=(0,a.cloneBlock)(d);if(v){const e=m===s?b:_,t=e.attributes[y],n=(0,H.insert)((0,H.create)({html:t,...K(h)}),fn,g,g);e.attributes[y]=(0,H.toHTMLString)({value:n,...K(h)})}const k=u.name===d.name?[_]:(0,a.switchToBlockType)(_,u.name);if(!k||!k.length)return;const E=p.merge(b.attributes,k[0].attributes);if(v){const e=mn(E),t=E[e],n=(0,H.create)({html:t,...K(p.attributes[e])}),r=n.text.indexOf(fn),o=(0,H.remove)(n,r,r+1),l=(0,H.toHTMLString)({value:o,...K(p.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,r,r)}i.replaceBlocks([u.clientId,d.clientId],[{...u,attributes:{...u.attributes,...E}},...k.slice(1)],0)},qn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=yn(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0],t),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function Jn(e,t){return qn([e],t)}function Yn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Qn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Zn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function er(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function tr(){return{type:"STOP_DRAGGING_BLOCKS"}}function nr(){return $()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function rr(){return $()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function or(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const ir=(e,t,n)=>r=>{let{dispatch:o}=r;const i=(0,a.getDefaultBlockName)();if(!i)return;const l=(0,a.createBlock)(i,e);return o.insertBlock(l,n,t)};function lr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ar(e){return an(e,!0)}function sr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function cr(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ur(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const pr=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},dr=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},fr=e=>t=>{let{dispatch:n,select:r}=t;if("zoom-out"===e){const e=r.getBlockSelectionStart();e&&n.selectBlock(r.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,dn.speak)((0,_.__)("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.")):"edit"===e?(0,dn.speak)((0,_.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,dn.speak)((0,_.__)("You are currently in zoom-out mode."))},mr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,dn.speak)((0,_.__)("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."))}},yr=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;const i=r.getBlocksByClientId(e);if(i.some((e=>!e)))return;const l=i.map((e=>e.name));if(l.some((e=>!(0,a.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=yn(e),u=r.getBlockIndex(c[c.length-1]),p=i.map((e=>(0,a.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(p,u+1,s,t),p.length>1&&t&&o.multiSelect(p[0].clientId,p[p.length-1].clientId),p.map((e=>e.clientId))}},gr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},hr=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function vr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const br=e=>async t=>{let{dispatch:n}=t;n(vr(e,!0)),await new Promise((e=>setTimeout(e,150))),n(vr(e,!1))};function _r(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function kr(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Er(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const Sr="core/block-editor";var wr=window.wp.privateApis;const{lock:Cr,unlock:Ir}=(0,wr.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.","@wordpress/block-editor"),Ar={reducer:L,selectors:e,actions:i},xr=(0,m.createReduxStore)(Sr,{...Ar,persist:["preferences"]}),Br=(0,m.registerStore)(Sr,{...Ar,persist:["preferences"]});Ir(Br).registerPrivateActions(t),Ir(Br).registerPrivateSelectors(o);const Pr={name:"",isSelected:!1},Tr=(0,u.createContext)(Pr),{Provider:Or}=Tr;function Nr(){return(0,u.useContext)(Tr)}function Mr(){const{isSelected:e,clientId:t,name:n}=Nr();return(0,m.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(xr);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function Rr(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:o=!1}=e;const i=function(e,t){const n=Mr(),{clientId:r}=Nr(),o=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:o}=e(xr),{hasBlockSupport:i}=e(a.store);return t&&i(n(r),"__experimentalExposeControlsToChildren",!1)&&o(r)}),[t,r]);var i;return n?null===(i=h[e])||void 0===i?void 0:i.Fill:o?h.parent.Fill:null}(t,o);return i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(i,null,(e=>{const o=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,u.createElement)(g.ToolbarGroup,{controls:n}),r)}))):null}function Fr(e){let{group:t="default",...n}=e;const r=(0,u.useContext)(g.__experimentalToolbarContext),o=h[t].Slot,i=(0,g.__experimentalUseSlotFills)(o.__unstableName);return Boolean(i&&i.length)?"default"===t?(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r})):(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(o,c({},n,{bubblesVirtually:!0,fillProps:r}))):null}const Lr=Rr;Lr.Slot=Fr;const Dr=e=>(0,u.createElement)(Rr,c({group:"inline"},e));Dr.Slot=e=>(0,u.createElement)(Fr,c({group:"inline"},e));var Ur=Lr;var jr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var zr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var Vr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var Gr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var Hr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"}));var Wr=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}));var $r=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function qr(e,t,n,r){var o,i;let l="";return null!=t&&null!==(o=t[n])&&void 0!==o&&null!==(i=o.spacingStyles)&&void 0!==i&&i.length&&r&&t[n].spacingStyles.forEach((t=>{l+=`${Kr(e,t.selector.trim())} { `,l+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||r}`})).join("; "),l+="; }"})),l}function Jr(e){const{contentSize:t,wideSize:n,type:r="default"}=e,o={},i=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return i.test(t)&&"constrained"===r&&(o.none=(0,_.sprintf)((0,_.__)("Max %s wide"),t)),i.test(n)&&(o.wide=(0,_.sprintf)((0,_.__)("Max %s wide"),n)),o}const Yr=(0,u.createContext)({refs:new Map,callbacks:new Map});function Qr(e){let{children:t}=e;const n=(0,u.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,u.createElement)(Yr.Provider,{value:n},t)}function Zr(e){const{refs:t,callbacks:n}=(0,u.useContext)(Yr),r=(0,u.useRef)();return(0,u.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,f.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function Xr(e){const{refs:t}=(0,u.useContext)(Yr),n=(0,u.useRef)();return n.current=e,(0,u.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function eo(e){const{callbacks:t}=(0,u.useContext)(Yr),n=Xr(e),[r,o]=(0,u.useState)(null);return(0,u.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}function to(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function no(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function ro(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const oo={all:(0,_.__)("All sides"),top:(0,_.__)("Top"),bottom:(0,_.__)("Bottom"),left:(0,_.__)("Left"),right:(0,_.__)("Right"),mixed:(0,_.__)("Mixed"),vertical:(0,_.__)("Vertical"),horizontal:(0,_.__)("Horizontal")},io={top:void 0,right:void 0,bottom:void 0,left:void 0},lo=["top","right","bottom","left"];function ao(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function so(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lo;return Object.values(e).length>=1&&Object.values(e).length1}function co(e){return null!=e&&Object.values(e).filter((e=>!!e)).length>0}var uo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const po=["color","border","dimensions","typography","spacing"],fo={"color.palette":e=>e.colors,"color.gradients":e=>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=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},mo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function yo(e){const{name:t,clientId:n}=Nr();return(0,m.useSelect)((r=>{if(po.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let o=(0,s.applyFilters)("blockEditor.useSetting.before",void 0,e,n,t);if(void 0!==o)return o;const i=(e=>mo[e]||e)(e),l=[n,...r(xr).getBlockParents(n,!0)];for(const e of l){const n=r(xr).getBlockName(e);if((0,a.hasBlockSupport)(n,"__experimentalSettings",!1)){var c;const n=r(xr).getBlockAttributes(e);if(o=null!==(c=(0,y.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==c?c:(0,y.get)(n,`settings.${i}`),void 0!==o)break}}const u=r(xr).getSettings();if(void 0===o){var p;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;o=null!==(p=(0,y.get)(u,n))&&void 0!==p?p:(0,y.get)(u,e)}var d,f;if(void 0!==o)return a.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(f=o.custom)&&void 0!==f?f:o.theme)&&void 0!==d?d:o.default:o;const m=fo[i]?fo[i](u):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,n,e])}const go={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1}};function ho(e){var t,n,r,o,i;let{spacingSizes:l,value:a,side:s,onChange:c,isMixed:p=!1,type:f,minimumCustomValue:y,onMouseOver:h,onMouseOut:v}=e;a=function(e,t){if(to(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(a,l);let b=l;const k=l.length<=8,E=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[S,w]=(0,u.useState)(!E&&void 0!==a&&!to(a)),C=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]});let I=null;!k&&!S&&void 0!==a&&(!to(a)||to(a)&&p)?(b=[...l,{name:p?(0,_.__)("Mixed"):(0,_.sprintf)((0,_.__)("Custom (%s)"),a),slug:"custom",size:a}],I=b.length-1):p||(I=S?function(e,t){if(!to(e))return e;const n=ro(e),r=t.find((e=>String(e.slug)===n));return null==r?void 0:r.size}(a,l):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":ro(e),r=t.findIndex((e=>String(e.slug)===n));return-1!==r?r:NaN}(a,l));const A=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(I)),[I])[1]||C[0].value,x=e=>{var t;return void 0===a||null===(t=l[e])||void 0===t?void 0:t.name},B=parseFloat(I,10),P=(e,t)=>{var n;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(n=l[e])||void 0===n?void 0:n.slug}`},T=p?(0,_.__)("Mixed"):null,O=p?(0,_.__)("Mixed"):x(I),N=b.map(((e,t)=>({key:t,name:e.name}))),M=l.map(((e,t)=>({value:t,label:void 0}))),R=(0,_.sprintf)((0,_.__)("%1$s %2$s"),oo[s],null==f?void 0:f.toLowerCase()),F=k&&!S&&void 0!==O;return(0,u.createElement)(u.Fragment,null,"all"!==s&&(0,u.createElement)(g.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},oo[s]),F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},O)),"all"===s&&F&&(0,u.createElement)(g.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},O),!E&&(0,u.createElement)(g.Button,{label:S?(0,_.__)("Use size preset"):(0,_.__)("Set custom size"),icon:uo,onClick:()=>{w(!S)},isPressed:S,isSmall:!0,className:d()({"components-spacing-sizes-control__custom-toggle-all":"all"===s,"components-spacing-sizes-control__custom-toggle-single":"all"!==s}),iconSize:24}),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalUnitControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,onChange:e=>c((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:I,units:C,min:y,placeholder:T,disableUnits:p,label:R,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",size:"__unstable-large"}),(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v,value:B,min:0,max:null!==(t=null===(n=go[A])||void 0===n?void 0:n.max)&&void 0!==t?t:10,step:null!==(r=null===(o=go[A])||void 0===o?void 0:o.steps)&&void 0!==r?r:.1,withInputField:!1,onChange:e=>{c([e,A].join(""))},className:"components-spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0})),k&&!S&&(0,u.createElement)(g.RangeControl,{onMouseOver:h,onMouseOut:v,className:"components-spacing-sizes-control__range-control",value:I,onChange:e=>c(P(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===a&&c("0")},withInputField:!1,"aria-valuenow":I,"aria-valuetext":null===(i=l[I])||void 0===i?void 0:i.name,renderTooltipContent:x,min:0,max:l.length-1,marks:M,label:R,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:h,onBlur:v}),!k&&!S&&(0,u.createElement)(g.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:N.find((e=>e.key===I))||"",onChange:e=>{c(P(e.selectedItem.key,"selectList"))},options:N,label:R,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0,size:"__unstable-large",onMouseOver:h,onMouseOut:v,onFocus:h,onBlur:v}))}function vo(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao(Object.values(e))}(n),p=co(n)&&so(n,r);return(0,u.createElement)(ho,{value:c,onChange:e=>{const o=(0,g.__experimentalApplyValueToSides)(n,e,r);t(o)},side:"all",spacingSizes:o,isMixed:p,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})}function bo(e){let{values:t,sides:n,onChange:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=null!=n&&n.length?lo.filter((e=>n.includes(e))):lo,p=e=>n=>{const o={...t};o[e]=n,r(o)};return(0,u.createElement)(u.Fragment,null,c.map((e=>(0,u.createElement)(ho,{value:t[e],label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:p(e),spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}))))}const _o=["vertical","horizontal"];function ko(e){let{onChange:t,values:n,sides:r,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s}=e;const c=e=>r=>{if(!t)return;const o={...n};"vertical"===e&&(o.top=r,o.bottom=r),"horizontal"===e&&(o.left=r,o.right=r),t(o)},p=null!=r&&r.length?_o.filter((e=>r.includes(e))):_o;return(0,u.createElement)(u.Fragment,null,p.map((e=>{const t="vertical"===e?n.top:n.left;return(0,u.createElement)(ho,{value:t,onChange:c(e),label:oo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:o,type:i,minimumCustomValue:l,onMouseOver:a,onMouseOut:s})})))}var Eo=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var So=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 wo(e){let{isLinked:t,onClick:n}=e;const r=t?(0,_.__)("Unlink sides"):(0,_.__)("Link sides");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,u.createElement)(g.Button,{isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r,onClick:n})))}function Co(e){let{inputProps:t,onChange:n,label:r=(0,_.__)("Spacing Control"),values:o,sides:i,splitOnAxis:l=!1,useSelect:a,minimumCustomValue:s=0,onMouseOver:p,onMouseOut:f}=e;const m=[{name:0,slug:"0",size:0},...yo("spacing.spacingSizes")||[]];m.length>8&&m.unshift({name:(0,_.__)("Default"),slug:"default",size:void 0});const y=o||io,h=co(o),v=1===(null==i?void 0:i.length),[b,k]=(0,u.useState)(!h||!so(y,i)||v),E={...t,onChange:e=>{const t={...o,...e};n(t)},isLinked:b,sides:i,values:y,spacingSizes:m,useSelect:a,type:r,minimumCustomValue:s,onMouseOver:p,onMouseOut:f};return(0,u.createElement)("fieldset",{className:d()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},r),!v&&(0,u.createElement)(wo,{onClick:()=>{k(!b)},isLinked:b}),b&&(0,u.createElement)(vo,c({"aria-label":r},E)),!b&&l&&(0,u.createElement)(ko,E),!b&&!l&&(0,u.createElement)(bo,E))}window.wp.warning;const Io=(0,g.createSlotFill)("InspectorControls"),Ao=(0,g.createSlotFill)("InspectorAdvancedControls"),xo=(0,g.createSlotFill)("InspectorControlsBorder"),Bo=(0,g.createSlotFill)("InspectorControlsColor"),Po=(0,g.createSlotFill)("InspectorControlsDimensions"),To=(0,g.createSlotFill)("InspectorControlsPosition"),Oo=(0,g.createSlotFill)("InspectorControlsTypography");var No={default:Io,advanced:Ao,border:xo,color:Bo,dimensions:Po,list:(0,g.createSlotFill)("InspectorControlsListView"),settings:Io,styles:(0,g.createSlotFill)("InspectorControlsStyles"),typography:Oo,position:To};function Mo(e){var t;let{children:n,group:r="default",__experimentalGroup:o}=e;o&&($()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=o);const i=Mr(),l=null===(t=No[r])||void 0===t?void 0:t.Fill;return l?i?(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(l,null,(e=>{const t=(0,y.isEmpty)(e)?null:e;return(0,u.createElement)(g.__experimentalToolsPanelContext.Provider,{value:t},n)}))):null:("undefined"!=typeof process&&process.env,null)}const Ro=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,y.mapValues)(e,Ro)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,y.isEmpty)(t)?void 0:t};function Fo(e){return"object"==typeof e?{...Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,Fo(n)]})))}:e}function Lo(e,t,n){const r=function(e){return Array.isArray(e)?e:"number"==typeof e?[e.toString()]:[e]}(t),o=e?Fo(e):{};return r.reduce(((e,t,o)=>(void 0===e[t]&&(e[t]={}),o===r.length-1&&(e[t]=n),e[t])),o),o}function Do(e,t,n,r,o,i){var l;if(Object.values(null!=e?e:{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,r]=e;r&&t[n].forEach((e=>{const t=(0,y.get)(a,e);t&&(c={...c,attributes:Lo(c.attributes,e,t)})}))})),c}function Uo(e,t,n){const r=(0,a.getBlockSupport)(e,t),o=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(o)?o.includes(n):o}function jo(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,m.useDispatch)(xr),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:a,hasMultiSelection:s}=(0,m.useSelect)(xr),c=a(),p=(0,u.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=s()?l():[c];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Ro(o.style)},t[n]=o})),o(n,t,!0)}),[Ro,i,l,s,c,o]);return(0,u.createElement)(g.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:c,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function zo(e){let{Slot:t,...n}=e;const r=(0,u.useContext)(g.__experimentalToolsPanelContext);return(0,u.createElement)(t,c({},n,{fillProps:r,bubblesVirtually:!0}))}function Vo(e){var t;let{__experimentalGroup:n,group:r="default",label:o,...i}=e;n&&($()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),r=n);const l=null===(t=No[r])||void 0===t?void 0:t.Slot,a=(0,g.__experimentalUseSlot)(null==l?void 0:l.__unstableName),s=(0,g.__experimentalUseSlotFills)(null==l?void 0:l.__unstableName);if(!l||!a)return"undefined"!=typeof process&&process.env,null;return Boolean(s&&s.length)?o?(0,u.createElement)(jo,{group:r,label:o},(0,u.createElement)(zo,c({},i,{Slot:l}))):(0,u.createElement)(l,c({},i,{bubblesVirtually:!0})):null}const Go=Mo;Go.Slot=Vo;const Ho=e=>(0,u.createElement)(Mo,c({},e,{group:"advanced"}));Ho.Slot=e=>(0,u.createElement)(Vo,c({},e,{group:"advanced"})),Ho.slotName="InspectorAdvancedControls";var Wo=Go,$o=window.wp.isShallowEqual,Ko=n.n($o);var qo=function(e){return(0,f.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])};const Jo=Number.MAX_SAFE_INTEGER;var Yo=(0,u.forwardRef)((function(e,t){let{clientId:n,bottomClientId:r,children:o,__unstableRefreshSize:i,__unstableCoverTarget:l=!1,__unstablePopoverSlot:a,__unstableContentRef:s,shift:p=!0,...m}=e;const y=eo(n),h=eo(null!=r?r:n),v=(0,f.useMergeRefs)([t,qo(s)]),[b,_]=(0,u.useReducer)((e=>(e+1)%Jo),0);(0,u.useLayoutEffect)((()=>{if(!y)return;const e=new window.MutationObserver(_);return e.observe(y,{attributes:!0}),()=>{e.disconnect()}}),[y]);const k=(0,u.useMemo)((()=>b<0||!y||h!==y?{}:{position:"absolute",width:y.offsetWidth,height:y.offsetHeight}),[y,h,i,b]),E=(0,u.useMemo)((()=>{if(!(b<0||!y||r&&!h))return{getBoundingClientRect(){var e,t,n,r;const o=y.getBoundingClientRect(),i=null==h?void 0:h.getBoundingClientRect(),l=Math.min(o.left,null!==(e=null==i?void 0:i.left)&&void 0!==e?e:1/0),a=Math.min(o.top,null!==(t=null==i?void 0:i.top)&&void 0!==t?t:1/0),s=Math.max(o.right,null!==(n=i.right)&&void 0!==n?n:-1/0)-l,c=Math.max(o.bottom,null!==(r=i.bottom)&&void 0!==r?r:-1/0)-a;return new window.DOMRect(l,a,s,c)},ownerDocument:y.ownerDocument}}),[r,h,y,b]);return!y||r&&!h?null:(0,u.createElement)(g.Popover,c({ref:v,animate:!1,focusOnMount:!1,anchor:E,__unstableSlotName:a||null,placement:"top-start",resize:!1,flip:!1,shift:p},m,{className:d()("block-editor-block-popover",m.className),variant:"unstyled"}),l&&(0,u.createElement)("div",{style:k},o),!l&&o)}));function Qo(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.margin)}function Zo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.margin"),n=!Si(e,"margin");return!Qo(e)||t||n}function Xo(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"margin"),d=p&&p.some((e=>vi.includes(e)));if(Zo(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.margin,onChange:f,label:(0,_.__)("Margin"),sides:p,units:c,allowReset:!1,splitOnAxis:!1,onMouseOver:l,onMouseOut:a})),native:null})}function ei(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,a=(0,u.useMemo)((()=>{const e=null!=l&&l.top?no(null==l?void 0:l.top):0,t=null!=l&&l.right?no(null==l?void 0:l.right):0,n=null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,r=null!=l&&l.left?no(null==l?void 0:l.left):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:r,top:e?`calc(${e} * -1)`:0,right:t?`calc(${t} * -1)`:0,bottom:n?`calc(${n} * -1)`:0,left:r?`calc(${r} * -1)`:0}}),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}const ti={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1}};function ni(e){var t,n,r,o,i;let{label:l=(0,_.__)("Height"),onChange:a,value:s}=e;const c=parseFloat(s),p=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vh","vw"]}),d=(0,u.useMemo)((()=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s)),[s])[1]||(null===(t=p[0])||void 0===t?void 0:t.value)||"px";return(0,u.createElement)("fieldset",{className:"block-editor-height-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},l),(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalUnitControl,{value:s,units:p,onChange:a,onUnitChange:e=>{const[t,n]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(s);["em","rem"].includes(e)&&"px"===n?a((t/16).toFixed(2)+e):["em","rem"].includes(n)&&"px"===e?a(Math.round(16*t)+e):["vh","vw","%"].includes(e)&&t>100&&a(100+e)},min:0,size:"__unstable-large"})),(0,u.createElement)(g.FlexItem,{isBlock:!0},(0,u.createElement)(g.__experimentalSpacer,{marginX:2,marginBottom:0},(0,u.createElement)(g.RangeControl,{value:c,min:0,max:null!==(n=null===(r=ti[d])||void 0===r?void 0:r.max)&&void 0!==n?n:100,step:null!==(o=null===(i=ti[d])||void 0===i?void 0:i.step)&&void 0!==o?o:.1,withInputField:!1,onChange:e=>{a([e,d].join(""))},__nextHasNoMarginBottom:!0})))))}function ri(e){const t=(0,a.getBlockSupport)(e,yi);return!!(!0===t||null!=t&&t.minHeight)}function oi(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("dimensions.minHeight");return!ri(e)||t}function ii(e){var t;const{attributes:{style:n},setAttributes:r}=e;if(oi(e))return null;return(0,u.createElement)(ni,{label:(0,_.__)("Min. height"),value:null==n||null===(t=n.dimensions)||void 0===t?void 0:t.minHeight,onChange:e=>{const t={...n,dimensions:{...null==n?void 0:n.dimensions,minHeight:e}};r({style:Ro(t)})}})}function li(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.padding)}function ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.padding"),n=!Si(e,"padding");return!li(e)||t||n}function si(e){var t,n;const{name:r,attributes:{style:o},setAttributes:i,onMouseOver:l,onMouseOut:a}=e,s=yo("spacing.spacingSizes"),c=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),p=Ei(r,"padding"),d=p&&p.some((e=>vi.includes(e)));if(ai(e))return null;const f=e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};i({style:Ro(t)})};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!s||0===(null==s?void 0:s.length))&&(0,u.createElement)(g.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a}),(null==s?void 0:s.length)>0&&(0,u.createElement)(Co,{values:null==o||null===(n=o.spacing)||void 0===n?void 0:n.padding,onChange:f,label:(0,_.__)("Padding"),sides:p,units:c,allowReset:!1,splitOnAxis:d,onMouseOver:l,onMouseOut:a})),native:null})}function ci(e){var t,n;let{clientId:r,attributes:o,forceShow:i}=e;const l=null==o||null===(t=o.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,a=(0,u.useMemo)((()=>({borderTopWidth:null!=l&&l.top?no(null==l?void 0:l.top):0,borderRightWidth:null!=l&&l.right?no(null==l?void 0:l.right):0,borderBottomWidth:null!=l&&l.bottom?no(null==l?void 0:l.bottom):0,borderLeftWidth:null!=l&&l.left?no(null==l?void 0:l.left):0})),[l]),[s,c]=(0,u.useState)(!1),p=(0,u.useRef)(l),d=(0,u.useRef)();return(0,u.useEffect)((()=>(Ko()(l,p.current)||i||(c(!0),p.current=l,d.current=setTimeout((()=>{c(!1)}),400)),()=>{c(!1),d.current&&window.clearTimeout(d.current)})),[l,i]),s||i?(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstableRefreshSize:l,__unstablePopoverSlot:"block-toolbar",shift:!1},(0,u.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function ui(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,_.__)("Stretch to fill available space."):"fixed"===e?"horizontal"===n?(0,_.__)("Specify a fixed width."):(0,_.__)("Specify a fixed height."):(0,_.__)("Fit contents.")}function pi(e){let{attributes:t,setAttributes:n,__unstableParentLayout:r}=e;const{style:o={}}=t,{layout:i={}}=o,{selfStretch:l,flexSize:a}=i;return(0,u.useEffect)((()=>{"fixed"!==l||a||n({style:{...o,layout:{...i,selfStretch:"fit"}}})}),[]),(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:mi(r),value:l||"fit",help:ui(l,r),onChange:e=>{const t="fixed"!==e?null:a;n({style:{...o,layout:{...i,selfStretch:e,flexSize:t}}})},isBlock:!0},(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fit",value:"fit",label:(0,_.__)("Fit")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fill",value:"fill",label:(0,_.__)("Fill")}),(0,u.createElement)(g.__experimentalToggleGroupControlOption,{key:"fixed",value:"fixed",label:(0,_.__)("Fixed")})),"fixed"===l&&(0,u.createElement)(g.__experimentalUnitControl,{size:"__unstable-large",onChange:e=>{n({style:{...o,layout:{...i,flexSize:e}}})},value:a}))}function di(e){let{__unstableParentLayout:t={}}=e;const{type:n="default",default:{type:r="default"}={},allowSizingOnChildren:o=!1}=t;return("flex"===r||"flex"===n)&&o}function fi(e){const t=!yo("layout");return!di(e)||t}function mi(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,_.__)("Width"):(0,_.__)("Height")}const yi="dimensions",gi="spacing",hi=["top","right","bottom","left"],vi=["vertical","horizontal"];function bi(){const[e,t]=(0,u.useState)(!1),{hideBlockInterface:n,showBlockInterface:r}=Ir((0,m.useDispatch)(xr));return{isMouseOver:e,onMouseOver:e=>{e.stopPropagation(),n(),t(!0)},onMouseOut:e=>{e.stopPropagation(),r(),t(!1)}}}function _i(e){const t=Ai(e),n=ai(e),r=Zo(e),o=oi(e),i=fi(e),l=ki(e),s=function(e){if("web"!==u.Platform.OS)return!1;const{name:t}=e;return wi(t)||ri(t)||li(t)||Qo(t)||di(e)}(e),p=yo("spacing.spacingSizes"),f=bi(),m=bi();if(l||!s)return null;const y=(0,a.getBlockSupport)(e.name,[yi,"__experimentalDefaultControls"]),h=(0,a.getBlockSupport)(e.name,[gi,"__experimentalDefaultControls"]),v=(e,t)=>n=>{var r;return{...n,style:{...n.style,[t]:{...null===(r=n.style)||void 0===r?void 0:r[t],[e]:void 0}}}},b=d()({"tools-panel-item-spacing":p&&p.length>0}),{__unstableParentLayout:k}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,{group:"dimensions"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:v("padding","spacing"),isShownByDefault:null==h?void 0:h.padding,panelId:e.clientId},(0,u.createElement)(si,c({onMouseOver:f.onMouseOver,onMouseOut:f.onMouseOut},e))),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:v("margin","spacing"),isShownByDefault:null==h?void 0:h.margin,panelId:e.clientId},(0,u.createElement)(Xo,c({onMouseOver:m.onMouseOver,onMouseOut:m.onMouseOut},e))),!t&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:b,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,_.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:v("blockGap","spacing"),isShownByDefault:null==h?void 0:h.blockGap,panelId:e.clientId},(0,u.createElement)(xi,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.dimensions)||void 0===n?void 0:n.minHeight)}(e),label:(0,_.__)("Min. height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,dimensions:{...null==r?void 0:r.dimensions,minHeight:void 0}})})}(e),resetAllFilter:v("minHeight","dimensions"),isShownByDefault:null==y?void 0:y.minHeight,panelId:e.clientId},(0,u.createElement)(ii,e)),!i&&(0,u.createElement)(g.__experimentalVStack,{as:g.__experimentalToolsPanelItem,spacing:2,hasValue:()=>function(e){var t;return void 0!==(null===(t=e.attributes.style)||void 0===t?void 0:t.layout)}(e),label:mi(k),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,layout:void 0}})}(e),resetAllFilter:v("selfStretch","layout"),isShownByDefault:!1,panelId:e.clientId},(0,u.createElement)(pi,e))),!n&&(0,u.createElement)(ci,c({forceShow:f.isMouseOver},e)),!r&&(0,u.createElement)(ei,c({forceShow:m.isMouseOver},e)))}const ki=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Ai(e),n=oi(e),r=ai(e),o=Zo(e),i=fi(e);return t&&n&&r&&o&&i};function Ei(e,t){var n;const r=(0,a.getBlockSupport)(e,gi);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Si(e,t){const n=Ei(e,t);return!(n&&n.some((e=>hi.includes(e)))&&n.some((e=>vi.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function wi(e){const t=(0,a.getBlockSupport)(e,gi);return!!(!0===t||null!=t&&t.blockGap)}function Ci(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Ii(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Ci(e);if(!n)return null;const r=no(null==n?void 0:n.top)||t,o=no(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}function Ai(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("spacing.blockGap");return!wi(e)||t}function xi(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=yo("spacing.spacingSizes"),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]}),s=Ei(o,"blockGap"),c=Xr(n);if(Ai(e))return null;const p=s&&s.some((e=>vi.includes(e))),d=e=>{var t;let n=e;e&&p?n={...Ci(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:Ro(o)});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 a;c.current&&l&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},f=Ci(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),m=p?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:{top:null==f?void 0:f.top};return u.Platform.select({web:(0,u.createElement)(u.Fragment,null,(!l||0===(null==l?void 0:l.length))&&(p?(0,u.createElement)(g.__experimentalBoxControl,{label:(0,_.__)("Block spacing"),min:0,onChange:d,units:a,sides:s,values:m,allowReset:!1,splitOnAxis:p}):(0,u.createElement)(g.__experimentalUnitControl,{label:(0,_.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:a,value:m})),(null==l?void 0:l.length)>0&&(0,u.createElement)(Co,{values:m,onChange:d,label:(0,_.__)("Block spacing"),sides:p?s:["top"],units:a,allowReset:!1,splitOnAxis:p})),native:null})}const Bi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Pi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),Ti=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Oi=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),Ni=(0,u.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(g.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),Mi={top:{icon:Ti,title:(0,_._x)("Align top","Block vertical alignment setting")},center:{icon:Pi,title:(0,_._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Bi,title:(0,_._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:Oi,title:(0,_._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:Ni,title:(0,_._x)("Space between","Block vertical alignment setting")}},Ri=["top","center","bottom"];var Fi=function(e){let{value:t,onChange:n,controls:r=Ri,isCollapsed:o=!0,isToolbar:i}=e;const l=Mi[t],a=Mi.top,s=i?g.ToolbarGroup:g.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{popoverProps:{variant:"toolbar"}};return(0,u.createElement)(s,c({icon:l?l.icon:a.icon,label:(0,_._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...Mi[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const Li=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!1})),Di=e=>(0,u.createElement)(Fi,c({},e,{isToolbar:!0})),Ui={left:jr,center:zr,right:Vr,"space-between":Gr,stretch:Hr};var ji=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:l}=e;const a=e=>{r(e===o?void 0:e)},s=o?Ui[o]:Ui.left,p=[{name:"left",icon:jr,title:(0,_.__)("Justify items left"),isActive:"left"===o,onClick:()=>a("left")},{name:"center",icon:zr,title:(0,_.__)("Justify items center"),isActive:"center"===o,onClick:()=>a("center")},{name:"right",icon:Vr,title:(0,_.__)("Justify items right"),isActive:"right"===o,onClick:()=>a("right")},{name:"space-between",icon:Gr,title:(0,_.__)("Space between items"),isActive:"space-between"===o,onClick:()=>a("space-between")},{name:"stretch",icon:Hr,title:(0,_.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>a("stretch")}],d=l?g.ToolbarGroup:g.ToolbarDropdownMenu,f=l?{isCollapsed:n}:{};return(0,u.createElement)(d,c({icon:s,popoverProps:i,label:(0,_.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},f))};const zi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!1})),Vi=e=>(0,u.createElement)(ji,c({},e,{isToolbar:!0})),Gi={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Hi={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Wi={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},$i=["wrap","nowrap"];var Ki={name:"flex",label:(0,_.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Flex,null,(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(Ji,{layout:t,onChange:n})),(0,u.createElement)(g.FlexItem,null,o&&(0,u.createElement)(Qi,{layout:t,onChange:n}))),(0,u.createElement)(Yi,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(Ji,{layout:t,onChange:n,isToolbar:!0}),o&&(0,u.createElement)(qi,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o,style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{orientation:c="horizontal"}=o,u=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Uo(l,"spacing","blockGap")?Ii(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,p=Gi[o.justifyContent],d=$i.includes(o.flexWrap)?o.flexWrap:"wrap",f=Wi[o.verticalAlignment],m=Hi[o.justifyContent]||Hi.left;let y="";const g=[];return d&&"wrap"!==d&&g.push(`flex-wrap: ${d}`),"horizontal"===c?(f&&g.push(`align-items: ${f}`),p&&g.push(`justify-content: ${p}`)):(f&&g.push(`justify-content: ${f}`),g.push("flex-direction: column"),g.push(`align-items: ${m}`)),g.length&&(y=`${Kr(r)} {\n\t\t\t\t${g.join("; ")};\n\t\t\t}`),a&&u&&(y+=qr(r,s,"flex",u)),y},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments(){return[]}};function qi(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{orientation:o="horizontal"}=t,i="horizontal"===o?Wi.center:Wi.top,{verticalAlignment:l=i}=t,a=e=>{n({...t,verticalAlignment:e})};if(r)return(0,u.createElement)(Li,{onChange:a,value:l,controls:"horizontal"===o?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]});const s=[{value:"flex-start",label:(0,_.__)("Align items top")},{value:"center",label:(0,_.__)("Align items center")},{value:"flex-end",label:(0,_.__)("Align items bottom")}];return(0,u.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,u.createElement)("legend",null,(0,_.__)("Vertical alignment")),(0,u.createElement)("div",null,s.map(((e,t,n)=>(0,u.createElement)(g.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>a(e)})))))}function Ji(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===i?a.push("space-between"):a.push("stretch"),r)return(0,u.createElement)(zi,{allowedControls:a,value:o,onChange:l,popoverProps:{position:"bottom right",variant:"toolbar"}});const s=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}];return"horizontal"===i?s.push({value:"space-between",icon:Gr,label:(0,_.__)("Space between items")}):s.push({value:"stretch",icon:Hr,label:(0,_.__)("Stretch items")}),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:o,onChange:l,className:"block-editor-hooks__flex-layout-justification-controls"},s.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})})))}function Yi(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,u.createElement)(g.ToggleControl,{label:(0,_.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function Qi(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal",verticalAlignment:o,justifyContent:i}=t;return(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,_.__)("Orientation"),value:r,onChange:e=>{let r=o,l=i;return"horizontal"===e?("space-between"===o&&(r="center"),"stretch"===i&&(l="left")):("stretch"===o&&(r="top"),"space-between"===i&&(l="left")),n({...t,orientation:e,verticalAlignment:r,justifyContent:l})}},(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:Wr,value:"horizontal",label:(0,_.__)("Horizontal")}),(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{icon:$r,value:"vertical",label:(0,_.__)("Vertical")}))}var Zi={name:"default",label:(0,_.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:r,blockName:o,hasBlockGapSupport:i,layoutDefinitions:l}=e;const a=Ii(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let s="";Uo(o,"spacing","blockGap")||(null!=a&&a.top?s=Ii(null==a?void 0:a.top):"string"==typeof a&&(s=Ii(a)));let c="";return i&&s&&(c+=qr(n,l,"default",s)),c},getOrientation(){return"vertical"},getAlignments(e,t){const n=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const r=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:o}=e;t&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:n.wide})}return r.unshift({name:"none",info:n.none}),r}};var Xi=function(e){let{icon:t,size:n=24,...r}=e;return(0,u.cloneElement)(t,{width:n,height:n,...r})};var el=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var tl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),nl=window.wp.styleEngine,rl={name:"constrained",label:(0,_.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o,justifyContent:i="center"}=t,l=[{value:"left",icon:jr,label:(0,_.__)("Justify items left")},{value:"center",icon:zr,label:(0,_.__)("Justify items center")},{value:"right",icon:Vr,label:(0,_.__)("Justify items right")}],a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["%","px","em","rem","vw"]});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,u.createElement)(Xi,{icon:el})),(0,u.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,u.createElement)(g.__experimentalUnitControl,{className:"block-editor-hooks__layout-controls-unit-input",label:(0,_.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,u.createElement)(Xi,{icon:tl}))),(0,u.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,_.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,u.createElement)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Justification"),value:i,onChange:e=>{n({...t,justifyContent:e})}},l.map((e=>{let{value:t,icon:n,label:r}=e;return(0,u.createElement)(g.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:r})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:r,layout:o={},style:i,blockName:l,hasBlockGapSupport:a,layoutDefinitions:s}=e;const{contentSize:c,wideSize:u,justifyContent:p}=o,d=Ii(null==i||null===(t=i.spacing)||void 0===t?void 0:t.blockGap);let f="";Uo(l,"spacing","blockGap")||(null!=d&&d.top?f=Ii(null==d?void 0:d.top):"string"==typeof d&&(f=Ii(d)));const m="left"===p?"0 !important":"auto !important",y="right"===p?"0 !important":"auto !important";let g=c||u?`\n\t\t\t\t\t${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${m};\n\t\t\t\t\t\tmargin-right: ${y};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===p?g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${m}; }`:"right"===p&&(g+=`${Kr(r,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${y}; }`),null!=i&&null!==(n=i.spacing)&&void 0!==n&&n.padding){(0,nl.getCSSRules)(i).forEach((e=>{"paddingRight"===e.key?g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(g+=`\n\t\t\t\t\t${Kr(r,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)}))}return a&&f&&(g+=qr(r,s,"constrained",f)),g},getOrientation(){return"vertical"},getAlignments(e){const t=Jr(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const ol=[Zi,Ki,rl];function il(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ol.find((t=>t.name===e))}const ll={type:"default"},al=(0,u.createContext)(ll),sl=al.Provider;function cl(){return(0,u.useContext)(al)}function ul(e){let{layout:t={},css:n,...r}=e;const o=il(t.type),i=null!==yo("spacing.blockGap");if(o){var l;if(n)return(0,u.createElement)("style",null,n);const e=null===(l=o.getLayoutStyle)||void 0===l?void 0:l.call(o,{hasBlockGapSupport:i,layout:t,...r});if(e)return(0,u.createElement)("style",null,e)}return null}const pl=[],dl=["none","left","center","right","wide","full"],fl=["wide","full"];function ml(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dl;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n,isBlockBasedTheme:r}=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout,isBlockBasedTheme:n.__unstableIsBlockBasedTheme}}),[]),o=cl(),i=il(null==o?void 0:o.type),l=i.getAlignments(o,r);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?pl:t}if("default"!==i.name&&"constrained"!==i.name)return pl;const{alignments:a=dl}=o,s=e.filter((e=>(o.alignments||t||!fl.includes(e))&&a.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?pl:s}var yl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var gl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var hl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var vl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));const bl={none:{icon:yl,title:(0,_._x)("None","Alignment option")},left:{icon:gl,title:(0,_.__)("Align left")},center:{icon:el,title:(0,_.__)("Align center")},right:{icon:hl,title:(0,_.__)("Align right")},wide:{icon:tl,title:(0,_.__)("Wide width")},full:{icon:vl,title:(0,_.__)("Full width")}},_l={variant:"toolbar"};var kl=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const l=ml(r);if(!!!l.length)return null;function a(e){n([t,"none"].includes(e)?void 0:e)}const s=bl[t],p=bl.none,f=o?g.ToolbarGroup:g.ToolbarDropdownMenu,m={icon:s?s.icon:p.icon,label:(0,_.__)("Align")},y=o?{isCollapsed:i,controls:l.map((e=>{let{name:n}=e;return{...bl[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>a(n)}}))}:{toggleProps:{describedBy:(0,_.__)("Change alignment")},popoverProps:_l,children:e=>{let{onClose:n}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},l.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=bl[r],s=r===t||!t&&"none"===r;return(0,u.createElement)(g.MenuItem,{key:r,icon:i,iconPosition:"left",className:d()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{a(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,u.createElement)(f,c({},m,y))};const El=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!1})),Sl=e=>(0,u.createElement)(kl,c({},e,{isToolbar:!0})),wl=["left","center","right","wide","full"],Cl=["wide","full"];function Il(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?wl.filter((t=>e.includes(t))):!0===e?[...wl]:[],!r||!0===e&&!n?t.filter((e=>!Cl.includes(e))):t}const Al=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,u.createElement)(e,t),{name:r}=t,o=ml(Il((0,a.getBlockSupport)(r,"align"),(0,a.hasBlockSupport)(r,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);if(!o.length||i)return n;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(El,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const o=(0,a.getBlockType)(t.name);(null==o||null===(n=o.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:o})),n)}),"withToolbarControls"),xl=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:o}=r,i=ml(Il((0,a.getBlockSupport)(n,"align"),(0,a.hasBlockSupport)(n,"alignWide",!0)));if(void 0===o)return(0,u.createElement)(e,t);let l=t.wrapperProps;return i.some((e=>e.name===o))&&(l={...l,"data-align":o}),(0,u.createElement)(e,c({},t,{wrapperProps:l}))}));(0,s.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...wl,""]}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",xl),(0,s.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Al),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Il((0,a.getBlockSupport)(t,"align"),(0,a.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=d()(`align${r}`,e.className)),e})),(0,s.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Bl=/[\s#]/g,Pl={type:"string",source:"attribute",attribute:"id",selector:"*"};const Tl=(0,f.createHigherOrderComponent)((e=>t=>{if((0,a.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===u.Platform.OS,r=(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,className:"html-anchor-control",label:(0,_.__)("HTML anchor"),help:(0,u.createElement)(u.Fragment,null,(0,_.__)("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,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/page-jumps/")},(0,_.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,_.__)("Add an anchor"),onChange:e=>{e=e.replace(Bl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&(0,u.createElement)(Wo,{group:"advanced"},r),!n&&"core/heading"===t.name&&(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Heading settings")},r)))}return(0,u.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Pl}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Tl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ol={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,s.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,a.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ol}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Nl=(0,f.createHigherOrderComponent)((e=>t=>(0,a.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),(0,u.createElement)(Wo,{group:"advanced"},(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,_.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,_.__)("Separate multiple classes with spaces.")}))):(0,u.createElement)(e,t)),"withInspectorControl");(0,s.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,a.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,s.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Nl),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,a.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=d()(e.className,n.className)),e})),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,a.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var o;const r=null===(o=t[n])||void 0===o?void 0:o.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,a.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,a.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,a.getBlockDefaultClassName)(t.name)),e}));var Ml=window.wp.dom;const Rl=(0,u.createContext)({});function Fl(e){let{value:t,children:n}=e;const r=(0,u.useContext)(Rl),o=(0,u.useMemo)((()=>({...r,...t})),[r,t]);return(0,u.createElement)(Rl.Provider,{value:o,children:n})}var Ll=Rl;const Dl={};var Ul=(0,g.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,a.getBlockType)(n),o=(0,u.useContext)(Ll),i=(0,u.useMemo)((()=>r&&r.usesContext?Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return r.usesContext.includes(t)}))):Dl),[r,o]);if(!r)return null;const l=r.edit||r.save;if(r.apiVersion>1)return(0,u.createElement)(l,c({},e,{context:i}));const s=(0,a.hasBlockSupport)(r,"className",!0)?(0,a.getBlockDefaultClassName)(n):null,p=d()(s,t.className,e.className);return(0,u.createElement)(l,c({},e,{context:i,className:p}))}));function jl(e){const{name:t,isSelected:n,clientId:r,attributes:o={},__unstableLayoutClassNames:i}=e,{layout:l=null}=o,s={name:t,isSelected:n,clientId:r,layout:(0,a.hasBlockSupport)(t,"__experimentalLayout",!1)?l:null,__unstableLayoutClassNames:i};return(0,u.createElement)(Or,{value:(0,u.useMemo)((()=>s),Object.values(s))},(0,u.createElement)(Ul,e))}var zl=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vl=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,u.createElement)("div",{style:{display:"contents",all:"initial"}},(0,u.createElement)("div",{className:d()(t,"block-editor-warning")},(0,u.createElement)("div",{className:"block-editor-warning__contents"},(0,u.createElement)("p",{className:"block-editor-warning__message"},r),(u.Children.count(n)>0||o)&&(0,u.createElement)("div",{className:"block-editor-warning__actions"},u.Children.count(n)>0&&u.Children.map(n,((e,t)=>(0,u.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,u.createElement)(g.DropdownMenu,{className:"block-editor-warning__secondary",icon:zl,label:(0,_.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,u.createElement)(g.MenuGroup,null,o.map(((e,t)=>(0,u.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},Gl=n(1973);function Hl(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,u.createElement)("div",{className:l},(0,u.createElement)("div",{className:"block-editor-block-compare__content"},(0,u.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,u.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,u.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(r)))),(0,u.createElement)("div",{className:"block-editor-block-compare__action"},(0,u.createElement)(g.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var Wl=function(e){let{block:t,onKeep:n,onConvert:r,convertor:o,convertButtonText:i}=e;const l=(s=o(t),(Array.isArray(s)?s:[s]).map((e=>(0,a.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const c=(p=t.originalContent,f=l,(0,Gl.Kx)(p,f).map(((e,t)=>{const n=d()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,u.createElement)("span",{key:t,className:n},e.value)})));var p,f;return(0,u.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,u.createElement)(Hl,{title:(0,_.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,_.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,u.createElement)(Hl,{title:(0,_.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:l}))};const $l=e=>(0,a.rawHandler)({HTML:e.originalContent});var Kl=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(xr).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(xr);return{convertToClassic(){r(n.clientId,(e=>(0,a.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,a.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,$l(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,a.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:o,block:i}=e;const l=!!(0,a.getBlockType)("core/html"),s=!!(0,a.getBlockType)("core/freeform"),[c,p]=(0,u.useState)(!1),d=(0,u.useCallback)((()=>p(!0)),[]),f=(0,u.useCallback)((()=>p(!1)),[]),m=(0,u.useMemo)((()=>[{title:(0,_._x)("Resolve","imperative verb"),onClick:d},l&&{title:(0,_.__)("Convert to HTML"),onClick:t},s&&{title:(0,_.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[d,l,t,s,r]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Vl,{actions:[(0,u.createElement)(g.Button,{key:"recover",onClick:o,variant:"primary"},(0,_.__)("Attempt Block Recovery"))],secondaryActions:m},(0,_.__)("This block contains unexpected or invalid content.")),c&&(0,u.createElement)(g.Modal,{title:(0,_.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},(0,u.createElement)(Wl,{block:i,onKeep:t,onConvert:n,convertor:$l,convertButtonText:(0,_.__)("Convert to Blocks")})))}));const ql=(0,u.createElement)(Vl,{className:"block-editor-block-list__block-crash-warning"},(0,_.__)("This block has encountered an error and cannot be previewed."));var Jl=()=>ql;class Yl extends u.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 Ql=Yl,Zl=n(773);var Xl=function(e){let{clientId:t}=e;const[n,r]=(0,u.useState)(""),o=(0,m.useSelect)((e=>e(xr).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(xr);return(0,u.useEffect)((()=>{r((0,a.getBlockContent)(o))}),[o]),(0,u.createElement)(Zl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,a.getBlockType)(o.name);if(!e)return;const l=(0,a.getBlockAttributes)(e,n,o.attributes),s=n||(0,a.getSaveContent)(e,l),[c]=n?(0,a.validateBlock)({...o,attributes:l,originalContent:s}):[!0];i(t,{attributes:l,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},ea=n(9196),ta=n.n(ea),na=Object.defineProperty,ra={};((e,t)=>{for(var n in t)na(e,n,{get:t[n],enumerable:!0})})(ra,{assign:()=>Fa,colors:()=>Na,createStringInterpolator:()=>Ba,skipAnimation:()=>Ma,to:()=>Pa,willAdvance:()=>Ra});var oa=_a(),ia=e=>ga(e,oa),la=_a();ia.write=e=>ga(e,la);var aa=_a();ia.onStart=e=>ga(e,aa);var sa=_a();ia.onFrame=e=>ga(e,sa);var ca=_a();ia.onFinish=e=>ga(e,ca);var ua=[];ia.setTimeout=(e,t)=>{const n=ia.now()+t,r=()=>{const e=ua.findIndex((e=>e.cancel==r));~e&&ua.splice(e,1),ma-=~e?1:0},o={time:n,handler:e,cancel:r};return ua.splice(pa(n),0,o),ma+=1,ha(),o};var pa=e=>~(~ua.findIndex((t=>t.time>e))||~ua.length);ia.cancel=e=>{aa.delete(e),sa.delete(e),ca.delete(e),oa.delete(e),la.delete(e)},ia.sync=e=>{ya=!0,ia.batchedUpdates(e),ya=!1},ia.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,ia.onStart(n)}return r.handler=e,r.cancel=()=>{aa.delete(n),t=null},r};var da="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ia.use=e=>da=e,ia.now="undefined"!=typeof performance?()=>performance.now():Date.now,ia.batchedUpdates=e=>e(),ia.catch=console.error,ia.frameLoop="always",ia.advance=()=>{"demand"!==ia.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ba()};var fa=-1,ma=0,ya=!1;function ga(e,t){ya?(t.delete(e),e(0)):(t.add(e),ha())}function ha(){fa<0&&(fa=0,"demand"!==ia.frameLoop&&da(va))}function va(){~fa&&(da(va),ia.batchedUpdates(ba))}function ba(){const e=fa;fa=ia.now();const t=pa(fa);t&&(ka(ua.splice(0,t),(e=>e.handler())),ma-=t),ma?(aa.flush(),oa.flush(e?Math.min(64,fa-e):16.667),sa.flush(),la.flush(),ca.flush()):fa=-1}function _a(){let e=new Set,t=e;return{add(n){ma+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return ma-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ma-=t.size,ka(t,(t=>t(n)&&e.add(t))),ma+=e.size,t=e)}}}function ka(e,t){e.forEach((e=>{try{t(e)}catch(e){ia.catch(e)}}))}function Ea(){}var Sa={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function wa(e,t){if(Sa.arr(e)){if(!Sa.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ia(e,t,n){if(Sa.arr(e))for(let r=0;rSa.und(e)?[]:Sa.arr(e)?e:[e];function xa(e,t){if(e.size){const n=Array.from(e);e.clear(),Ca(n,t)}}var Ba,Pa,Ta=(e,...t)=>xa(e,(e=>e(...t))),Oa=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Na=null,Ma=!1,Ra=Ea,Fa=e=>{e.to&&(Pa=e.to),e.now&&(ia.now=e.now),void 0!==e.colors&&(Na=e.colors),null!=e.skipAnimation&&(Ma=e.skipAnimation),e.createStringInterpolator&&(Ba=e.createStringInterpolator),e.requestAnimationFrame&&ia.use(e.requestAnimationFrame),e.batchedUpdates&&(ia.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ra=e.willAdvance),e.frameLoop&&(ia.frameLoop=e.frameLoop)},La=new Set,Da=[],Ua=[],ja=0,za={get idle(){return!La.size&&!Da.length},start(e){ja>e.priority?(La.add(e),ia.onStart(Va)):(Ga(e),ia(Wa))},advance:Wa,sort(e){if(ja)ia.onFrame((()=>za.sort(e)));else{const t=Da.indexOf(e);~t&&(Da.splice(t,1),Ha(e))}},clear(){Da=[],La.clear()}};function Va(){La.forEach(Ga),La.clear(),ia(Wa)}function Ga(e){Da.includes(e)||Ha(e)}function Ha(e){Da.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Da,(t=>t.priority>e.priority)),0,e)}function Wa(e){const t=Ua;for(let n=0;n0}var $a="[-+]?\\d*\\.?\\d+",Ka=$a+"%";function qa(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Ja=new RegExp("rgb"+qa($a,$a,$a)),Ya=new RegExp("rgba"+qa($a,$a,$a,$a)),Qa=new RegExp("hsl"+qa($a,Ka,Ka)),Za=new RegExp("hsla"+qa($a,Ka,Ka,$a)),Xa=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,es=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ts=/^#([0-9a-fA-F]{6})$/,ns=/^#([0-9a-fA-F]{8})$/;function rs(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 os(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=rs(o,r,e+1/3),l=rs(o,r,e),a=rs(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function is(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ls(e){return(parseFloat(e)%360+360)%360/360}function as(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ss(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function cs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ts.exec(e))?parseInt(t[1]+"ff",16)>>>0:Na&&void 0!==Na[e]?Na[e]:(t=Ja.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|255)>>>0:(t=Ya.exec(e))?(is(t[1])<<24|is(t[2])<<16|is(t[3])<<8|as(t[4]))>>>0:(t=Xa.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ns.exec(e))?parseInt(t[1],16)>>>0:(t=es.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Qa.exec(e))?(255|os(ls(t[1]),ss(t[2]),ss(t[3])))>>>0:(t=Za.exec(e))?(os(ls(t[1]),ss(t[2]),ss(t[3]))|as(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var us=(e,t,n)=>{if(Sa.fun(e))return e;if(Sa.arr(e))return us({range:e,output:t,extrapolate:n});if(Sa.str(e.output[0]))return Ba(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var ps=1.70158,ds=1.525*ps,fs=ps+1,ms=2*Math.PI/3,ys=2*Math.PI/4.5,gs=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>fs*e*e*e-ps*e*e,easeOutBack:e=>1+fs*Math.pow(e-1,3)+ps*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-ds)/2:(Math.pow(2*e-2,2)*((ds+1)*(2*e-2)+ds)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ms),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ms)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ys)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ys)/2+1,easeInBounce:e=>1-gs(1-e),easeOutBounce:gs,easeInOutBounce:e=>e<.5?(1-gs(1-2*e))/2:(1+gs(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},vs=Symbol.for("FluidValue.get"),bs=Symbol.for("FluidValue.observers"),_s=e=>Boolean(e&&e[vs]),ks=e=>e&&e[vs]?e[vs]():e,Es=e=>e[bs]||null;function Ss(e,t){const n=e[bs];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var ws=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Cs(this,e)}},Cs=(e,t)=>Bs(e,vs,t);function Is(e,t){if(e[vs]){let n=e[bs];n||Bs(e,bs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[bs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[bs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var xs,Bs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ps=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ts=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Os=new RegExp(`(${Ps.source})(%|[a-z]+)`,"i"),Ns=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ms=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Rs=e=>{const[t,n]=Fs(e);if(!t||Oa())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Ms.test(n)?Rs(n):n||e},Fs=e=>{const t=Ms.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Ls=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Ds=e=>{xs||(xs=Na?new RegExp(`(${Object.keys(Na).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>ks(e).replace(Ms,Rs).replace(Ts,cs).replace(xs,cs))),n=t.map((e=>e.match(Ps).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>us({...e,output:t})));return e=>{const n=!Os.test(t[0])&&t.find((e=>Os.test(e)))?.replace(Ps,"");let r=0;return t[0].replace(Ps,(()=>`${o[r++](e)}${n||""}`)).replace(Ns,Ls)}},Us="react-spring: ",js=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Us}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},zs=js(console.warn);var Vs=js(console.warn);function Gs(e){return Sa.str(e)&&("#"==e[0]||/\d/.test(e)||!Oa()&&Ms.test(e)||e in(Na||{}))}var Hs=Oa()?ea.useEffect:ea.useLayoutEffect;function Ws(){const e=(0,ea.useState)()[1],t=(()=>{const e=(0,ea.useRef)(!1);return Hs((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var $s=e=>(0,ea.useEffect)(e,Ks),Ks=[];function qs(e){const t=(0,ea.useRef)();return(0,ea.useEffect)((()=>{t.current=e})),t.current}var Js=Symbol.for("Animated:node"),Ys=e=>e&&e[Js],Qs=(e,t)=>{return n=e,r=Js,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},Zs=e=>e&&e[Js]&&e[Js].getPayload(),Xs=class{constructor(){Qs(this,this)}getPayload(){return this.payload||[]}},ec=class extends Xs{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Sa.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Sa.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Sa.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},tc=class extends ec{constructor(e){super(0),this._string=null,this._toString=us({output:[e,e]})}static create(e){return new tc(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Sa.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=us({output:[this.getValue(),e]})),this._value=0,super.reset()}},nc={dependencies:null},rc=class extends Xs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ia(this.source,((n,r)=>{var o;(o=n)&&o[Js]===o?t[r]=n.getValue(e):_s(n)?t[r]=ks(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ca(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ia(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){nc.dependencies&&_s(e)&&nc.dependencies.add(e);const t=Zs(e);t&&Ca(t,(e=>this.add(e)))}},oc=class extends rc{constructor(e){super(e)}static create(e){return new oc(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ic)),!0)}};function ic(e){return(Gs(e)?tc:ec).create(e)}function lc(e){const t=Ys(e);return t?t.constructor:Sa.arr(e)?oc:Gs(e)?tc:ec}var ac=(e,t)=>{const n=!Sa.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ea.forwardRef)(((r,o)=>{const i=(0,ea.useRef)(null),l=n&&(0,ea.useCallback)((e=>{i.current=function(e,t){e&&(Sa.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;nc.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new rc(e),nc.dependencies=null,[e,n]}(r,t),c=Ws(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new sc(u,s),d=(0,ea.useRef)();Hs((()=>(d.current=p,Ca(s,(e=>Is(e,p))),()=>{d.current&&(Ca(d.current.deps,(e=>As(e,d.current))),ia.cancel(d.current.update))}))),(0,ea.useEffect)(u,[]),$s((()=>()=>{const e=d.current;Ca(e.deps,(t=>As(t,e)))}));const f=t.getComponentProps(a.getValue());return ea.createElement(e,{...f,ref:l})}))},sc=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ia.write(this.update)}};var cc=Symbol.for("AnimatedComponent"),uc=e=>Sa.str(e)?e:e&&Sa.str(e.displayName)?e.displayName:Sa.fun(e)&&e.name||null;function pc(e,...t){return Sa.fun(e)?e(...t):e}var dc=(e,t)=>!0===e||!!(t&&e&&(Sa.fun(e)?e(t):Aa(e).includes(t))),fc=(e,t)=>Sa.obj(e)?t&&e[t]:e,mc=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,yc=e=>e,gc=(e,t=yc)=>{let n=hc;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);Sa.und(n)||(r[o]=n)}return r},hc=["config","onProps","onStart","onChange","onPause","onResume","onRest"],vc={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bc(e){const t=function(e){const t={};let n=0;if(Ia(e,((e,r)=>{vc[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ia(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function _c(e){return e=ks(e),Sa.arr(e)?e.map(_c):Gs(e)?ra.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kc(e){for(const t in e)return!0;return!1}function Ec(e){return Sa.fun(e)||Sa.arr(e)&&Sa.obj(e[0])}function Sc(e,t){e.ref?.delete(e),t?.delete(e)}function wc(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Cc={tension:170,friction:26,mass:1,damping:1,easing:hs.linear,clamp:!1};function Ic(e,t){if(Sa.und(t.decay)){const n=!Sa.und(t.tension)||!Sa.und(t.friction);!n&&Sa.und(t.frequency)&&Sa.und(t.damping)&&Sa.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Ac=[];function xc(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=dc(n.cancel??r?.cancel,t);if(u)f();else{Sa.und(n.pause)||(o.paused=dc(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||dc(e,t)),s=pc(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-ia.now()}function d(){s>0&&!ra.skipAnimation?(o.delayed=!0,c=ia.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var Bc=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Oc(e.get()):t.every((e=>e.noop))?Pc(e.get()):Tc(e.get(),t.every((e=>e.finished))),Pc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Tc=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Oc=e=>({value:e,cancelled:!0,finished:!1});function Nc(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=gc(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Oc(r)||o!==n.asyncId&&Tc(r,!1);if(t)throw e.result=t,p(e),e},m=(e,t)=>{const i=new Rc,l=new Fc;return(async()=>{if(ra.skipAnimation)throw Mc(n),l.result=Tc(r,!1),p(l),l;f(i);const a=Sa.obj(e)?{...e}:{...t,to:e};a.parentId=o,Ia(c,((e,t)=>{Sa.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let y;if(ra.skipAnimation)return Mc(n),Tc(r,!1);try{let t;t=Sa.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),d]),y=Tc(r.get(),!0,!1)}catch(e){if(e instanceof Rc)y=e.result;else{if(!(e instanceof Fc))throw e;y=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return Sa.fun(l)&&ia.batchedUpdates((()=>{l(y,r,r.item)})),y})():s}function Mc(e,t){xa(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Rc=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Fc=class extends Error{constructor(){super("SkipAnimationSignal")}},Lc=e=>e instanceof Uc,Dc=1,Uc=class extends ws{constructor(){super(...arguments),this.id=Dc++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ys(this);return e&&e.getValue()}to(...e){return ra.to(this,e)}interpolate(...e){return zs(`${Us}The "interpolate" function is deprecated in v9 (use "to" instead)`),ra.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ss(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||za.sort(this),Ss(this,{type:"priority",parent:this,priority:e})}},jc=Symbol.for("SpringPhase"),zc=e=>(1&e[jc])>0,Vc=e=>(2&e[jc])>0,Gc=e=>(4&e[jc])>0,Hc=(e,t)=>t?e[jc]|=3:e[jc]&=-3,Wc=(e,t)=>t?e[jc]|=4:e[jc]&=-5,$c=class extends Uc{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=Ac,this.toValues=null,this.fromValues=Ac,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Cc)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Sa.und(e)||!Sa.und(t)){const n=Sa.obj(e)?{...e}:{...t,from:e};Sa.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vc(this)||this._state.asyncTo)||Gc(this)}get goal(){return ks(this.animation.to)}get velocity(){const e=Ys(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return zc(this)}get isAnimating(){return Vc(this)}get isPaused(){return Gc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=Zs(r.to);!l&&_s(r.to)&&(o=Aa(ks(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==tc?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=Sa.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Sa.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!Sa.und(r),f=n==c?a.v0>0:nt,m||(u=Math.abs(c-p)<=d,!u));++e){s&&(y=p==c||p>c==f,y&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=Ys(this),s=a.getValue();if(t){const e=ks(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return ia.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vc(this)){const{to:e,config:t}=this.animation;ia.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Sa.und(e)?(n=this.queue||[],this.queue=[]):n=[Sa.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Bc(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Mc(this._state,e&&this._lastCallId),ia.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Sa.obj(n)?n[t]:n,(null==n||Ec(n))&&(n=void 0),r=Sa.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return zc(this)||(e.reverse&&([n,r]=[r,n]),r=ks(r),Sa.und(r)?Ys(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,gc(e,((e,t)=>/^on/.test(t)?fc(e,n):e))),Xc(this,e,"onProps"),eu(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return xc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Gc(this)||(Wc(this,!0),Ta(i.pauseQueue),eu(this,"onPause",Tc(this,Kc(this,this.animation.to)),this))},resume:()=>{Gc(this)&&(Wc(this,!1),Vc(this)&&this._resume(),Ta(i.resumeQueue),eu(this,"onResume",Tc(this,Kc(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=qc(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Oc(this));const r=!Sa.und(e.to),o=!Sa.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Oc(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!Sa.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!wa(p,c);d&&(a.from=p),p=ks(p);const f=!wa(u,s);f&&this._focus(u);const m=Ec(t.to),{config:y}=a,{decay:g,velocity:h}=y;(r||o)&&(y.velocity=0),t.config&&!m&&function(e,t,n){n&&(Ic(n={...n},t),t={...n,...t}),Ic(e,t),Object.assign(e,t);for(const t in Cc)null==e[t]&&(e[t]=Cc[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;Sa.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(y,pc(t.config,i),t.config!==l.config?pc(l.config,i):void 0);let v=Ys(this);if(!v||Sa.und(u))return n(Tc(this,!0));const b=Sa.und(t.reset)?o&&!t.default:!Sa.und(p)&&dc(t.reset,i),_=b?p:this.get(),k=_c(u),E=Sa.num(k)||Sa.arr(k)||Gs(k),S=!m&&(!E||dc(l.immediate||t.immediate,i));if(f){const e=lc(u);if(e!==v.constructor){if(!S)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(k)}}const w=v.constructor;let C=_s(u),I=!1;if(!C){const e=b||!zc(this)&&d;(f||e)&&(I=wa(_c(_),k),C=!I),(wa(a.immediate,S)||S)&&wa(y.decay,g)&&wa(y.velocity,h)||(C=!0)}if(I&&Vc(this)&&(a.changed&&!b?C=!0:C||this._stop(s)),!m&&((C||_s(s))&&(a.values=v.getPayload(),a.toValues=_s(u)?null:w==tc?[1]:Aa(k)),a.immediate!=S&&(a.immediate=S,S||b||this._set(s)),C)){const{onRest:e}=a;Ca(Zc,(e=>Xc(this,t,e)));const r=Tc(this,Kc(this,s));Ta(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&ia.batchedUpdates((()=>{a.changed=!b,e?.(r,this),b?pc(l.onRest,r):a.onStart?.(r,this)}))}b&&this._set(_),m?n(Nc(t.to,t,this._state,this)):C?this._start():Vc(this)&&!f?this._pendingCalls.add(n):n(Pc(_))}_focus(e){const t=this.animation;e!==t.to&&(Es(this)&&this._detach(),t.to=e,Es(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_s(t)&&(Is(t,this),Lc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_s(e)&&As(e,this)}_set(e,t=!0){const n=ks(e);if(!Sa.und(n)){const e=Ys(this);if(!e||!wa(n,e.getValue())){const r=lc(n);e&&e.constructor==r?e.setValue(n):Qs(this,r.create(n)),e&&ia.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ys(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,eu(this,"onStart",Tc(this,Kc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pc(this.animation.onChange,e,this)),pc(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ys(this).reset(ks(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Vc(this)||(Hc(this,!0),Gc(this)||this._resume())}_resume(){ra.skipAnimation?this.finish():za.start(this)}_stop(e,t){if(Vc(this)){Hc(this,!1);const n=this.animation;Ca(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ss(this,{type:"idle",parent:this});const r=t?Oc(this.get()):Tc(this.get(),Kc(this,e??n.to));Ta(this._pendingCalls,r),n.changed&&(n.changed=!1,eu(this,"onRest",r,this))}}};function Kc(e,t){const n=_c(t);return wa(_c(e.get()),n)}function qc(e,t=e.loop,n=e.to){const r=pc(t);if(r){const o=!0!==r&&bc(r),i=(o||e).reverse,l=!o||o.reset;return Jc({...e,loop:t,default:!1,pause:void 0,to:!i||Ec(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function Jc(e){const{to:t,from:n}=e=bc(e),r=new Set;return Sa.obj(t)&&Qc(t,r),Sa.obj(n)&&Qc(n,r),e.keys=r.size?Array.from(r):null,e}function Yc(e){const t=Jc(e);return Sa.und(t.default)&&(t.default=gc(t)),t}function Qc(e,t){Ia(e,((e,n)=>null!=e&&t.add(n)))}var Zc=["onStart","onRest","onChange","onPause","onResume"];function Xc(e,t,n){e.animation[n]=t[n]!==mc(t,n)?fc(t[n],e.key):void 0}function eu(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var tu=["onStart","onChange","onRest"],nu=1,ru=class{constructor(e,t){this.id=nu++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Sa.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Jc(e)),this}start(e){let{queue:t}=this;return e?t=Aa(e).map(Jc):this.queue=[],this._flush?this._flush(this,t):(uu(this,t),ou(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ca(Aa(t),(t=>n[t].stop(!!e)))}else Mc(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Sa.und(e))this.start({pause:!0});else{const t=this.springs;Ca(Aa(e),(e=>t[e].pause()))}return this}resume(e){if(Sa.und(e))this.start({pause:!1});else{const t=this.springs;Ca(Aa(e),(e=>t[e].resume()))}return this}each(e){Ia(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,xa(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&xa(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,xa(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ia.onFrame(this._onFrame)}};function ou(e,t){return Promise.all(t.map((t=>iu(e,t)))).then((t=>Bc(e,t)))}async function iu(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=Sa.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=Sa.arr(o)||Sa.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ca(tu,(n=>{const r=t[n];if(Sa.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,Ta(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===mc(t,"cancel");(u||f&&p.asyncId)&&d.push(xc(++e._lastAsyncId,{props:t,state:p,actions:{pause:Ea,resume:Ea,start(t,n){f?(Mc(p,e._lastAsyncId),n(Oc(e))):(t.onRest=a,n(Nc(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const m=Bc(e,await Promise.all(d));if(l&&m.finished&&(!n||!m.noop)){const n=qc(t,l,o);if(n)return uu(e,[n]),iu(e,n,!0)}return s&&ia.batchedUpdates((()=>s(m,e,e.item))),m}function lu(e,t){const n={...e.springs};return t&&Ca(Aa(t),(e=>{Sa.und(e.keys)&&(e=Jc(e)),Sa.obj(e.to)||(e={...e,to:void 0}),cu(n,e,(e=>su(e)))})),au(e,n),n}function au(e,t){Ia(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Is(t,e))}))}function su(e,t){const n=new $c;return n.key=e,t&&Is(n,t),n}function cu(e,t,n){t.keys&&Ca(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function uu(e,t){Ca(t,(t=>{cu(e.springs,t,(t=>su(t,e)))}))}var pu,du,fu=({children:e,...t})=>{const n=(0,ea.useContext)(mu),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,ea.useState)((()=>({inputs:t,result:e()}))),r=(0,ea.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=mu;return ea.createElement(i,{value:t},e)},mu=(pu=fu,du={},Object.assign(pu,ea.createContext(du)),pu.Provider._context=pu,pu.Consumer._context=pu,pu);fu.Provider=mu.Provider,fu.Consumer=mu.Consumer;var yu=()=>{const e=[],t=function(t){Vs(`${Us}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Ca(e,((e,o)=>{if(Sa.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ca(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Ca(e,(e=>e.resume(...arguments))),this},t.set=function(t){Ca(e,((e,n)=>{const r=Sa.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Ca(e,((e,r)=>{if(Sa.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Ca(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Ca(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Sa.fun(e)?e(n,t):e};return t._getProps=n,t};function gu(e,t,n){const r=Sa.fun(t)&&t;r&&!n&&(n=[]);const o=(0,ea.useMemo)((()=>r||3==arguments.length?yu():void 0),[]),i=(0,ea.useRef)(0),l=Ws(),a=(0,ea.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=lu(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?ou(e,t):new Promise((r=>{au(e,n),a.queue.push((()=>{r(ou(e,t))})),l()}))}})),[]),s=(0,ea.useRef)([...a.ctrls]),c=[],u=qs(e)||0;function p(e,n){for(let o=e;o{Ca(s.current.slice(e,u),(e=>{Sc(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,ea.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>lu(e,c[t]))),f=(0,ea.useContext)(fu),m=qs(f),y=f!==m&&kc(f);Hs((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Ca(e,(e=>e()))),Ca(s.current,((e,t)=>{o?.add(e),y&&e.start({default:f});const n=c[t];n&&(wc(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),$s((()=>()=>{Ca(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function hu(e,t){const n=Sa.fun(e),[[r],o]=gu(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var vu=class extends Uc{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=us(...t);const n=this._get(),r=lc(n);Qs(this,r.create(n))}advance(e){const t=this._get();wa(t,this.get())||(Ys(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&_u(this._active)&&ku(this)}_get(){const e=Sa.arr(this.source)?this.source.map(ks):Aa(ks(this.source));return this.calc(...e)}_start(){this.idle&&!_u(this._active)&&(this.idle=!1,Ca(Zs(this),(e=>{e.done=!1})),ra.skipAnimation?(ia.batchedUpdates((()=>this.advance())),ku(this)):za.start(this))}_attach(){let e=1;Ca(Aa(this.source),(t=>{_s(t)&&Is(t,this),Lc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ca(Aa(this.source),(e=>{_s(e)&&As(e,this)})),this._active.clear(),ku(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Aa(this.source).reduce(((e,t)=>Math.max(e,(Lc(t)?t.priority:0)+1)),0))}};function bu(e){return!1!==e.idle}function _u(e){return!e.size||Array.from(e).every(bu)}function ku(e){e.idle||(e.idle=!0,Ca(Zs(e),(e=>{e.done=!0})),Ss(e,{type:"idle",parent:e}))}ra.assign({createStringInterpolator:Ds,to:(e,t)=>new vu(e,t)});za.advance;var Eu=window.ReactDOM,Su=/^--/;function wu(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Su.test(e)||Iu.hasOwnProperty(e)&&Iu[e]?(""+t).trim():t+"px"}var Cu={};var Iu={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},Au=["Webkit","Ms","Moz","O"];Iu=Object.keys(Iu).reduce(((e,t)=>(Au.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Iu);var xu=/^(matrix|translate|scale|rotate|skew)/,Bu=/^(translate)/,Pu=/^(rotate|skew)/,Tu=(e,t)=>Sa.num(e)&&0!==e?e+t:e,Ou=(e,t)=>Sa.arr(e)?e.every((e=>Ou(e,t))):Sa.num(e)?e===t:parseFloat(e)===t,Nu=class extends rc{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Tu(e,"px"))).join(",")})`,Ou(e,0)]))),Ia(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(xu.test(t)){if(delete r[t],Sa.und(e))return;const n=Bu.test(t)?"px":Pu.test(t)?"deg":"";o.push(Aa(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Tu(o,n)})`,Ou(o,0)]:e=>[`${t}(${e.map((e=>Tu(e,n))).join(",")})`,Ou(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Mu(o,i)),super(r)}},Mu=class extends ws{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ca(this.inputs,((n,r)=>{const o=ks(n[0]),[i,l]=this.transforms[r](Sa.arr(o)?o:n.map(ks));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&Is(e,this)))))}observerRemoved(e){0==e&&Ca(this.inputs,(e=>Ca(e,(e=>_s(e)&&As(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ss(this,e)}};ra.assign({batchedUpdates:Eu.unstable_batchedUpdates,createStringInterpolator:Ds,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Ru=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new rc(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=uc(e)||"Anonymous";return(e=Sa.str(e)?i[e]||(i[e]=ac(e,o)):e[cc]||(e[cc]=ac(e,o))).displayName=`Animated(${t})`,e};return Ia(e,((t,n)=>{Sa.arr(e)&&(n=uc(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Cu[t]||(Cu[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=wu(t,r[t]);Su.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Nu(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Fu=Ru.animated;const Lu=e=>e+1,Du=e=>({top:e.offsetTop,left:e.offsetLeft});var Uu=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,u.useRef)(),l=(0,f.useReducedMotion)()||!r,[a,s]=(0,u.useReducer)(Lu,0),[c,p]=(0,u.useReducer)(Lu,0),[d,m]=(0,u.useState)({x:0,y:0}),y=(0,u.useMemo)((()=>i.current?Du(i.current):null),[o]),g=(0,u.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Ml.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);return(0,u.useLayoutEffect)((()=>{a&&p()}),[a]),(0,u.useLayoutEffect)((()=>{if(!y)return;if(l)return void g();i.current.style.transform=void 0;const e=Du(i.current);s(),m({x:Math.round(y.left-e.left),y:Math.round(y.top-e.top)})}),[o]),hu({from:{x:d.x,y:d.y},to:{x:0,y:0},reset:a!==c,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:function(e){let{value:n}=e;if(!i.current)return;let{x:r,y:o}=n;r=Math.round(r),o=Math.round(o);const l=0===r&&0===o;i.current.style.transformOrigin="center center",i.current.style.transform=l?void 0:`translate3d(${r}px,${o}px,0)`,i.current.style.zIndex=t?"1":"",g()}}),i};const ju=".block-editor-block-list__block",zu=".block-list-appender",Vu=".block-editor-button-block-appender";function Gu(e,t){return t.closest([ju,zu,Vu].join(","))===e}function Hu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ju);return t?t.id.slice("block-".length):void 0}function Wu(e){const t=(0,u.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:r,isBlockSelected:o}=t(xr);if(o(e)&&"edit"===r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,m.useSelect)(xr);return(0,u.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(Gu(t.current,i.activeElement))return;const l=Ml.focus.tabbable.find(t.current).filter((e=>(0,Ml.isTextField)(e))),a=-1===n,s=l[a?l.length-1:0]||t.current;if(Gu(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Ml.focus.tabbable.findNext(t.current);if(e&&Gu(t.current,e)&&(0,Ml.isFormElement)(e))return void e.focus()}(0,Ml.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function $u(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Ku(){const e=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().outlineMode}),[]);return(0,f.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",$u),t.addEventListener("mouseover",$u),()=>{t.removeEventListener("mouseout",$u),t.removeEventListener("mouseover",$u),t.classList.remove("is-hovered")}}),[e])}function qu(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:o,isBlockMultiSelected:i,getBlockName:l,getSettings:s,hasSelectedInnerBlock:c,isTyping:u,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:f}=t(xr),{outlineMode:m}=s(),y=n(e),g=o(e),h=l(e),v=c(e,!0),b=i(e);return d()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":b,"is-partially-selected":b&&!p()&&!f(),"is-reusable":(0,a.isReusableBlock)((0,a.getBlockType)(h)),"is-dragging":y,"has-child-selected":v,"remove-outline":g&&m&&u()})}),[e])}function Ju(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlockName(e),r=(0,a.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,a.getBlockDefaultClassName)(n)}),[e])}function Yu(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(xr),o=r(e);if(null==o||!o.className)return;const i=(0,a.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?o.className:void 0}),[e])}function Qu(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(xr);if(!l(e))return;const a=n();return a?d()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function Zu(e){const{isBlockSelected:t}=(0,m.useSelect)(xr),{selectBlock:n,selectionChange:r}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):Gu(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var Xu=window.wp.keycodes;function ep(e){const t=(0,m.useSelect)((t=>t(xr).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,m.useSelect)(xr),{insertDefaultBlock:o,removeBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Xu.ENTER&&a!==Xu.BACKSPACE&&a!==Xu.DELETE||s!==l||(0,Ml.isTextField)(s)||(t.preventDefault(),a===Xu.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function tp(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(xr),{setNavigationMode:r,selectBlock:o}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function np(){const e=(0,u.useContext)($h);return(0,f.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function rp(e){return(0,m.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(xr);return n(e)}),[e])}function op(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:o={},isAligned:i}=(0,u.useContext)(ip),{index:l,mode:s,name:c,blockApiVersion:p,blockTitle:y,isPartOfSelection:g,adjustScrolling:h,enableAnimation:v}=(0,m.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:r,getBlockMode:o,getBlockName:i,isTyping:l,getGlobalBlockCount:s,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:p,isFirstMultiSelectedBlock:d}=e(xr),{getActiveBlockVariation:f}=e(a.store),m=c(n),y=u(n)||p(n),g=i(n),h=(0,a.getBlockType)(g),v=f(g,t(n));return{index:r(n),mode:o(n),name:g,blockApiVersion:(null==h?void 0:h.apiVersion)||1,blockTitle:(null==v?void 0:v.title)||(null==h?void 0:h.title),isPartOfSelection:m||y,adjustScrolling:m||d(n),enableAnimation:!l()&&s()<=200}}),[n]),b=rp(n),k=(0,_.sprintf)((0,_.__)("Block: %s"),y),E="html"!==s||t?"":"-visual",S=(0,f.useMergeRefs)([e.ref,Wu(n),Zr(n),Zu(n),ep(n),tp(n),Ku(),np(),Uu({isSelected:g,adjustScrolling:h,enableAnimation:v,triggerAnimationOnChange:l}),(0,f.useDisabled)({isDisabled:!b})]),w=Nr();return p<2&&n===w.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...o,...e,ref:S,id:`block-${n}${E}`,role:"document","aria-label":k,"data-block":n,"data-type":c,"data-title":y,className:d()(d()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":b}),r,e.className,o.className,qu(n),Ju(n),Yu(n),Qu(n)),style:{...o.style,...e.style}}}op.save=a.__unstableGetBlockProps;const ip=(0,u.createContext)();function lp(e){let{children:t,isHtml:n,...r}=e;return(0,u.createElement)("div",op(r,{__unstableIsHtml:n}),t)}const ap=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(xr),p=s(n),d=o(n),f=a(r),m=c(n,r),y=u(n,r),{name:g,attributes:h,isValid:v}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:m,canMove:y,block:p,name:g,attributes:h,isValid:v,isSelected:d}})),sp=(0,m.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:r,insertBlocks:o,mergeBlocks:i,replaceBlocks:l,toggleSelection:s,__unstableMarkLastChangeAsPersistent:c,moveBlocksToPosition:u,removeBlock:p}=e(xr);return{setAttributes(e){const{getMultiSelectedBlockClientIds:o}=n.select(xr),i=o(),{clientId:l}=t,a=i.length?i:[l];r(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;o(e,n,r)},onInsertBlocksAfter(e){const{clientId:r,rootClientId:i}=t,{getBlockIndex:l}=n.select(xr),a=l(r);o(e,a+1,i)},onMerge(e){const{clientId:r,rootClientId:l}=t,{getPreviousBlockClientId:s,getNextBlockClientId:c,getBlock:d,getBlockAttributes:f,getBlockName:m,getBlockOrder:y,getBlockIndex:g,getBlockRootClientId:h,canInsertBlockType:v}=n.select(xr);function b(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=h(e),i=y(e),[l]=i;if(1===i.length&&(0,a.isUnmodifiedBlock)(d(l)))p(e);else{if(v(m(l),r))u([l],e,r,g(e));else{const i=(0,a.switchToBlockType)(d(l),(0,a.getDefaultBlockName)());i&&i.length&&n.batch((()=>{o(i,g(e),r,t),p(l,!1)}))}!y(e).length&&(0,a.isUnmodifiedBlock)(d(e))&&p(e,!1)}}if(e){if(l){const e=c(l);if(e){if(m(l)!==m(e))return void i(l,e);{const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(e),e,l),p(e,!1)}))}}}const e=c(r);if(!e)return;y(e).length?b(e,!1):i(r,e)}else{const e=s(r);if(e)i(e,r);else if(l){const e=s(l);if(e&&m(l)===m(e)){const t=f(l),r=f(e);if(Object.keys(t).every((e=>t[e]===r[e])))return void n.batch((()=>{u(y(l),l,e),p(l,!1)}))}b(l)}}},onReplace(e,n,r){e.length&&!(0,a.isUnmodifiedDefaultBlock)(e[e.length-1])&&c(),l([t.clientId],e,n,r)},toggleSelection(e){s(e)}}}));var cp=(0,f.compose)(f.pure,ap,sp,(0,f.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,g.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:o,canRemove:i,clientId:l,isSelected:s,isSelectionEnabled:c,className:p,__unstableLayoutClassNames:f,name:y,isValid:g,attributes:h,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:E,toggleSelection:S}=e;const{themeSupportsLayout:w,hasContentLockedParent:C,isContentBlock:I,isContentLocking:A,isTemporarilyEditingAsBlocks:x}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr),i=!!n(l);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(a.store).__experimentalHasContentRoleAttribute(y),hasContentLockedParent:i,isContentLocking:"contentOnly"===r(l)&&!i,isTemporarilyEditingAsBlocks:o()===l}}),[y,l]),{removeBlock:B}=(0,m.useDispatch)(xr),P=(0,u.useCallback)((()=>B(l)),[l]),T=cl()||{};let O=(0,u.createElement)(jl,{name:y,isSelected:s,attributes:h,setAttributes:b,insertBlocksAfter:o?void 0:k,onReplace:i?_:void 0,onRemove:i?P:void 0,mergeBlocks:i?E:void 0,clientId:l,isSelectionEnabled:c,toggleSelection:S,__unstableLayoutClassNames:f,__unstableParentLayout:Object.keys(T).length?T:void 0});const N=(0,a.getBlockType)(y);C&&!I&&(v={...v,tabIndex:-1}),null!=N&&N.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=d()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,N.getEditWrapperProps(h)));const M=v&&!!v["data-align"]&&!w;let R;if(M&&(O=(0,u.createElement)("div",{className:"wp-block","data-align":v["data-align"]},O)),g)R="html"===r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{display:"none"}},O),(0,u.createElement)(lp,{isHtml:!0},(0,u.createElement)(Xl,{clientId:l}))):(null==N?void 0:N.apiVersion)>1?O:(0,u.createElement)(lp,v,O);else{const e=n?(0,a.serializeRawBlock)(n):(0,a.getSaveContent)(N,h);R=(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Kl,{clientId:l}),(0,u.createElement)(u.RawHTML,null,(0,Ml.safeHTML)(e)))}const{"data-align":F,...L}=null!==(t=v)&&void 0!==t?t:{},D={clientId:l,className:d()({"is-content-locked":A,"is-content-locked-temporarily-editing-as-blocks":x,"is-content-block":C&&I},F&&w&&`align${F}`,p),wrapperProps:L,isAligned:M},U=(0,u.useMemo)((()=>D),Object.values(D));return(0,u.createElement)(ip.Provider,{value:U},(0,u.createElement)(Ql,{fallback:(0,u.createElement)(lp,{className:"has-warning"},(0,u.createElement)(Jl,null))},R))})),up=window.wp.htmlEntities;var pp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const dp=[(0,u.createInterpolateElement)((0,_.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,u.createInterpolateElement)((0,_.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,u.createElement)("kbd",null)}),(0,_.__)("Drag files into the editor to automatically insert media blocks."),(0,_.__)("Change a block's type by pressing the block icon on the toolbar.")];var fp=function(){const[e]=(0,u.useState)(Math.floor(Math.random()*dp.length));return(0,u.createElement)(g.Tip,null,dp[e])};var mp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var yp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gp=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var hp=(0,u.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o,context:i}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:gp});const l=(0,u.createElement)(g.Icon,{icon:n&&n.src?n.src:n,context:i}),a=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,u.createElement)("span",{style:a,className:d()("block-editor-block-icon",o,{"has-colors":r})},l)}));var vp=function(e){let{title:t,icon:n,description:r,blockType:o,className:i}=e;o&&($()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o));const{parentNavBlockClientId:l}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(xr);return{parentNavBlockClientId:n(t(),"core/navigation",!0)[0]}}),[]),{selectBlock:a}=(0,m.useDispatch)(xr);return(0,u.createElement)("div",{className:d()("block-editor-block-card",i)},l&&(0,u.createElement)(g.Button,{onClick:()=>a(l),label:(0,_.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0}),(0,u.createElement)(hp,{icon:n,showColors:!0}),(0,u.createElement)("div",{className:"block-editor-block-card__content"},(0,u.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,u.createElement)("span",{className:"block-editor-block-card__description"},r)))};const bp=(0,f.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,u.createElement)(e,c({registry:r},o));const[i,l]=(0,u.useState)(null);return(0,u.useEffect)((()=>{const e=(0,m.createRegistry)({},r);e.registerStore(Sr,Ar),l(e)}),[r]),i?(0,u.createElement)(m.RegistryProvider,{value:i},(0,u.createElement)(e,c({registry:i},o))):null}))),"withRegistryProvider");const _p=()=>{};function kp(e){let{clientId:t=null,value:n,selection:r,onChange:o=_p,onInput:i=_p}=e;const l=(0,m.useRegistry)(),{resetBlocks:s,resetSelection:c,replaceInnerBlocks:p,setHasControlledInnerBlocks:d,__unstableMarkNextChangeAsNotPersistent:f}=l.dispatch(xr),{getBlockName:y,getBlocks:g}=l.select(xr),h=(0,m.useSelect)((e=>!t||e(xr).areInnerBlocksControlled(t)),[t]),v=(0,u.useRef)({incoming:null,outgoing:[]}),b=(0,u.useRef)(!1),_=()=>{n&&(f(),t?l.batch((()=>{d(t,!0);const e=n.map((e=>(0,a.cloneBlock)(e)));b.current&&(v.current.incoming=e),f(),p(t,e)})):(b.current&&(v.current.incoming=n),s(n)))},k=(0,u.useRef)(i),E=(0,u.useRef)(o);(0,u.useEffect)((()=>{k.current=i,E.current=o}),[i,o]),(0,u.useEffect)((()=>{v.current.outgoing.includes(n)?v.current.outgoing[v.current.outgoing.length-1]===n&&(v.current.outgoing=[]):g(t)!==n&&(v.current.outgoing=[],_(),r&&c(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,u.useEffect)((()=>{h||(v.current.outgoing=[],_())}),[h]),(0,u.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:a}=l.select(xr);let s=g(t),c=o(),u=!1;b.current=!0;const p=l.subscribe((()=>{if(null!==t&&null===y(t))return;if(!(!t||a(t)))return;const l=o(),p=g(t),d=p!==s;if(s=p,d&&(v.current.incoming||i()))return v.current.incoming=null,void(c=l);if(d||u&&!d&&l&&!c){c=l,v.current.outgoing.push(s);(c?E.current:k.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>{b.current=!1,p()}}),[l,t])}const Ep=bp((e=>{const{children:t,settings:n,stripExperimentalSettings:r=!1}=e,{__experimentalUpdateSettings:o}=Ir((0,m.useDispatch)(xr));return(0,u.useEffect)((()=>{o({...n,__internalIsInitialized:!0},r)}),[n]),kp(e),(0,u.createElement)(Qr,null,t)}));var Sp=e=>(0,u.createElement)(Ep,c({},e,{stripExperimentalSettings:!0}),e.children);function wp(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,m.useSelect)(xr),{clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clearBlockSelection:o}=e();return(0,f.useRefEffect)((e=>{if(o)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(o){(t()||n())&&o.target===e&&r()}}),[t,n,r,o])}function Cp(e){return(0,u.createElement)("div",c({ref:wp()},e))}function Ip(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(xr);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Ap(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,m.useSelect)(Ip,[]);return(0,f.useRefEffect)((o=>{const{ownerDocument:l}=o,{defaultView:a}=l;if(null==e)return;if(!r||t)return;const{length:s}=n;s<2||i&&(o.contentEditable=!0,o.focus(),a.getSelection().removeAllRanges())}),[r,t,n,o,e,i])}function xp(e,t,n,r){let o,i=Ml.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),i.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(ju)===t.closest(ju)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Ml.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}}))}function Bp(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:r,__unstableIsFullySelected:o}=(0,m.useSelect)(xr),{selectBlock:i}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((l=>{let a;function s(){a=null}function c(s){if(s.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:p,ctrlKey:d,altKey:f,metaKey:m}=s,y=c===Xu.UP,g=c===Xu.DOWN,h=c===Xu.LEFT,v=c===Xu.RIGHT,b=y||h,_=h||v,k=y||g,E=_||k,S=p||d||f||m,w=k?Ml.isVerticalEdge:Ml.isHorizontalEdge,{ownerDocument:C}=l,{defaultView:I}=C;if(!E)return;if(r()){if(p)return;if(!o())return;return s.preventDefault(),void(b?i(e()):i(t(),-1))}if(!function(e,t,n){if((t===Xu.UP||t===Xu.DOWN)&&!n)return!0;const{tagName:r}=e;if("INPUT"===r)return["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type"));return"TEXTAREA"!==r}(u,c,S))return;k?a||(a=(0,Ml.computeCaretRect)(I)):a=null;const A=(0,Ml.isRTL)(u)?!b:b,{keepCaretInsideBlock:x}=n();if(p)(function(e,t){const n=xp(e,t,l);return n&&Hu(n)})(u,b)&&w(u,b)&&(l.contentEditable=!0,l.focus());else if(!k||!(0,Ml.isVerticalEdge)(u,b)||f&&!(0,Ml.isHorizontalEdge)(u,A)||x){if(_&&I.getSelection().isCollapsed&&(0,Ml.isHorizontalEdge)(u,A)&&!x){const e=xp(u,A,l);(0,Ml.placeCaretAtHorizontalEdge)(e,b),s.preventDefault()}}else{const e=xp(u,b,l,!0);e&&((0,Ml.placeCaretAtVerticalEdge)(e,f?!b:b,f?void 0:a),s.preventDefault())}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",c),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",c)}}),[])}var Pp=window.wp.keyboardShortcuts;function Tp(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(xr),{multiSelect:r,selectBlock:o}=(0,m.useDispatch)(xr),i=(0,Pp.__unstableUseShortcutEventMatch)();return(0,f.useRefEffect)((l=>{function a(a){if(!i("core/block-editor/select-all",a))return;const s=t();if(s.length<2&&!(0,Ml.isEntirelySelected)(a.target))return;a.preventDefault();const[c]=s,u=n(c),p=e(u);s.length!==p.length?r(p[0],p[p.length-1]):u&&(l.ownerDocument.defaultView.getSelection().removeAllRanges(),o(u))}return l.addEventListener("keydown",a),()=>{l.removeEventListener("keydown",a)}}),[])}function Op(e,t){e.contentEditable=t,t&&e.focus()}function Np(){const{startMultiSelect:e,stopMultiSelect:t}=(0,m.useDispatch)(xr),{isSelectionEnabled:n,hasMultiSelection:r,isDraggingBlocks:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((i=>{const{ownerDocument:l}=i,{defaultView:a}=l;let s,c;function u(){t(),a.removeEventListener("mouseup",u),c=a.requestAnimationFrame((()=>{if(r())return;Op(i,!1);const e=a.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);s.contains(t)&&s.focus()}}))}function p(t){let{buttons:r,target:c}=t;o()||1===r&&c.getAttribute("contenteditable")&&n()&&(s=l.activeElement,e(),a.addEventListener("mouseup",u),Op(i,!0))}return i.addEventListener("mouseout",p),()=>{i.removeEventListener("mouseout",p),a.removeEventListener("mouseup",u),a.cancelAnimationFrame(c)}}),[e,t,n,r])}function Mp(e,t){e.contentEditable=t,t&&e.focus()}function Rp(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,m.useDispatch)(xr),{getBlockParents:r,getBlockSelectionStart:o}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return;const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void Mp(n,!1);let c=Hu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(a)),u=Hu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(a));if(s){const e=o(),t=Hu(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void Mp(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Fp(){const{selectBlock:e}=(0,m.useDispatch)(xr),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,m.useSelect)(xr);return(0,f.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=Hu(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Lp(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,m.useSelect)(xr),{replaceBlocks:o,__unstableSplitSelection:i,removeBlocks:l,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((u=>{function p(e){var t;r()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function d(p){p.defaultPrevented||r()&&(p.keyCode===Xu.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?o(t(),(0,a.createBlock)((0,a.getDefaultBlockName)())):i()):p.keyCode===Xu.BACKSPACE||p.keyCode===Xu.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?l(t()):n()?s(p.keyCode===Xu.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===Xu.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function f(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",p),u.addEventListener("keydown",d),u.addEventListener("compositionstart",f),()=>{u.removeEventListener("beforeinput",p),u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",f)}}),[])}function Dp(){const[e,t,n]=function(){const e=(0,u.useRef)(),t=(0,u.useRef)(),n=(0,u.useRef)(),r=(0,u.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,m.useSelect)(xr),{setNavigationMode:a}=(0,m.useDispatch)(xr),s=(0,m.useSelect)((e=>e(xr).isNavigationMode()),[])?void 0:"0",c=(0,u.useRef)();function p(t){if(c.current)c.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Ml.focus.tabbable[n](t.target).focus()}}const d=(0,u.createElement)("div",{ref:t,tabIndex:s,onFocus:p}),y=(0,u.createElement)("div",{ref:n,tabIndex:s,onFocus:p}),g=(0,f.useRefEffect)((s=>{function u(e){if(e.defaultPrevented)return;if(e.keyCode===Xu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==Xu.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===s&&a(!0));if(((0,Ml.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Ml.isFormElement)(Ml.focus.tabbable[l](e.target)))return;const u=r?t:n;c.current=!0,u.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==l()||s.focus()}function d(r){var o;if(r.keyCode!==Xu.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Ml.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=s,{defaultView:m}=f;return m.addEventListener("keydown",d),s.addEventListener("keydown",u),s.addEventListener("focusout",p),()=>{m.removeEventListener("keydown",d),s.removeEventListener("keydown",u),s.removeEventListener("focusout",p)}}),[]);return[d,(0,f.useMergeRefs)([e,g]),y]}(),r=(0,m.useSelect)((e=>e(xr).hasMultiSelection()),[]);return[e,(0,f.useMergeRefs)([t,Lp(),Np(),Rp(),Fp(),Ap(),Tp(),Bp(),(0,f.useRefEffect)((e=>{if(e.tabIndex=0,e.contentEditable=r,r)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,_.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[r])]),n]}var Up=(0,u.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,l]=Dp();return(0,u.createElement)(u.Fragment,null,o,(0,u.createElement)("div",c({},r,{ref:(0,f.useMergeRefs)([i,t]),className:d()(r.className,"block-editor-writing-flow")}),n),l)}));function jp(e){return(0,u.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}function zp(e){let{contentRef:t,children:n,head:r,tabIndex:o=0,scale:i=1,frameSize:l=0,readonly:a,forwardedRef:s,...p}=e;const y=(0,m.useSelect)((e=>e(xr).getSettings().__unstableResolvedAssets),[]),[,h]=(0,u.useReducer)((()=>({}))),[v,b]=(0,u.useState)(),[k,E]=(0,u.useState)([]),S=jp(null==y?void 0:y.styles),w=S.map((e=>e.id)),C=(0,u.useMemo)((()=>Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:r}=t;if(null===n)return e;if(!r)return e;if("LINK"!==n.tagName)return e;if("wp-reset-editor-styles-css"===n.id)return e;if(function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:r,cssRules:o}=t;return r?e(o):n&&(n.includes(".editor-styles-wrapper")||n.includes(".wp-block"))}))}(r)){e.push(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.push(r.cloneNode(!0))}return e}),[])),[]).filter((e=>!w.includes(e.id))),I=jp(null==y?void 0:y.scripts),A=wp(),[x,B,P]=Dp(),[T,{height:O}]=(0,f.useResizeObserver)(),N=(0,f.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function r(){const{contentDocument:r,ownerDocument:o}=e,{readyState:i,documentElement:l}=r;return t=r,("interactive"===i||"complete"===i)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(r),b(r),A(l),E(Array.from(o.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),r.dir=o.dir,l.removeChild(r.head),l.removeChild(r.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",r),()=>{var o,i;e.removeEventListener("load",r),null===(o=t)||void 0===o||o.removeEventListener("dragover",n),null===(i=t)||void 0===i||i.removeEventListener("drop",n)}}),[]),M=(0,f.useRefEffect)((e=>{I.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{h()}))}),[]),R=(0,f.useDisabled)({isDisabled:!a}),F=(0,f.useMergeRefs)([t,A,B,R]),L=(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",null,"html{height:auto!important;}body{margin:0}"),[...S,...C].map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const a=t.toLowerCase();return"style"===a?(0,u.createElement)(a,{id:r,key:r},l):(0,u.createElement)(a,{href:n,id:r,rel:o,media:i,key:r})}))),D=(0,u.useMemo)((()=>""+(0,u.renderToString)(L)),[]);return(0,u.createElement)(u.Fragment,null,o>=0&&x,(0,u.createElement)("iframe",c({},p,{ref:(0,f.useMergeRefs)([s,N]),tabIndex:o,srcDoc:D,title:(0,_.__)("Editor canvas")}),v&&(0,u.createPortal)((0,u.createElement)(u.Fragment,null,(0,u.createElement)("head",{ref:M},L,r,(0,u.createElement)("style",null,`html { transition: background 5s; ${l?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,u.createElement)("body",{ref:F,className:d()("block-editor-iframe__body","editor-styles-wrapper",...k),style:{marginBottom:`-${O*(1-i)-l}px`,marginTop:l,transform:`scale( ${i} )`}},T,(0,u.createElement)(g.__experimentalStyleProvider,{document:v},n))),v.documentElement)),o>=0&&P)}var Vp=(0,u.forwardRef)((function(e,t){return(0,m.useSelect)((e=>e(xr).getSettings().__internalIsInitialized),[])?(0,u.createElement)(zp,c({},e,{forwardedRef:t})):null})),Gp={grad:.9,turn:360,rad:360/(2*Math.PI)},Hp=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Wp=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},$p=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Kp=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qp=function(e){return{r:$p(e.r,0,255),g:$p(e.g,0,255),b:$p(e.b,0,255),a:$p(e.a)}},Jp=function(e){return{r:Wp(e.r),g:Wp(e.g),b:Wp(e.b),a:Wp(e.a,3)}},Yp=/^#([0-9a-f]{3,8})$/i,Qp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Zp=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},Xp=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},ed=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),l:$p(e.l,0,100),a:$p(e.a)}},td=function(e){return{h:Wp(e.h),s:Wp(e.s),l:Wp(e.l),a:Wp(e.a,3)}},nd=function(e){return Xp((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},rd=function(e){return{h:(t=Zp(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},od=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,id=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ld=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ad=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sd={string:[[function(e){var t=Yp.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Wp(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Wp(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ld.exec(e)||ad.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qp({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=od.exec(e)||id.exec(e);if(!t)return null;var n,r,o=ed({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Gp[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return nd(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Hp(t)&&Hp(n)&&Hp(r)?qp({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=ed({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return nd(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Hp(t)||!Hp(n)||!Hp(r))return null;var l=function(e){return{h:Kp(e.h),s:$p(e.s,0,100),v:$p(e.v,0,100),a:$p(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return Xp(l)},"hsv"]]},cd=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?Qp(Wp(255*o)):"","#"+Qp(t)+Qp(n)+Qp(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return Jp(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jp(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return td(rd(this.rgba))},e.prototype.toHslString=function(){return t=(e=td(rd(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=Zp(this.rgba),{h:Wp(e.h),s:Wp(e.s),v:Wp(e.v),a:Wp(e.a,3)};var e},e.prototype.invert=function(){return yd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),yd(pd(this.rgba,-e))},e.prototype.grayscale=function(){return yd(pd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),yd(fd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?yd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Wp(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=rd(this.rgba);return"number"==typeof e?yd({h:e,s:t.s,l:t.l,a:t.a}):Wp(t.h)},e.prototype.isEqual=function(e){return this.toHex()===yd(e).toHex()},e}(),yd=function(e){return e instanceof md?e:new md(e)},gd=[],hd=function(e){e.forEach((function(e){gd.indexOf(e)<0&&(e(md,sd),gd.push(e))}))};function vd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f(s=_d(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Ed=n(3124),Sd=n.n(Ed);const wd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Cd(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),m(n);e.length&&"}"!==e.charAt(0)&&(t=w()||C());)!1!==t&&(n.push(t),m(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function m(e){let t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){const t=i();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 s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return Id(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 h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Id(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(wd,""),value:n?Id(n[0]).replace(wd,""):""});return d(/^[;\s]*/),r}function v(){const e=[];if(!c())return s("missing '{'");let t;for(m(e);t=h();)!1!==t&&(e.push(t),m(e));return u()?e:s("missing '}'")}function b(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:v()})}const _=S("import"),k=S("charset"),E=S("namespace");function S(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=m();for(;o=b();)l.push(o),l=l.concat(m());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@media missing '{'");const r=m().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Id(t[1]),media:Id(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=Id(t[1]);if(!c())return s("@supports missing '{'");const r=m().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||E()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Id(t[1]),r=Id(t[2]);if(!c())return s("@document missing '{'");const o=m().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=m();for(;n=h();)r.push(n),r=r.concat(m());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=m().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=m();for(;t=h();)n.push(t),n=n.concat(m());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function C(){const e=i(),t=g();return t?(m(),e({type:"rule",selectors:t,declarations:v()})):s("selector missing")}return Ad(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Id(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ad(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Ad(e,r)})):n&&"object"==typeof n&&Ad(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var xd=n(8575),Bd=n.n(xd),Pd=Td;function Td(e){this.options=e||{}}Td.prototype.emit=function(e){return e},Td.prototype.visit=function(e){return this[e.type](e)},Td.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Ld(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Dd(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const jd=/^(body|html|:root).*$/;var zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(jd)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var Vd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.values(null!=e?e:[]).map((e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(zd(t)),r&&o.push(Ud(r)),o.length?Fd(n,(0,f.compose)(o)):n}))};const Gd=".editor-styles-wrapper";function Hd(e){return(0,u.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(Gd);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=yd(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function Wd(e){let{styles:t}=e;const n=(0,u.useMemo)((()=>Vd(t,Gd)),[t]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("style",{ref:Hd(t)}),n.map(((e,t)=>(0,u.createElement)("style",{key:t},e))))}function $d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=yd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function Kd(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,u.createElement)("style",null,r)}function qd(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,u.createElement)("style",null,n)}function Jd(e){let{id:t,colors:n}=e;const r=$d(n);return(0,u.createElement)(g.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,u.createElement)("defs",null,(0,u.createElement)("filter",{id:t},(0,u.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,u.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,u.createElement)("feFuncR",{type:"table",tableValues:r.r.join(" ")}),(0,u.createElement)("feFuncG",{type:"table",tableValues:r.g.join(" ")}),(0,u.createElement)("feFuncB",{type:"table",tableValues:r.b.join(" ")}),(0,u.createElement)("feFuncA",{type:"table",tableValues:r.a.join(" ")})),(0,u.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function Yd(e){let{preset:t}=e;return(0,u.createElement)(Jd,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let Qd;hd([vd,kd]);const Zd=2e3;function Xd(e){let{viewportWidth:t,containerWidth:n,minHeight:r,additionalStyles:o=[]}=e;t||(t=n);const[i,{height:l}]=(0,f.useResizeObserver)(),{styles:a,duotone:s}=(0,m.useSelect)((e=>{var t,n;const r=e(xr).getSettings();return{styles:r.styles,duotone:null===(t=r.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),c=(0,u.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:a),[a,o]),p=(0,u.useMemo)((()=>{var e,t;return[...null!==(e=null==s?void 0:s.default)&&void 0!==e?e:[],...null!==(t=null==s?void 0:s.theme)&&void 0!==t?t:[]]}),[s]);Qd=Qd||(0,f.pure)(Jh);const d=n/t;return(0,u.createElement)(g.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${d})`,height:l*d,maxHeight:l>Zd?Zd*d:void 0,minHeight:r}},(0,u.createElement)(Vp,{head:(0,u.createElement)(Wd,{styles:c}),contentRef:(0,f.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:l,pointerEvents:"none",maxHeight:Zd,minHeight:0!==d&&d<1&&r?r/d:r}},i,p.map((e=>(0,u.createElement)(Yd,{preset:e,key:e.slug}))),(0,u.createElement)(Qd,{renderAppender:!1})))}function ef(e){const[t,{width:n}]=(0,f.useResizeObserver)();return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,u.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,u.createElement)(Xd,c({},e,{containerWidth:n}))))}var tf=(0,u.memo)((function(e){let{blocks:t,viewportWidth:n=1200,minHeight:r,additionalStyles:o=[],__experimentalMinHeight:i,__experimentalPadding:l}=e;i&&(r=i,$()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),l&&(o=[...o,{css:`body { padding: ${l}px; }`}],$()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const a=(0,m.useSelect)((e=>e(xr).getSettings()),[]),s=(0,u.useMemo)((()=>({...a,__unstableIsPreviewMode:!0})),[a]),c=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]);return t&&0!==t.length?(0,u.createElement)(Ep,{value:c,settings:s},(0,u.createElement)(ef,{viewportWidth:n,minHeight:r,additionalStyles:o})):null}));function nf(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,m.useSelect)((e=>e(xr).getSettings()),[]),i=(0,u.useMemo)((()=>({...o,__unstableIsPreviewMode:!0})),[o]),l=(0,f.useDisabled)(),a=(0,f.useMergeRefs)([n.ref,l]),s=(0,u.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),c=(0,u.createElement)(Ep,{value:s,settings:i},(0,u.createElement)(Qh,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:a,className:d()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?c:null}}var rf=function(e){var t;let{item:n}=e;const{name:r,title:o,icon:i,description:l,initialAttributes:s,example:c}=n,p=(0,a.isReusableBlock)(n);return(0,u.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,u.createElement)("div",{className:"block-editor-inserter__preview"},p||c?(0,u.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,u.createElement)(tf,{blocks:c?(0,a.getBlockFromExample)(r,{attributes:{...c.attributes,...s},innerBlocks:c.innerBlocks}):(0,a.createBlock)(r,s),viewportWidth:null!==(t=null==c?void 0:c.viewportWidth)&&void 0!==t?t:500,additionalStyles:[{css:"body { padding: 16px; }"}]})):(0,u.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,_.__)("No Preview Available."))),!p&&(0,u.createElement)(vp,{title:o,icon:i,description:l}))};var of=(0,u.createContext)();var lf=(0,u.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const l=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeItem,c({ref:t,state:l,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,u.createElement)(r,t,o):"function"==typeof o?o(t):(0,u.createElement)(g.Button,t,o)}))}));var af=(0,u.createElement)(V.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function sf(e){let{count:t,icon:n,isPattern:r}=e;const o=r&&(0,_.__)("Pattern");return(0,u.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,u.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,u.createElement)(g.FlexItem,null,n?(0,u.createElement)(hp,{icon:n}):o||(0,_.sprintf)((0,_._n)("%d block","%d blocks",t),t)),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:af})))))}var cf=e=>{let{isEnabled:t,blocks:n,icon:r,children:o,isPattern:i}=e;const l={type:"inserter",blocks:n};return(0,u.createElement)(g.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:r,isPattern:i})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};var uf=(0,u.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:o,onHover:i,isDraggable:l,...s}=e;const p=(0,u.useRef)(!1),f=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},m=(0,u.useMemo)((()=>[(0,a.createBlock)(r.name,r.initialAttributes,(0,a.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]),y=(0,a.isReusableBlock)(r)||(0,a.isTemplatePart)(r);return(0,u.createElement)(cf,{isEnabled:l&&!r.disabled,blocks:m,icon:r.icon},(e=>{let{draggable:l,onDragStart:a,onDragEnd:m}=e;return(0,u.createElement)("div",{className:d()("block-editor-block-types-list__list-item",{"is-synced":y}),draggable:l,onDragStart:e=>{p.current=!0,a&&(i(null),a(e))},onDragEnd:e=>{p.current=!1,m&&m(e)}},(0,u.createElement)(lf,c({isFirst:n,className:d()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Xu.ENTER&&(e.preventDefault(),o(r,(0,Xu.isAppleOS)()?e.metaKey:e.ctrlKey),i(null))},onMouseEnter:()=>{p.current||i(r)},onMouseLeave:()=>i(null)},s),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,u.createElement)(hp,{icon:r.icon,showColors:!0})),(0,u.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:3},r.title))))}))}));var pf=(0,u.forwardRef)((function(e,t){const[n,r]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{n&&(0,dn.speak)((0,_.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,u.createElement)("div",c({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var df=(0,u.forwardRef)((function(e,t){const n=(0,u.useContext)(of);return(0,u.createElement)(g.__unstableCompositeGroup,c({state:n,role:"presentation",ref:t},e))}));var ff=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:o,label:i,isDraggable:l=!0}=e;return(0,u.createElement)(pf,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let r=0,o=e.length;r(0,u.createElement)(df,{key:t},e.map(((e,o)=>(0,u.createElement)(uf,{key:e.id,item:e,className:(0,a.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:l&&!e.isDisabled,isFirst:0===t&&0===o})))))),o)};var mf=function(e){let{title:t,icon:n,children:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,u.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,u.createElement)(g.Icon,{icon:n})),(0,u.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var yf=(e,t)=>{const{categories:n,collections:r,items:o}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(xr),{getCategories:r,getCollections:o}=t(a.store);return{categories:r(),collections:o(),items:n(e)}}),[e]);return[o,n,r,(0,u.useCallback)(((e,n)=>{let{name:r,initialAttributes:o,innerBlocks:i}=e;const l=(0,a.createBlock)(r,o,(0,a.createBlocksFromInnerBlocksTemplate)(i));t(l,void 0,n)}),[t])]};var gf=function(e){let{children:t}=e;const n=(0,g.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,u.createElement)(of.Provider,{value:n},t)};const hf=[];var vf=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,a,s]=yf(t,n),c=(0,u.useMemo)((()=>J(i,"frecency","desc").slice(0,6)),[i]),p=(0,u.useMemo)((()=>i.filter((e=>!e.category))),[i]),d=(0,u.useMemo)((()=>(0,f.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,y.groupBy)(e,"category")))(i)),[i]),m=(0,u.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,a]);(0,u.useEffect)((()=>()=>r(null)),[]);const g=(0,f.useAsyncList)(l),h=l.length===g.length,v=(0,u.useMemo)((()=>Object.entries(a)),[a]),b=(0,f.useAsyncList)(h?v:hf);return(0,u.createElement)(gf,null,(0,u.createElement)("div",null,o&&!!c.length&&(0,u.createElement)(mf,{title:(0,_._x)("Most used","blocks")},(0,u.createElement)(ff,{items:c,onSelect:s,onHover:r,label:(0,_._x)("Most used","blocks")})),g.map((e=>{const t=d[e.slug];return t&&t.length?(0,u.createElement)(mf,{key:e.slug,title:e.title,icon:e.icon},(0,u.createElement)(ff,{items:t,onSelect:s,onHover:r,label:e.title})):null})),h&&p.length>0&&(0,u.createElement)(mf,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,_.__)("Uncategorized")},(0,u.createElement)(ff,{items:p,onSelect:s,onHover:r,label:(0,_.__)("Uncategorized")})),b.map((e=>{let[t,n]=e;const o=m[t];return o&&o.length?(0,u.createElement)(mf,{key:t,title:n.title,icon:n.icon},(0,u.createElement)(ff,{items:o,onSelect:s,onHover:r,label:n.title})):null}))))},bf=window.wp.notices;var _f=(e,t)=>{const{patternCategories:n,patterns:r}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(xr);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:o}=(0,m.useDispatch)(bf.store),i=(0,u.useCallback)(((t,n)=>{e((null!=n?n:[]).map((e=>(0,a.cloneBlock)(e))),t.name),o((0,_.sprintf)((0,_.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,i]};const kf=e=>{let{showTooltip:t,title:n,children:r}=e;return t?(0,u.createElement)(g.Tooltip,{text:n},r):(0,u.createElement)(u.Fragment,null,r)};function Ef(e){let{isDraggable:t,pattern:n,onClick:r,onHover:o,composite:i,showTooltip:l}=e;const[a,s]=(0,u.useState)(!1),{blocks:p,viewportWidth:d}=n,m=`block-editor-block-patterns-list__item-description-${(0,f.useInstanceId)(Ef)}`;return(0,u.createElement)(cf,{isEnabled:t,blocks:p,isPattern:!!n},(e=>{let{draggable:t,onDragStart:f,onDragEnd:y}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{s(!0),f&&(null==o||o(null),f(e))},onDragEnd:e=>{s(!1),y&&y(e)}},(0,u.createElement)(kf,{showTooltip:l,title:n.title},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},i,{className:"block-editor-block-patterns-list__item",onClick:()=>{r(n,p),null==o||o(null)},onMouseEnter:()=>{a||null==o||o(n)},onMouseLeave:()=>null==o?void 0:o(null),"aria-label":n.title,"aria-describedby":n.description?m:void 0}),(0,u.createElement)(tf,{blocks:p,viewportWidth:d}),!l&&(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,u.createElement)(g.VisuallyHidden,{id:m},n.description))))}))}function Sf(){return(0,u.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var wf=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onHover:o,onClickPattern:i,orientation:l,label:a=(0,_.__)("Block Patterns"),showTitlesAsTooltip:s}=e;const p=(0,g.__unstableUseCompositeState)({orientation:l});return(0,u.createElement)(g.__unstableComposite,c({},p,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>r.includes(e)?(0,u.createElement)(Ef,{key:e.name,pattern:e,onClick:i,onHover:o,isDraggable:t,composite:p,showTooltip:s}):(0,u.createElement)(Sf,{key:e.name}))))};function Cf(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,u.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,u.createElement)(g.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function If(e){let{filterValue:t,setFilterValue:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:t,label:(0,_.__)("Search for patterns"),placeholder:(0,_.__)("Search")}))}var Af=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,u.createElement)(If,{filterValue:o,setFilterValue:i}),!o&&(0,u.createElement)(Cf,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var xf=function(){return(0,u.createElement)("div",{className:"block-editor-inserter__no-results"},(0,u.createElement)(Xi,{className:"block-editor-inserter__no-results-icon",icon:gp}),(0,u.createElement)("p",null,(0,_.__)("No results found.")))};var Bf=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:o,onSelect:i,shouldFocusBlock:l=!0,selectBlockOnInsert:s=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(xr),{destinationRootClientId:p,destinationIndex:d}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:i,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(xr),c=i();let u,p=t;return void 0!==n?u=n:r?u=a(r):!o&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,o]),{replaceBlocks:f,insertBlocks:y,showInsertionPoint:g,hideInsertionPoint:h}=(0,m.useDispatch)(xr),v=(0,u.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!o&&r&&(0,a.isUnmodifiedDefaultBlock)(r)?f(r.clientId,e,null,l||n?0:null,t):y(e,d,p,s,l||n?0:null,t);const u=Array.isArray(e)?e.length:1,m=(0,_.sprintf)((0,_._n)("%d block added.","%d blocks added.",u),u);(0,dn.speak)(m),i&&i(e)}),[o,c,f,y,p,d,i,l]),b=(0,u.useCallback)((e=>{e?g(p,d):h()}),[g,h,p,d]);return[p,v,b]},Pf=n(4793),Tf=n.n(Pf);function Of(e){return e.toLowerCase()}var Nf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Mf=/[^A-Z0-9]+/gi;function Rf(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?Nf:n,o=t.stripRegexp,i=void 0===o?Mf:o,l=t.transform,a=void 0===l?Of:l,s=t.delimiter,c=void 0===s?" ":s,u=Ff(Ff(e,r,"$1\0$2"),i,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(a).join(c)}function Ff(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const Lf=e=>e.name||"",Df=e=>e.title,Uf=e=>e.description||"",jf=e=>e.keywords||[],zf=e=>e.category,Vf=()=>null;function Gf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Rf(e,{splitRegexp:[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],stripRegexp:/(\p{C}|\p{P}|\p{S})+/giu}).split(" ").filter(Boolean)}function Hf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=Tf()(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Gf(Hf(e))},$f=(e,t)=>e.filter((e=>!Wf(t).some((t=>t.includes(e))))),Kf=(e,t,n,r)=>{if(0===Wf(r).length)return e;return qf(e,r,{getCategory:e=>{var n;return null===(n=t.find((t=>{let{slug:n}=t;return n===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}})},qf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wf(t);if(0===r.length)return e;const o=e.map((e=>[e,Jf(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Lf,getTitle:o=Df,getDescription:i=Uf,getKeywords:l=jf,getCategory:a=zf,getCollection:s=Vf}=n,c=r(e),u=o(e),p=i(e),d=l(e),f=a(e),m=s(e),y=Hf(t),g=Hf(u);let h=0;if(y===g)h+=30;else if(g.startsWith(y))h+=20;else{const e=[c,u,p,...d,f,m].join(" "),t=Gf(y);0===$f(t,e).length&&(h+=10)}if(0!==h&&c.startsWith("core/")){h+=c!==e.id?1:2}return h}function Yf(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,u.createElement)(g.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,_.sprintf)((0,_._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qf=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,f.useDebounce)(dn.speak,500),[i,l]=Bf({shouldFocusBlock:!0}),[a,,s]=_f(l,i),c=(0,u.useMemo)((()=>r.map((e=>e.name))),[r]),p=(0,u.useMemo)((()=>t?qf(a,t):a.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!c.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,a]);(0,u.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const d=(0,f.useAsyncList)(p,{step:2}),m=!(null==p||!p.length);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},m&&(0,u.createElement)(Yf,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,u.createElement)(gf,null,!m&&(0,u.createElement)(xf,null),m&&(0,u.createElement)(wf,{shownPatterns:d,blockPatterns:p,onClickPattern:s,isDraggable:!1})))};function Zf(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,u.useState)(""),[i,l]=(0,u.useState)(null==t?void 0:t.name);return(0,u.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,u.createElement)(Af,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,u.createElement)(Qf,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Xf=function(e){let{onModalClose:t,...n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Patterns"),onRequestClose:t,isFullScreen:!0},(0,u.createElement)(Zf,n))};function em(e){let{title:t}=e;return(0,u.createElement)(g.__experimentalVStack,{spacing:0},(0,u.createElement)(g.__experimentalView,null,(0,u.createElement)(g.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3},(0,u.createElement)(g.__experimentalHStack,{spacing:2},(0,u.createElement)(g.__experimentalNavigatorBackButton,{style:{minWidth:24,padding:0},icon:(0,_.isRTL)()?mp:yp,isSmall:!0,"aria-label":(0,_.__)("Navigate to the previous view")}),(0,u.createElement)(g.__experimentalSpacer,null,(0,u.createElement)(g.__experimentalHeading,{level:5},t))))))}function tm(e){let{categories:t,children:n}=e;return(0,u.createElement)(g.__experimentalNavigatorProvider,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation"},(0,u.createElement)(g.__experimentalNavigatorScreen,{path:"/"},(0,u.createElement)(g.__experimentalItemGroup,null,t.map((e=>(0,u.createElement)(g.__experimentalNavigatorButton,{key:e.name,path:`/category/${e.name}`,as:g.__experimentalItem,isAction:!0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?yp:mp}))))))),t.map((e=>(0,u.createElement)(g.__experimentalNavigatorScreen,{key:e.name,path:`/category/${e.name}`},(0,u.createElement)(em,{title:(0,_.__)("Back")}),n(e)))))}const nm=()=>{},rm=["featured","posts","text","gallery","call-to-action","banner","header","footer"];function om(e){const[t,n]=_f(void 0,e),r=(0,u.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>n.some((t=>t.name===e))))),[n]),o=(0,u.useMemo)((()=>{const e=n.filter((e=>t.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].some((e=>rm.includes(e)))?[n,r].every((e=>rm.includes(e)))?rm.indexOf(n)-rm.indexOf(r):rm.includes(n)?-1:1:0}));return t.some((e=>!r(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,_._x)("Uncategorized")}),e}),[t,n]);return o}function im(e){let{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}=e;const l=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(l.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[o]),(0,u.createElement)("div",{ref:l,className:"block-editor-inserter__patterns-category-dialog"},(0,u.createElement)(lm,{rootClientId:t,onInsert:n,onHover:r,category:o,showTitlesAsTooltip:i}))}function lm(e){let{rootClientId:t,onInsert:n,onHover:r=nm,category:o,showTitlesAsTooltip:i}=e;const[l,,a]=_f(n,t),s=om(t),c=(0,u.useMemo)((()=>l.filter((e=>{var t,n,r;if("uncategorized"!==o.name)return null===(r=e.categories)||void 0===r?void 0:r.includes(o.name);return 0===(null!==(t=null===(n=e.categories)||void 0===n?void 0:n.filter((e=>s.find((t=>t.name===e)))))&&void 0!==t?t:[]).length}))),[l,o]),p=(0,f.useAsyncList)(c);return(0,u.useEffect)((()=>()=>r(null)),[]),c.length?(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel"},(0,u.createElement)("div",{className:"block-editor-inserter__patterns-category-panel-title"},o.label),(0,u.createElement)("p",null,o.description),(0,u.createElement)(wf,{shownPatterns:p,blockPatterns:c,onClickPattern:a,onHover:r,label:o.label,orientation:"vertical",category:o.label,isDraggable:!0,showTitlesAsTooltip:i})):null}var am=function(e){let{onSelectCategory:t,selectedCategory:n,onInsert:r,rootClientId:o}=e;const[i,l]=(0,u.useState)(!1),a=om(o),s=n||a[0],c=(0,f.useViewportMatch)("medium","<");return(0,u.createElement)(u.Fragment,null,!c&&(0,u.createElement)("div",{className:"block-editor-inserter__block-patterns-tabs-container"},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Block pattern categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:"block-editor-inserter__block-patterns-tabs"},a.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>t(e),className:e===n?"block-editor-inserter__patterns-category block-editor-inserter__patterns-selected-category":"block-editor-inserter__patterns-category","aria-label":e.label,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.label),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__patterns-explore-button",onClick:()=>l(!0),variant:"secondary"},(0,_.__)("Explore all patterns")))))),c&&(0,u.createElement)(tm,{categories:a},(e=>(0,u.createElement)(lm,{onInsert:r,rootClientId:o,category:e,showTitlesAsTooltip:!1}))),i&&(0,u.createElement)(Xf,{initialCategory:s,patternCategories:a,onModalClose:()=>l(!1)}))},sm=window.wp.url;function cm(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=yf(r,n),l=(0,u.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,u.createElement)(xf,null):(0,u.createElement)(mf,{title:(0,_.__)("Reusable blocks")},(0,u.createElement)(ff,{items:l,onSelect:i,onHover:t,label:(0,_.__)("Reusable blocks")}))}var um=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cm,{onHover:r,onInsert:n,rootClientId:t}),(0,u.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,u.createElement)(g.Button,{className:"block-editor-inserter__manage-reusable-blocks",variant:"secondary",href:(0,sm.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,_.__)("Manage Reusable blocks"))))};function pm(e){const[t,n]=(0,u.useState)([]),{canInsertImage:r,canInsertVideo:o,canInsertAudio:i}=(0,m.useSelect)((t=>{const{canInsertBlockType:n}=t(xr);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]),l=function(){const{inserterMediaCategories:e,allowedMimeTypes:t,enableOpenverseMediaCategory:n}=(0,m.useSelect)((e=>{const t=e(xr).getSettings();return{inserterMediaCategories:t.inserterMediaCategories,allowedMimeTypes:t.allowedMimeTypes,enableOpenverseMediaCategory:t.enableOpenverseMediaCategory}}),[]),r=(0,u.useMemo)((()=>{if(e&&t)return e.filter((e=>!(!n&&"openverse"===e.name)&&Object.values(t).some((t=>t.startsWith(`${e.mediaType}/`)))))}),[e,t,n]);return r}();return(0,u.useEffect)((()=>{(async()=>{const e=[];if(!l)return;const t=new Map(await Promise.all(l.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),a={image:r,video:o,audio:i};l.forEach((n=>{a[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,o,i,l]),t}var dm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var fm=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"})),mm=window.wp.blob;const ym={image:"img",video:"video",audio:"audio"};function gm(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},r=e.url,o=e.alt||void 0;"image"===t?(n.url=r,n.alt=o):["video","audio"].includes(t)&&(n.src=r);const i=ym[t],l=(0,u.createElement)(i,{src:e.previewUrl||r,alt:o,controls:"audio"===t||void 0,inert:"true",onError:t=>{let{currentTarget:n}=t;n.src===e.previewUrl&&(n.src=r)}});return[(0,a.createBlock)(`core/${t}`,n),l]}const hm=["image"],vm={position:"bottom left",className:"block-editor-inserter__media-list__item-preview-options__popover"};function bm(e){let{category:t,media:n}=e;if(!t.getReportUrl)return null;const r=t.getReportUrl(n);return(0,u.createElement)(g.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,_.__)("Options"),popoverProps:vm,icon:dm},(()=>(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:()=>window.open(r,"_blank").focus(),icon:fm},(0,_.sprintf)((0,_.__)("Report %s"),t.mediaType)))))}function _m(e){let{onClose:t,onSubmit:n}=e;return(0,u.createElement)(g.Modal,{title:(0,_.__)("Insert external image"),onRequestClose:t,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal"},(0,u.createElement)(g.__experimentalVStack,{spacing:3},(0,u.createElement)("p",null,(0,_.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")),(0,u.createElement)("p",null,(0,_.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation."))),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:t},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",onClick:n},(0,_.__)("Insert")))))}function km(e){var t;let{media:n,onClick:r,composite:o,category:i}=e;const[l,s]=(0,u.useState)(!1),[p,f]=(0,u.useState)(!1),[y,h]=(0,u.useState)(!1),[v,b]=(0,u.useMemo)((()=>gm(n,i.mediaType)),[n,i.mediaType]),{createErrorNotice:k,createSuccessNotice:E}=(0,m.useDispatch)(bf.store),S=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),w=(0,u.useCallback)((e=>{if(y)return;const t=(0,a.cloneBlock)(e),{id:n,url:o,caption:i}=t.attributes;n?r(t):(h(!0),window.fetch(o).then((e=>e.blob())).then((e=>{S({filesList:[e],additionalData:{caption:i},onFileChange(e){let[n]=e;(0,mm.isBlobURL)(n.url)||(r({...t,attributes:{...t.attributes,id:n.id,url:n.url}}),E((0,_.__)("Image uploaded and inserted."),{type:"snackbar"}),h(!1))},allowedTypes:hm,onError(e){k(e,{type:"snackbar"}),h(!1)}})})).catch((()=>{s(!0),h(!1)})))}),[y,r,S,k,E]),C=(null===(t=n.title)||void 0===t?void 0:t.rendered)||n.title;let I;if(C.length>25){const e="...";I=C.slice(0,25-e.length)+e}const A=(0,u.useCallback)((()=>f(!0)),[]),x=(0,u.useCallback)((()=>f(!1)),[]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(cf,{isEnabled:!0,blocks:[v]},(e=>{let{draggable:t,onDragStart:r,onDragEnd:l}=e;return(0,u.createElement)("div",{className:d()("block-editor-inserter__media-list__list-item",{"is-hovered":p}),draggable:t,onDragStart:r,onDragEnd:l},(0,u.createElement)(g.Tooltip,{text:I||C},(0,u.createElement)("div",{onMouseEnter:A,onMouseLeave:x},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},o,{className:"block-editor-inserter__media-list__item",onClick:()=>w(v),"aria-label":C}),(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview"},b,y&&(0,u.createElement)("div",{className:"block-editor-inserter__media-list__item-preview-spinner"},(0,u.createElement)(g.Spinner,null)))),!y&&(0,u.createElement)(bm,{category:i,media:n}))))})),l&&(0,u.createElement)(_m,{onClose:()=>s(!1),onSubmit:()=>{r((0,a.cloneBlock)(v)),E((0,_.__)("Image inserted."),{type:"snackbar"}),s(!1)}}))}var Em=function(e){let{mediaList:t,category:n,onClick:r,label:o=(0,_.__)("Media List")}=e;const i=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},i,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o}),t.map(((e,t)=>(0,u.createElement)(km,{key:e.id||e.sourceId||t,media:e,category:n,onClick:r,composite:i}))))};function Sm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,u.useState)(e),[r,o]=(0,u.useState)(e),i=(0,f.useDebounce)(o,250);return(0,u.useEffect)((()=>{r!==t&&i(t)}),[r,t]),[t,n,r]}function wm(e){let{rootClientId:t,onInsert:n,category:r}=e;const o=(0,u.useRef)();return(0,u.useEffect)((()=>{const e=setTimeout((()=>{const[e]=Ml.focus.tabbable.find(o.current);null==e||e.focus()}));return()=>clearTimeout(e)}),[r]),(0,u.createElement)("div",{ref:o,className:"block-editor-inserter__media-dialog"},(0,u.createElement)(Cm,{rootClientId:t,onInsert:n,category:r}))}function Cm(e){let{rootClientId:t,onInsert:n,category:r}=e;const[o,i,l]=Sm(),{mediaList:a,isLoading:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=(0,u.useState)(),[o,i]=(0,u.useState)(!1),l=(0,u.useRef)();return(0,u.useEffect)((()=>{(async()=>{var n;const o=JSON.stringify({category:e.name,...t});l.current=o,i(!0),r([]);const a=await(null===(n=e.fetch)||void 0===n?void 0:n.call(e,t));o===l.current&&(r(a),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:o}}(r,{per_page:l?20:10,search:l}),c="block-editor-inserter__media-panel",p=r.labels.search_items||(0,_.__)("Search");return(0,u.createElement)("div",{className:c},(0,u.createElement)(g.SearchControl,{className:`${c}-search`,onChange:i,value:o,label:p,placeholder:p}),s&&(0,u.createElement)("div",{className:`${c}-spinner`},(0,u.createElement)(g.Spinner,null)),!s&&!(null!=a&&a.length)&&(0,u.createElement)(xf,null),!s&&!(null==a||!a.length)&&(0,u.createElement)(Em,{rootClientId:t,onClick:n,mediaList:a,category:r}))}var Im=function(e){let{fallback:t=null,children:n}=e;const r=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().mediaUpload}),[]);return r?n:t};var Am=(0,g.withFilters)("editor.MediaUpload")((()=>null));const xm=["image","video","audio"];var Bm=function(e){let{rootClientId:t,selectedCategory:n,onSelectCategory:r,onInsert:o}=e;const i=pm(t),l=(0,f.useViewportMatch)("medium","<"),a="block-editor-inserter__media-tabs",s=(0,u.useCallback)((e=>{if(null==e||!e.url)return;const[t]=gm(e,e.type);o(t)}),[o]),c=(0,u.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return(0,u.createElement)(u.Fragment,null,!l&&(0,u.createElement)("div",{className:`${a}-container`},(0,u.createElement)("nav",{"aria-label":(0,_.__)("Media categories")},(0,u.createElement)(g.__experimentalItemGroup,{role:"list",className:a},i.map((e=>(0,u.createElement)(g.__experimentalItem,{role:"listitem",key:e.name,onClick:()=>r(e),className:d()(`${a}__media-category`,{"is-selected":n===e}),"aria-label":e.labels.name,"aria-current":e===n?"true":void 0},(0,u.createElement)(g.__experimentalHStack,null,(0,u.createElement)(g.FlexBlock,null,e.labels.name),(0,u.createElement)(Xi,{icon:mp}))))),(0,u.createElement)("div",{role:"listitem"},(0,u.createElement)(Im,null,(0,u.createElement)(Am,{multiple:!1,onSelect:s,allowedTypes:xm,render:e=>{let{open:t}=e;return(0,u.createElement)(g.Button,{onClick:e=>{e.target.focus(),t()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal"},(0,_.__)("Open Media Library"))}})))))),l&&(0,u.createElement)(tm,{categories:c},(e=>(0,u.createElement)(Cm,{onInsert:o,rootClientId:t,category:e}))))};const{Fill:Pm,Slot:Tm}=(0,g.createSlotFill)("__unstableInserterMenuExtension");Pm.Slot=Tm;var Om=Pm;const Nm=[];var Mm=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:a,maxBlockPatterns:s,maxBlockTypes:c,showBlockDirectory:p=!1,isDraggable:d=!0,shouldFocusBlock:m=!0,prioritizePatterns:y,selectBlockOnInsert:h,orderInitialBlockItems:v}=e;const b=(0,f.useDebounce)(dn.speak,500),[k,E]=Bf({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:a,shouldFocusBlock:m,selectBlockOnInsert:h}),[S,w,C,I]=yf(k,E),[A,,x]=_f(E,k),B=(0,u.useMemo)((()=>{if(0===s)return[];const e=qf(A,t);return void 0!==s?e.slice(0,s):e}),[t,A,s]);let P=c;y&&B.length>2&&(P=0);const T=(0,u.useMemo)((()=>{if(0===P)return[];let e=J(S,"frecency","desc");!t&&v&&(e=v(e));const n=Kf(e,w,C,t);return void 0!==P?n.slice(0,P):n}),[t,S,w,C,c,v]);(0,u.useEffect)((()=>{if(!t)return;const e=T.length+B.length,n=(0,_.sprintf)((0,_._n)("%d result found.","%d results found.",e),e);b(n)}),[t,b]);const O=(0,f.useAsyncList)(T,{step:9}),N=(0,f.useAsyncList)(O.length===T.length?B:Nm),M=T.length>0||B.length>0,R=!!T.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Blocks"))},(0,u.createElement)(ff,{items:O,onSelect:I,onHover:r,label:(0,_.__)("Blocks"),isDraggable:d})),F=!!B.length&&(0,u.createElement)(mf,{title:(0,u.createElement)(g.VisuallyHidden,null,(0,_.__)("Block Patterns"))},(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,u.createElement)(wf,{shownPatterns:N,blockPatterns:B,onClickPattern:x,onHover:r,isDraggable:d})));return(0,u.createElement)(gf,null,!p&&!M&&(0,u.createElement)(xf,null),y?F:R,!!T.length&&!!B.length&&(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),y?R:F,p&&(0,u.createElement)(Om.Slot,{fillProps:{onSelect:I,onHover:r,filterValue:t,hasItems:M,rootClientId:k}},(e=>e.length?e:M?null:(0,u.createElement)(xf,null))))};const Rm={name:"blocks",title:(0,_.__)("Blocks")},Fm={name:"patterns",title:(0,_.__)("Patterns")},Lm={name:"reusable",title:(0,_.__)("Reusable"),icon:G},Dm={name:"media",title:(0,_.__)("Media")};var Um=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,showMedia:o=!1,onSelect:i,prioritizePatterns:l}=e;const a=(0,u.useMemo)((()=>{const e=[];return l&&n&&e.push(Fm),e.push(Rm),!l&&n&&e.push(Fm),o&&e.push(Dm),r&&e.push(Lm),e}),[l,Rm,n,Fm,r,o,Lm]);return(0,u.createElement)(g.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)};var jm=(0,u.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:a,showMostUsedBlocks:s,__experimentalFilterValue:c="",shouldFocusBlock:p=!0,prioritizePatterns:f}=e;const[y,h,v]=Sm(c),[b,k]=(0,u.useState)(null),[E,S]=(0,u.useState)(null),[w,C]=(0,u.useState)(null),[I,A]=(0,u.useState)(null),[x,B,P]=Bf({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:p}),{showPatterns:T,inserterItems:O}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:t,getInserterItems:n}=e(xr);return{showPatterns:!!t(x).length,inserterItems:n(x)}}),[x]),N=(0,u.useMemo)((()=>O.some((e=>{let{category:t}=e;return"reusable"===t}))),[O]),M=!!pm(x).length,R=(0,u.useCallback)(((e,t,n)=>{B(e,t,n),l()}),[B,l]),F=(0,u.useCallback)(((e,t)=>{B(e,{patternName:t}),l()}),[B,l]),L=(0,u.useCallback)((e=>{P(!!e),k(e)}),[P,k]),D=(0,u.useCallback)((e=>{P(!!e)}),[P]),U=(0,u.useCallback)((e=>{S(e)}),[S]),j=(0,u.useMemo)((()=>(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:"block-editor-inserter__block-list"},(0,u.createElement)(vf,{rootClientId:x,onInsert:R,onHover:L,showMostUsedBlocks:s})),a&&(0,u.createElement)("div",{className:"block-editor-inserter__tips"},(0,u.createElement)(g.VisuallyHidden,{as:"h2"},(0,_.__)("A tip for using the block editor")),(0,u.createElement)(fp,null)))),[x,R,L,v,s,a]),z=(0,u.useMemo)((()=>(0,u.createElement)(am,{rootClientId:x,onInsert:F,onSelectCategory:U,selectedCategory:E})),[x,F,U,E]),V=(0,u.useMemo)((()=>(0,u.createElement)(um,{rootClientId:x,onInsert:R,onHover:L})),[x,R,L]),G=(0,u.useMemo)((()=>(0,u.createElement)(Bm,{rootClientId:x,selectedCategory:w,onSelectCategory:C,onInsert:R})),[x,R,w,C]),H=(0,u.useCallback)((e=>"blocks"===e.name?j:"patterns"===e.name?z:"reusable"===e.name?V:"media"===e.name?G:void 0),[j,z,V,G]),W=(0,u.useRef)();(0,u.useImperativeHandle)(t,(()=>({focusSearch:()=>{W.current.focus()}})));const $="patterns"===I&&!v&&E,K=!v&&(T||N||M),q="media"===I&&!v&&w;return(0,u.createElement)("div",{className:"block-editor-inserter__menu"},(0,u.createElement)("div",{className:d()("block-editor-inserter__main-area",{"show-as-tabs":K})},(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{b&&k(null),h(e)},value:y,label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search"),ref:W}),!!v&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},(0,u.createElement)(Mm,{filterValue:v,onSelect:l,onHover:L,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:p})),K&&(0,u.createElement)(Um,{showPatterns:T,showReusableBlocks:N,showMedia:M,prioritizePatterns:f,onSelect:A},H),!v&&!K&&(0,u.createElement)("div",{className:"block-editor-inserter__no-tab-container"},j)),q&&(0,u.createElement)(wm,{rootClientId:x,onInsert:R,category:w}),a&&b&&(0,u.createElement)(rf,{item:b}),$&&(0,u.createElement)(im,{rootClientId:x,onInsert:F,onHover:D,category:E,showTitlesAsTooltip:!0}))}));function zm(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a}=e;const[s,c]=(0,u.useState)(""),[p,f]=Bf({onSelect:t,rootClientId:n,clientId:r,isAppender:o,selectBlockOnInsert:l}),[y]=yf(p,f),[h]=_f(f,p),{setInserterIsOpened:v,insertionIndex:b}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(xr),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),k=h.length&&(!!s||i),E=k&&h.length>6||y.length>6;(0,u.useEffect)((()=>{v&&v(!1)}),[v]);let S=0;return k&&(S=i?4:2),(0,u.createElement)("div",{className:d()("block-editor-inserter__quick-inserter",{"has-search":E,"has-expand":v})},E&&(0,u.createElement)(g.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{c(e)},label:(0,_.__)("Search for blocks and patterns"),placeholder:(0,_.__)("Search")}),(0,u.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,u.createElement)(Mm,{filterValue:s,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:S,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i,selectBlockOnInsert:l,orderInitialBlockItems:a})),v&&(0,u.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:s})},"aria-label":(0,_.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,_.__)("Browse all")))}const Vm=e=>{let{onToggle:t,disabled:n,isOpen:r,blockTitle:o,hasSingleBlockType:i,toggleProps:l={},prioritizePatterns:a}=e;const{as:s=g.Button,label:p,onClick:d,...f}=l;let m=p;return!m&&i?m=(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),o):!m&&a?m=(0,_.__)("Add pattern"):m||(m=(0,_._x)("Add block","Generic label for block inserter button")),(0,u.createElement)(s,c({icon:pp,label:m,tooltipPosition:"bottom",onClick:function(e){t&&t(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&r,disabled:n},f))};class Gm extends u.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=Vm,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:a,onSelectOrClose:s,selectBlockOnInsert:c,orderInitialBlockItems:p}=this.props;return l?(0,u.createElement)(zm,{onSelect:e=>{const n=Array.isArray(e)&&null!=e&&e.length?e[0]:e;s&&"function"==typeof s&&s(n),t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:a,selectBlockOnInsert:c,orderInitialBlockItems:p}):(0,u.createElement)(jm,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,prioritizePatterns:a})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,u.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:d()("block-editor-inserter__popover",{"is-quick":o}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,_.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}const Hm=(0,f.compose)([(0,m.withSelect)(((e,t)=>{var n;let{clientId:r,rootClientId:o,shouldDirectInsert:i=!0}=t;const{getBlockRootClientId:l,hasInserterItems:s,getAllowedBlocks:c,__experimentalGetDirectInsertBlock:u,getSettings:p}=e(xr),{getBlockVariations:d}=e(a.store);o=o||l(r)||void 0;const f=c(o),m=i&&u(o),y=p(),g=1===(null==f?void 0:f.length)&&0===(null===(n=d(f[0].name,"inserter"))||void 0===n?void 0:n.length);let h=!1;return g&&(h=f[0]),{hasItems:s(o),hasSingleBlockType:g,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:m,rootClientId:o,prioritizePatterns:y.__experimentalPreferPatternsOnRoot&&!o}})),(0,m.withDispatch)(((e,t,n)=>{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:o,isAppender:i,hasSingleBlockType:l,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u,selectBlockOnInsert:p}=t;if(!l&&!c)return;const{insertBlock:d}=e(xr);let f;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=r(xr);if(!e||!o&&!n)return{};const l={};let a={};if(o){const e=t(o),n=t(i(o));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);f=(0,a.createBlock)(c.name,{...c.attributes||{},...e})}else f=(0,a.createBlock)(s.name);var m;(d(f,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:l,getBlockRootClientId:a}=r(xr);if(o)return e(o);const s=t();return!i&&s&&a(s)===n?e(s)+1:l(n).length}(),n,p),u)&&u({clientId:null===(m=f)||void 0===m?void 0:m.clientId});const y=(0,_.sprintf)((0,_.__)("%s block added"),s.title);(0,dn.speak)(y)}}})),(0,f.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(Gm);var Wm=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(Hm,c({ref:t},e,{orderInitialBlockItems:void 0}))));var $m=(0,f.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(xr),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(xr);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,up.decodeEntities)(o)||(0,_.__)("Type / to choose a block");return(0,u.createElement)("div",{"data-root-client-id":i||"",className:d()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,u.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,_.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Xu.ENTER!==e.keyCode&&Xu.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,u.createElement)(Wm,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Km(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,u.createElement)(Wm,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:a,isOpen:s,blockTitle:c,hasSingleBlockType:p}=e;n=p?(0,_.sprintf)((0,_._x)("Add %s","directly add the only allowed block"),c):(0,_._x)("Add block","Generic label for block inserter button");const f=!p;let m=(0,u.createElement)(g.Button,{ref:t,onFocus:o,tabIndex:i,className:d()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!p&&(0,u.createElement)(g.VisuallyHidden,{as:"span"},n),(0,u.createElement)(Xi,{icon:pp}));return(f||p)&&(m=(0,u.createElement)(g.Tooltip,{text:n},m)),m},isAppender:!0})}const qm=(0,u.forwardRef)(((e,t)=>($()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Km(e,t))));var Jm=(0,u.forwardRef)(Km);function Ym(e){let{rootClientId:t}=e;return(0,m.useSelect)((e=>e(xr).canInsertBlockType((0,a.getDefaultBlockName)(),t)))?(0,u.createElement)($m,{rootClientId:t}):(0,u.createElement)(Jm,{rootClientId:t,className:"block-list-appender__toggle"})}var Qm=function(e){let{rootClientId:t,renderAppender:n,className:r,tagName:o="div"}=e;const i=function(e,t){const{hideInserter:n,isParentSelected:r}=(0,m.useSelect)((t=>{const{getTemplateLock:n,getSelectedBlockClientId:r,__unstableGetEditorMode:o}=t(xr),i=r();return{hideInserter:!!n(e)||"zoom-out"===o(),isParentSelected:e===i||!e&&!i}}),[e]);return n||!1===t?null:t?(0,u.createElement)(t,null):r?(0,u.createElement)(Ym,{rootClientId:e}):null}(t,n);return i?(0,u.createElement)(o,{tabIndex:-1,className:d()("block-list-appender wp-block",r),contentEditable:!1,"data-block":!0},i):null};const Zm=Number.MAX_SAFE_INTEGER;(0,u.createContext)();var Xm=function(e){let{previousClientId:t,nextClientId:n,children:r,__unstablePopoverSlot:o,__unstableContentRef:i,...l}=e;const[a,s]=(0,u.useReducer)((e=>(e+1)%Zm),0),{orientation:p,rootClientId:f,isVisible:y}=(0,m.useSelect)((e=>{var r;const{getBlockListSettings:o,getBlockRootClientId:i,isBlockVisible:l}=e(xr),a=i(null!=t?t:n);return{orientation:(null===(r=o(a))||void 0===r?void 0:r.orientation)||"vertical",rootClientId:a,isVisible:l(t)&&l(n)}}),[t,n]),h=eo(t),v=eo(n),b="vertical"===p,k=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return{};const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(b)return{width:e?e.width:t.width,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,_.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:e?e.height:t.height}}),[h,v,b,a,y]),E=(0,u.useMemo)((()=>{if(a<0||!h&&!v||!y)return;const{ownerDocument:e}=h||v;return{ownerDocument:e,getBoundingClientRect(){const e=h?h.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;let n=0,r=0;return b?(r=e?e.bottom:t.top,n=(0,_.isRTL)()?e?e.right:t.right:e?e.left:t.left):(r=e?e.top:t.top,n=(0,_.isRTL)()?e?e.left:t.right:e?e.right:t.left),new window.DOMRect(n,r,0,0)}}}),[h,v,a,b,y]),S=qo(i);return(0,u.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(s);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]),(0,u.useLayoutEffect)((()=>{if(!v)return;const e=new window.MutationObserver(s);return e.observe(v,{attributes:!0}),()=>{e.disconnect()}}),[v]),(0,u.useLayoutEffect)((()=>{if(h)return h.ownerDocument.defaultView.addEventListener("resize",s),()=>{var e;null===(e=h.ownerDocument.defaultView)||void 0===e||e.removeEventListener("resize",s)}}),[h]),(h||v)&&y?(0,u.createElement)(g.Popover,c({ref:S,animate:!1,anchor:E,focusOnMount:!1,__unstableSlotName:o||null,key:n+"--"+f},l,{className:d()("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"bottom-start",variant:"unstyled"}),(0,u.createElement)("div",{className:"block-editor-block-popover__inbetween-container",style:k},r)):null};const ey={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var ty=function(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{clientId:r}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(xr),r=n(),o=t(r.rootClientId);return o.length?{clientId:o[r.index]}:{}}),[]),o=(0,f.useReducedMotion)();return(0,u.createElement)(Yo,{clientId:r,__unstableCoverTarget:!0,__unstablePopoverSlot:t,__unstableContentRef:n,className:"block-editor-block-popover__drop-zone"},(0,u.createElement)(g.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?ey.show:ey.hide,animate:ey.show,exit:o?ey.show:ey.exit,className:"block-editor-block-popover__drop-zone-foreground"}))};const ny=(0,u.createContext)();function ry(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,m.useDispatch)(xr),i=(0,u.useContext)(ny),l=(0,u.useRef)(),{orientation:a,previousClientId:s,nextClientId:c,rootClientId:p,isInserterShown:y,isDistractionFree:h,isNavigationMode:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a,getSettings:s,isNavigationMode:c}=e(xr),u=o(),p=n(u.rootClientId);if(!p.length)return{};let d=p[u.index-1],f=p[u.index];for(;i(d);)d=l(d);for(;i(f);)f=a(f);const m=s();return{previousClientId:d,nextClientId:f,orientation:(null===(t=r(u.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:u.rootClientId,isNavigationMode:c(),isDistractionFree:m.isDistractionFree,isInserterShown:null==u?void 0:u.__unstableWithInserter}}),[]),b=(0,f.useReducedMotion)();const _={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:y?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},k={start:{scale:b?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(h&&!v)return null;const E=d()("block-editor-block-list__insertion-point","is-"+a);return(0,u.createElement)(Xm,{previousClientId:s,nextClientId:c,__unstablePopoverSlot:t,__unstableContentRef:n},(0,u.createElement)(g.__unstableMotion.div,{layout:!b,initial:b?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&c&&r(c,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:d()(E,{"is-with-inserter":y}),onHoverEnd:function(e){e.target!==l.current||i.current||o()}},(0,u.createElement)(g.__unstableMotion.div,{variants:_,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),y&&(0,u.createElement)(g.__unstableMotion.div,{variants:k,className:d()("block-editor-block-list__insertion-point-inserter")},(0,u.createElement)(Wm,{position:"bottom center",clientId:c,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function oy(e){const{insertionPoint:t,isVisible:n}=(0,m.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n}=e(xr);return{insertionPoint:t(),isVisible:n()}}),[]);return n?"replace"===t.operation?(0,u.createElement)(ty,c({key:`${t.rootClientId}-${t.index}`},e)):(0,u.createElement)(ry,e):null}function iy(){const e=(0,u.useContext)(ny),t=(0,m.useSelect)((e=>e(xr).getSettings().isDistractionFree||"zoom-out"===e(xr).__unstableGetEditorMode()),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:a,getTemplateLock:s,__unstableIsWithinBlockOverlay:c}=(0,m.useSelect)(xr),{showInsertionPoint:p,hideInsertionPoint:d}=(0,m.useDispatch)(xr);return(0,f.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",i),()=>{r.removeEventListener("mousemove",i)};function i(t){var r;if(e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void d();let i;if(!t.target.classList.contains("is-root-container")){i=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(s(i))return;const u=(null===(r=n(i))||void 0===r?void 0:r.orientation)||"vertical",f=t.clientY,m=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===u&&t.top>f||e.classList.contains("wp-block")&&"horizontal"===u&&t.left>m}));if(!y)return void d();if(!y.id&&(y=y.firstElementChild,!y))return void d();const g=y.id.slice("block-".length);if(!g||c(g))return;if(a().includes(g))return;const h=y.getBoundingClientRect();if("horizontal"===u&&(t.clientY>h.bottom||t.clientYh.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,ay="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function sy(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(xr),{getBlockType:o,getActiveBlockVariation:i}=t(a.store),l=n(e),s=o(l);if(!s)return null;const c=r(e),u=i(l,c),p=(0,a.isReusableBlock)(s)||(0,a.isTemplatePart)(s),d={isSynced:p,title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{isSynced:p,title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description,anchor:null==c?void 0:c.anchor}:d}),[e])}function cy(e){let{clientId:t,maximumLength:n,context:r}=e;const{attributes:o,name:i,reusableBlockTitle:l}=(0,m.useSelect)((e=>{if(!t)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:o}=e(xr),i=n(t);if(!i)return{};const l=(0,a.isReusableBlock)((0,a.getBlockType)(i));return{attributes:r(t),name:i,reusableBlockTitle:l&&o(r(t).ref)}}),[t]),s=sy(t);if(!i||!s)return null;const c=(0,a.getBlockType)(i),u=c?(0,a.__experimentalGetBlockLabel)(c,o,r):null,p=l||u,d=p&&p!==c.title?p:s.title;if(n&&n>0&&d.length>n){const e="...";return d.slice(0,n-e.length)+e}return d}function uy(e){let{clientId:t,maximumLength:n,context:r}=e;return cy({clientId:t,maximumLength:n,context:r})}var py=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:o,onDragEnd:i}=e;const{srcRootClientId:l,isDraggable:s,icon:c}=(0,m.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:o,getBlockName:i}=e(xr),l=o(n[0]),s=i(n[0]);return{srcRootClientId:l,isDraggable:r(n,l),icon:null===(t=(0,a.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,u.useRef)(!1),[d,f,y]=function(){const e=(0,u.useRef)(null),t=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,u.useRef)(null);return(0,u.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,u.useCallback)((o=>{e.current=o.clientY,n.current=(0,Ml.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,u.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:v}=(0,m.useDispatch)(xr);if((0,u.useEffect)((()=>()=>{p.current&&v()}),[]),!s)return t({draggable:!1});const b={type:"block",srcClientIds:n,srcRootClientId:l};return(0,u.createElement)(g.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:b,onDragStart:e=>{h(n),p.current=!0,d(e),o&&o()},onDragOver:f,onDragEnd:()=>{v(),p.current=!1,y(),i&&i()},__experimentalDragComponent:(0,u.createElement)(sf,{count:n.length,icon:c})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var dy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var fy=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const my=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,_.isRTL)()?"left":"right":"down":null;function yy(e,t,n,r,o,i,l){const a=n+1;if(e>1)return function(e,t,n,r,o,i){const l=t+1;if(n&&r)return(0,_.__)("All blocks are selected, and cannot be moved");if(o>0&&!r){const t=my("down",i);if("down"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d down by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o>0&&r){const e=my("down",i);if("down"===e)return(0,_.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(o<0&&!n){const t=my("up",i);if("up"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d up by one place"),e,l);if("left"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d left by one place"),e,l);if("right"===t)return(0,_.sprintf)((0,_.__)("Move %1$d blocks from position %2$d right by one place"),e,l)}if(o<0&&n){const e=my("up",i);if("up"===e)return(0,_.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,_.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,_.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,r,o,i,l);if(r&&o)return(0,_.sprintf)((0,_.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=my("down",l);if("down"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,_.sprintf)((0,_.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=my("up",l);if("up"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,_.sprintf)((0,_.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const gy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?mp:yp:dy:"down"===e?"horizontal"===t?(0,_.isRTL)()?yp:mp:fy:null,hy=(e,t)=>"up"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move right"):(0,_.__)("Move left"):(0,_.__)("Move up"):"down"===e?"horizontal"===t?(0,_.isRTL)()?(0,_.__)("Move left"):(0,_.__)("Move right"):(0,_.__)("Move down"):null,vy=(0,u.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:o,...i}=e;const l=(0,f.useInstanceId)(vy),s=Array.isArray(n)?n:[n],p=s.length,{blockType:y,isDisabled:h,rootClientId:v,isFirst:b,isLast:_,firstIndex:k,orientation:E="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(xr),u=s[0],p=n(u),d=t(u),f=t(s[s.length-1]),m=i(p),y=l(u),g=0===d,h=f===m.length-1,{orientation:v}=c(p)||{};return{blockType:y?(0,a.getBlockType)(y.name):null,isDisabled:"up"===r?g:h,rootClientId:p,firstIndex:d,isFirst:g,isLast:h,orientation:o||v}}),[n,r]),{moveBlocksDown:S,moveBlocksUp:w}=(0,m.useDispatch)(xr),C="up"===r?w:S,I=`block-editor-block-mover-button__description-${l}`;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,c({ref:t,className:d()("block-editor-block-mover-button",`is-${r}-button`),icon:gy(r,E),label:hy(r,E),"aria-describedby":I},i,{onClick:h?null:e=>{C(n,v),i.onClick&&i.onClick(e)},disabled:h,__experimentalIsFocusable:!0})),(0,u.createElement)(g.VisuallyHidden,{id:I},yy(p,y&&y.title,k,b,_,"up"===r?-1:1,E)))})),by=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"up",ref:t},e)))),_y=(0,u.forwardRef)(((e,t)=>(0,u.createElement)(vy,c({direction:"down",ref:t},e))));var ky=function(e){let{clientIds:t,hideDragHandle:n}=e;const{canMove:r,rootClientId:o,isFirst:i,isLast:l,orientation:a}=(0,m.useSelect)((e=>{var n;const{getBlockIndex:r,getBlockListSettings:o,canMoveBlocks:i,getBlockOrder:l,getBlockRootClientId:a}=e(xr),s=Array.isArray(t)?t:[t],c=s[0],u=a(c),p=r(c),d=r(s[s.length-1]),f=l(u);return{canMove:i(t,u),rootClientId:u,isFirst:0===p,isLast:d===f.length-1,orientation:null===(n=o(u))||void 0===n?void 0:n.orientation}}),[t]);if(!r||i&&l&&!o)return null;const s=(0,_.__)("Drag");return(0,u.createElement)(g.ToolbarGroup,{className:d()("block-editor-block-mover",{"is-horizontal":"horizontal"===a})},!n&&(0,u.createElement)(py,{clientIds:t},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:s,tabIndex:"-1"},e)))),(0,u.createElement)("div",{className:"block-editor-block-mover__move-button-container"},(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(by,c({clientIds:t},e)))),(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(_y,c({clientIds:t},e))))))};var Ey=function(e){let{clientId:t,rootClientId:n}=e;const r=sy(t),o=(0,m.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a,__unstableGetEditorMode:s}=e(xr),c=i(t),{name:u,attributes:p}=o(t);return{index:c,name:u,attributes:p,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation,editorMode:s()}}),[t,n]),{index:i,name:l,attributes:s,blockMovingMode:p,orientation:f,editorMode:y}=o,{setNavigationMode:h,removeBlock:v}=(0,m.useDispatch)(xr),b=(0,u.useRef)(),k=(0,a.getBlockType)(l),E=(0,a.__experimentalGetAccessibleBlockLabel)(k,s,i+1,f);(0,u.useEffect)((()=>{b.current.focus(),(0,dn.speak)(E)}),[E]);const S=eo(t),{hasBlockMovingClientId:w,getBlockIndex:C,getBlockRootClientId:I,getClientIdsOfDescendants:A,getSelectedBlockClientId:x,getMultiSelectedBlocksEndClientId:B,getPreviousBlockClientId:P,getNextBlockClientId:T}=(0,m.useSelect)(xr),{selectBlock:O,clearSelectedBlock:N,setBlockMovingClientId:M,moveBlockToPosition:R}=(0,m.useDispatch)(xr),F=d()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!p}),L=(0,_.__)("Drag");return(0,u.createElement)("div",{className:F},(0,u.createElement)(g.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(hp,{icon:null==r?void 0:r.icon,showColors:!0})),(0,u.createElement)(g.FlexItem,null,"zoom-out"===y&&(0,u.createElement)(ky,{clientIds:[t],hideDragHandle:!0}),"navigation"===y&&(0,u.createElement)(py,{clientIds:[t]},(e=>(0,u.createElement)(g.Button,c({icon:af,className:"block-selection-button_drag-handle","aria-hidden":"true",label:L,tabIndex:"-1"},e))))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{ref:b,onClick:"navigation"===y?()=>h(!1):void 0,onKeyDown:function(e){const{keyCode:n}=e,r=n===Xu.UP,o=n===Xu.DOWN,i=n===Xu.LEFT,l=n===Xu.RIGHT,a=n===Xu.TAB,s=n===Xu.ESCAPE,c=n===Xu.ENTER,u=n===Xu.SPACE,p=e.shiftKey;if(n===Xu.BACKSPACE||n===Xu.DELETE)return v(t),void e.preventDefault();const d=x(),f=B(),m=P(f||d),y=T(f||d),g=a&&p||r,h=a&&!p||o,b=i,_=l;let k;if(g)k=m;else if(h)k=y;else if(b){var E;k=null!==(E=I(d))&&void 0!==E?E:d}else if(_){var F;k=null!==(F=A([d])[0])&&void 0!==F?F:d}const L=w();if(s&&L&&!e.defaultPrevented&&(M(null),e.preventDefault()),(c||u)&&L){const e=I(L),t=I(d),n=C(L);let r=C(d);n{!function(e){const[t]=Ml.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[]);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",a),(0,u.useEffect)((()=>{i&&a()}),[n,i,a]),(0,u.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Sy(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Sy(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Cy=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const l=(0,u.useRef)(),a=function(e){const[t,n]=(0,u.useState)(!0),r=(0,u.useCallback)((()=>{const t=!Ml.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||$()("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,u.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(l);return wy(l,n,a,r,o),a?(0,u.createElement)(g.Toolbar,c({label:i["aria-label"],ref:l},i),t):(0,u.createElement)(g.NavigableMenu,c({orientation:"horizontal",role:"toolbar",ref:l},i),t)};const{clearTimeout:Iy,setTimeout:Ay}=window,xy=()=>{},By=200;function Py(e){let{ref:t,isFocused:n,debounceTimeout:r=By,onChange:o=xy}=e;const[i,l]=(0,u.useState)(!1),a=(0,u.useRef)(),s=e=>{null!=t&&t.current&&l(e),o(e)},c=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=a.current;e&&Iy&&Iy(e)};return(0,u.useEffect)((()=>()=>{s(!1),p()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),i||s(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),a.current=Ay((()=>{c()&&s(!1)}),r)}}}function Ty(e){let{ref:t,debounceTimeout:n=By,onChange:r=xy}=e;const[o,i]=(0,u.useState)(!1),{showMovers:l,debouncedShowMovers:a,debouncedHideMovers:s}=Py({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),c=(0,u.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,u.useEffect)((()=>{const e=t.current,n=()=>{p()&&(i(!0),a())},r=()=>{p()||(i(!1),s())};return e&&!c.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),c.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,c,i,a,s]),{showMovers:l,gestures:{onMouseMove:a,onMouseLeave:s}}}function Oy(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(xr),{firstParentClientId:n,shouldHide:r,isDistractionFree:o}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:o}=e(xr),{hasBlockSupport:i}=e(a.store),l=n(r()),s=l[l.length-1],c=t(s),u=(0,a.getBlockType)(c),p=o();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),isDistractionFree:p.isDistractionFree}}),[]),i=sy(n),l=(0,u.useRef)(),{gestures:s}=Ty({ref:l,onChange(e){e&&o||t(n,e)}});return r||void 0===n?null:(0,u.createElement)("div",c({className:"block-editor-block-parent-selector",key:n,ref:l},s),(0,u.createElement)(g.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,_.sprintf)((0,_.__)("Select %s"),null==i?void 0:i.title),showTooltip:!0,icon:(0,u.createElement)(hp,{icon:null==i?void 0:i.icon})}))}var Ny=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 My(e){let{blocks:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",placement:"bottom-start",focusOnMount:!1},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(tf,{viewportWidth:500,blocks:t})))))}function Ry(e){let{restTransformations:t,onSelect:n,setHoveredTransformItemName:r}=e;return t.map((e=>(0,u.createElement)(Fy,{key:e.name,item:e,onSelect:n,setHoveredTransformItemName:r})))}function Fy(e){let{item:t,onSelect:n,setHoveredTransformItemName:r}=e;const{name:o,icon:i,title:l,isDisabled:s}=t;return(0,u.createElement)(g.MenuItem,{className:(0,a.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),n(o)},disabled:s,onMouseLeave:()=>r(null),onMouseEnter:()=>r(o)},(0,u.createElement)(hp,{icon:i,showColors:!0}),l)}var Ly=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:o}=e;const[i,l]=(0,u.useState)(),{priorityTextTransformations:s,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,u.useMemo)((()=>{const n=Object.keys(t);return e.reduce(((e,t)=>{const{name:r}=t;return n.includes(r)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]})}),[e]);return n.priorityTextTransformations.sort(((e,n)=>{let{name:r}=e,{name:o}=n;return t[r](0,u.createElement)(Fy,{key:e.name,item:e,onSelect:r,setHoveredTransformItemName:l}))),!p&&d),!!p&&(0,u.createElement)(g.MenuGroup,{className:t},d))};var Dy=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Uy=window.wp.tokenList,jy=n.n(Uy);function zy(e,t,n){const r=new(jy())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function Vy(e){return null==e?void 0:e.find((e=>e.isDefault))}function Gy(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:o,blockType:i,className:l}=(0,m.useSelect)((e=>{const{getBlock:n}=e(xr),r=n(t);if(!r)return{};const o=(0,a.getBlockType)(r.name),{getBlockStyles:i}=e(a.store);return{block:r,blockType:o,styles:i(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:s}=(0,m.useDispatch)(xr),c=function(e){return e&&0!==e.length?Vy(e)?e:[{name:"default",label:(0,_._x)("Default","block style"),isDefault:!0},...e]:[]}(r),p=function(e,t){for(const n of new(jy())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=null==e?void 0:e.find((e=>{let{name:n}=e;return n===t}));if(r)return r}return Vy(e)}(c,l),d=function(e,t){return(0,u.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,a.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,a.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(o,i);return{onSelect:e=>{const r=zy(l,p,e);s(t,{className:r}),n()},stylesToRender:c,activeStyle:p,genericPreviewBlock:d,className:l}}const Hy=()=>{};function Wy(e){let{clientId:t,onSwitch:n=Hy}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=Gy({clientId:t,onSwitch:n});return o&&0!==o.length?(0,u.createElement)(u.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,u.createElement)(g.MenuItem,{key:e.name,icon:i.name===e.name?Dy:null,onClick:()=>r(e)},(0,u.createElement)(g.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function $y(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,u.createElement)(Wy,{clientId:r,onSwitch:n}))}const Ky=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=Ky(e,t,n);if(r)return r}}},qy=(e,t)=>{const n=((e,t)=>{const n=(0,a.__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}};var Jy=(e,t)=>(0,u.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,a.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=Ky(o,t.name,r);if(n){e=!0,r.add(n.clientId),qy(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function Yy(e){let{patterns:t,onSelect:n}=e;return(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,u.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,u.createElement)(g.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,u.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,_.__)("Preview")),(0,u.createElement)(Qy,{patterns:t,onSelect:n})))))}function Qy(e){let{patterns:t,onSelect:n}=e;const r=(0,g.__unstableUseCompositeState)();return(0,u.createElement)(g.__unstableComposite,c({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,_.__)("Patterns list")}),t.map((e=>(0,u.createElement)(Zy,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function Zy(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,f.useInstanceId)(Zy,`${o}-list__item-description`);return(0,u.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,u.createElement)(tf,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,u.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,u.createElement)(g.VisuallyHidden,{id:i},t.description))}var Xy=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,u.useState)(!1),l=Jy(n,t);return l.length?(0,u.createElement)(g.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,u.createElement)(Yy,{patterns:l,onSelect:r}),(0,u.createElement)(g.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:mp},(0,_.__)("Patterns"))):null};const eg=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r,multiSelect:o}=(0,m.useDispatch)(xr),i=sy(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,patterns:d}=(0,m.useSelect)((e=>{const{getBlockRootClientId:r,getBlockTransformItems:o,__experimentalGetPatternTransformItems:l}=e(xr),{getBlockStyles:s,getBlockType:c}=e(a.store),{canRemoveBlocks:u}=e(xr),p=r(Array.isArray(t)?t[0]:t),[{name:d}]=n,f=1===n.length,m=f&&s(d);let y;if(f)y=null==i?void 0:i.icon;else{var g;y=1===new Set(n.map((e=>{let{name:t}=e;return t}))).size?null===(g=c(d))||void 0===g?void 0:g.icon:Ny}return{possibleBlockTransformations:o(n,p),canRemove:u(t,p),hasBlockStyles:!(null==m||!m.length),icon:y,patterns:l(n,p)}}),[t,n,null==i?void 0:i.icon]),f=cy({clientId:Array.isArray(t)?t[0]:t,maximumLength:35}),y=1===n.length&&(0,a.isReusableBlock)(n[0]),h=1===n.length&&(0,a.isTemplatePart)(n[0]);function v(e){e.length>1&&o(e[0].clientId,e[e.length-1].clientId)}const b=!!l.length&&s&&!h,k=!(null==d||!d.length)&&s;if(!c&&!b)return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f))}));const E=f,S=1===n.length?(0,_.sprintf)((0,_.__)("%s: Change block type or style"),f):(0,_.sprintf)((0,_._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),w=c||b||k;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(g.DropdownMenu,{className:"block-editor-block-switcher",label:E,popoverProps:{position:"bottom right",variant:"toolbar",className:"block-editor-block-switcher__popover"},icon:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(y||h)&&(0,u.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},f)),toggleProps:{describedBy:S,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:o}=e;return w&&(0,u.createElement)("div",{className:"block-editor-block-switcher__container"},k&&(0,u.createElement)(Xy,{blocks:n,patterns:d,onSelect:e=>{!function(e){r(t,e),v(e)}(e),o()}}),b&&(0,u.createElement)(Ly,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{!function(e){const o=(0,a.switchToBlockType)(n,e);r(t,o),v(o)}(e),o()}}),c&&(0,u.createElement)($y,{hoveredBlock:n[0],onSwitch:o}))})))))};var tg=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(xr).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,u.createElement)(eg,{clientIds:t,blocks:n})};const{Fill:ng,Slot:rg}=(0,g.createSlotFill)("__unstableBlockToolbarLastItem");ng.Slot=rg;var og=ng;function ig(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;if(1!==(null===(n=t.match(e))||void 0===n?void 0:n.length))return!0;const r=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(r))return!0}return!1}function lg(){const{getBlockName:e}=(0,m.useSelect)(xr),{getBlockType:t}=(0,m.useSelect)(a.store),{createSuccessNotice:n}=(0,m.useDispatch)(bf.store);return(0,u.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,_.sprintf)((0,_.__)('Copied "%s" to clipboard.'),a):(0,_.sprintf)((0,_.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,_.sprintf)((0,_._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,_.sprintf)((0,_._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function ag(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:o,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:l,__unstableGetSelectedBlocksWithPartialSelection:s,canInsertBlockType:c}=(0,m.useSelect)(xr),{flashBlock:u,removeBlocks:p,replaceBlocks:d,__unstableDeleteSelection:y,__unstableExpandSelection:g,insertBlocks:h}=(0,m.useDispatch)(xr),v=lg();return(0,f.useRefEffect)((f=>{function m(m){const b=t();if(0===b.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ml.documentHasUncollapsedSelection)(t):(0,Ml.documentHasSelection)(t))return}if(!f.contains(m.target.ownerDocument.activeElement))return;const _=m.defaultPrevented;m.preventDefault();const k=l(),E=i()||o(),S=!E&&!k;if("copy"===m.type||"cut"===m.type)if(1===b.length&&u(b[0]),S)g();else{let t;if(v(m.type,b),E)t=e(b);else{const[n,r]=s();t=[n,...e(b.slice(1,b.length-1)),r]}const n=m.clipboardData.getData("__unstableWrapperBlockName");n&&(t=(0,a.createBlock)(n,JSON.parse(m.clipboardData.getData("__unstableWrapperBlockAttributes")),t));const r=(0,a.serialize)(t);m.clipboardData.setData("text/plain",function(e){e=e.replace(/
/g,"\n");return(0,Ml.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(r)),m.clipboardData.setData("text/html",r)}if("cut"===m.type)E&&!S?p(b):y();else if("paste"===m.type){if(_)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n,files:o}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Ml.getFilesFromDataTransfer)(t);return o.length&&!ig(o,r)?{files:o}:{html:r,plainText:n,files:[]}}(m);let i=[];if(o.length){const e=(0,a.getBlockTransforms)("from");i=o.reduce(((t,n)=>{const r=(0,a.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return r&&t.push(r.transform([n])),t}),[]).flat()}else i=(0,a.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});if(1===b.length){const[e]=b;if(i.every((t=>c(t.name,e))))return void h(i,void 0,e)}d(b,i,i.length-1,-1)}}return f.ownerDocument.addEventListener("copy",m),f.ownerDocument.addEventListener("cut",m),f.ownerDocument.addEventListener("paste",m),()=>{f.ownerDocument.removeEventListener("copy",m),f.ownerDocument.removeEventListener("cut",m),f.ownerDocument.removeEventListener("paste",m)}}),[])}var sg=function(e){let{children:t}=e;return(0,u.createElement)("div",{ref:ag()},t)};const cg="align",ug="__experimentalBorder",pg="color",dg="customClassName",fg="typography.__experimentalFontFamily",mg="typography.fontSize",yg="__experimentalLayout",gg=[...["typography.lineHeight",mg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",fg,"typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing"],ug,pg,"spacing"];const hg={align:e=>(0,a.hasBlockSupport)(e,cg),borderColor:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,ug);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]))}(e,"color"),backgroundColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.background},textColor:e=>{const t=(0,a.getBlockSupport)(e,pg);return t&&!1!==t.text},gradient:e=>{const t=(0,a.getBlockSupport)(e,pg);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,a.hasBlockSupport)(e,dg,!0),fontFamily:e=>(0,a.hasBlockSupport)(e,fg),fontSize:e=>(0,a.hasBlockSupport)(e,mg),layout:e=>(0,a.hasBlockSupport)(e,yg),style:e=>gg.some((t=>(0,a.hasBlockSupport)(e,t)))};function vg(e,t){return Object.entries(hg).reduce(((n,r)=>{let[o,i]=r;return i(e.name)&&i(t.name)&&(n[o]=e.attributes[o]),n}),{})}function bg(e,t,n){for(let r=0;r{let l="";try{if(!window.navigator.clipboard)return void o((0,_.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});l=await window.navigator.clipboard.readText()}catch(e){return void o((0,_.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!l||!function(e){try{const t=(0,a.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(l))return void r((0,_.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const s=(0,a.parse)(l);if(1===s.length?e.batch((()=>{bg(i,i.map((()=>s[0])),t)})):e.batch((()=>{bg(i,s,t)})),1===i.length){var c;const e=null===(c=(0,a.getBlockType)(i[0].name))||void 0===c?void 0:c.title;n((0,_.sprintf)((0,_.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,_.sprintf)((0,_.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,r,o])}function kg(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:o,getBlockRootClientId:i,getBlocksByClientId:l,canMoveBlocks:s,canRemoveBlocks:c}=(0,m.useSelect)(xr),{getDefaultBlockName:u,getGroupingBlockName:p}=(0,m.useSelect)(a.store),d=l(t),f=i(t[0]),y=d.every((e=>!!e&&(0,a.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,f))),g=o(u(),f),h=s(t,f),v=c(t,f),{removeBlocks:b,replaceBlocks:_,duplicateBlocks:k,insertAfterBlock:E,insertBeforeBlock:S,flashBlock:w,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:A}=(0,m.useDispatch)(xr),x=lg(),B=_g();return n({canDuplicate:y,canInsertDefaultBlock:g,canMove:h,canRemove:v,rootClientId:f,blocks:d,onDuplicate(){return k(t,r)},onRemove(){return b(t,r)},onInsertBefore(){const e=Array.isArray(t)?t[0]:e;S(e)},onInsertAfter(){const e=Array.isArray(t)?t[t.length-1]:e;E(e)},onMoveTo(){I(!0),A(t[0]),C(t[0])},onGroup(){if(!d.length)return;const e=p(),n=(0,a.switchToBlockType)(d,e);n&&_(t,n)},onUngroup(){if(!d.length)return;const e=d[0].innerBlocks;e.length&&_(t,e)},onCopy(){const e=d.map((e=>{let{clientId:t}=e;return t}));1===d.length&&w(e[0]),x("copy",e)},async onPasteStyles(){await B(d)}})}const Eg=()=>{};var Sg=(0,f.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:o,getSettings:i}=e(xr),l=r(n),s=i().codeEditingEnabled;return{mode:o(n),blockType:l?(0,a.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=Eg,clientId:r}=t;return{onToggleMode(){e(xr).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:o=!1,isCodeEditingEnabled:i=!0}=e;if(!t||!(0,a.hasBlockSupport)(t,"html",!0)||!i)return null;const l="visual"===n?(0,_.__)("Edit as HTML"):(0,_.__)("Edit visually");return(0,u.createElement)(g.MenuItem,{onClick:r},!o&&l)}));var wg=(0,f.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(xr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(xr).replaceBlocks(n.clientId,(0,a.rawHandler)({HTML:(0,a.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,_.__)("Convert to Blocks");return(0,u.createElement)(g.MenuItem,{onClick:n},!r&&o)}));const{Fill:Cg,Slot:Ig}=(0,g.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Cg.Slot=Ig;var Ag=Cg;function xg(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:o,getSelectedBlockClientIds:i}=e(xr),{getGroupingBlockName:l}=e(a.store),s=i(),c=l(),u=o(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:o}}function Bg(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:o,groupingBlockName:i,onClose:l=(()=>{})}=e;const{replaceBlocks:s}=(0,m.useDispatch)(xr);return n||r?(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=(0,a.switchToBlockType)(o,i);e&&s(t,e)})(),l()}},(0,_._x)("Group","verb")),r&&(0,u.createElement)(g.MenuItem,{onClick:()=>{(()=>{const e=o[0].innerBlocks;e.length&&s(t,e)})(),l()}},(0,_._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Pg(e){return(0,m.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:r,canRemoveBlock:o,canLockBlockType:i,getBlockName:l,getBlockRootClientId:a,getTemplateLock:s}=t(xr),c=a(e),u=n(e),p=r(e,c),d=o(e,c);return{canEdit:u,canMove:p,canRemove:d,canLock:i(l(e)),isContentLocked:"contentOnly"===s(e),isLocked:!u||!p||!d}}),[e])}var Tg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Og=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}));var Ng=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));const Mg=["core/block","core/navigation"];function Rg(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function Fg(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,u.useState)({move:!1,remove:!1}),{canEdit:i,canMove:l,canRemove:s}=Pg(t),{allowsEditLocking:c,templateLock:p,hasTemplateLock:d}=(0,m.useSelect)((e=>{var n,r;const{getBlockName:o,getBlockAttributes:i}=e(xr),l=o(t),s=(0,a.getBlockType)(l);return{allowsEditLocking:Mg.includes(l),templateLock:null===(n=i(t))||void 0===n?void 0:n.templateLock,hasTemplateLock:!(null==s||null===(r=s.attributes)||void 0===r||!r.templateLock)}}),[t]),[y,h]=(0,u.useState)(!!p),{updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=sy(t),k=(0,f.useInstanceId)(Fg,"block-editor-block-lock-modal__options-title");(0,u.useEffect)((()=>{o({move:!l,remove:!s,...c?{edit:!i}:{}})}),[i,l,s,c]);const E=Object.values(r).every(Boolean),S=Object.values(r).some(Boolean)&&!E;return(0,u.createElement)(g.Modal,{title:(0,_.sprintf)((0,_.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:n},(0,u.createElement)("p",null,(0,_.__)("Choose specific attributes to restrict or lock all available options.")),(0,u.createElement)("form",{onSubmit:e=>{e.preventDefault(),v([t],{lock:r,templateLock:y?Rg(r):void 0}),n()}},(0,u.createElement)("div",{role:"group","aria-labelledby":k,className:"block-editor-block-lock-modal__options"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-title",label:(0,u.createElement)("span",{id:k},(0,_.__)("Lock all")),checked:E,indeterminate:S,onChange:e=>o({move:e,remove:e,...c?{edit:e}:{}})}),(0,u.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},c&&(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Restrict editing"),checked:!!r.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.edit?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Disable movement"),checked:r.move,onChange:e=>o((t=>({...t,move:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.move?Ng:Tg})),(0,u.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,u.createElement)(g.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Prevent removal"),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,u.createElement)(g.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:r.remove?Ng:Tg}))),d&&(0,u.createElement)(g.ToggleControl,{className:"block-editor-block-lock-modal__template-lock",label:(0,_.__)("Apply to all blocks inside"),checked:y,disabled:r.move&&!r.remove,onChange:()=>h(!y)})),(0,u.createElement)(g.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"tertiary",onClick:n},(0,_.__)("Cancel"))),(0,u.createElement)(g.FlexItem,null,(0,u.createElement)(g.Button,{variant:"primary",type:"submit"},(0,_.__)("Apply"))))))}function Lg(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=Pg(t),[o,i]=(0,u.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,_.__)("Unlock"):(0,_.__)("Lock");return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{icon:r?Tg:Og,onClick:i},l),o&&(0,u.createElement)(Fg,{clientId:t,onClose:i}))}const{Fill:Dg,Slot:Ug}=(0,g.createSlotFill)("BlockSettingsMenuControls");function jg(e){let{...t}=e;return(0,u.createElement)(g.__experimentalStyleProvider,{document:document},(0,u.createElement)(Dg,t))}jg.Slot=e=>{let{fillProps:t,clientIds:n=null,__unstableDisplayLocation:r}=e;const{selectedBlocks:o,selectedClientIds:i,canRemove:l}=(0,m.useSelect)((e=>{const{getBlockNamesByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(xr),i=null!==n?n:r();return{selectedBlocks:t(i),selectedClientIds:i,canRemove:o(i)}}),[n]),{canLock:a}=Pg(i[0]),s=1===i.length&&a,p=xg(),{isGroupable:d,isUngroupable:f}=p,y=(d||f)&&l;return(0,u.createElement)(Ug,{fillProps:{...t,__unstableDisplayLocation:r,selectedBlocks:o,selectedClientIds:i}},(e=>!(null!=e&&e.length)>0&&!y&&!s?null:(0,u.createElement)(g.MenuGroup,null,s&&(0,u.createElement)(Lg,{clientId:i[0]}),e,y&&(0,u.createElement)(Bg,c({},p,{onClose:null==t?void 0:t.onClose})))))};var zg=jg;const Vg=()=>{},Gg={className:"block-editor-block-settings-menu__popover",position:"bottom right",variant:"toolbar"};function Hg(e){let{blocks:t,onCopy:n,label:r}=e;const o=(0,f.useCopyToClipboard)((()=>(0,a.serialize)(t)),n),i=t.length>1?(0,_.__)("Copy blocks"):(0,_.__)("Copy block"),l=r||i;return(0,u.createElement)(g.MenuItem,{ref:o},l)}var Wg=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,__unstableDisplayLocation:o,...i}=e;const l=Array.isArray(t)?t:[t],s=l.length,p=l[0],{firstParentClientId:d,isDistractionFree:y,onlyBlock:h,parentBlockType:v,previousBlockClientId:b,nextBlockClientId:k,selectedBlockClientIds:E}=(0,m.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockRootClientId:r,getPreviousBlockClientId:o,getNextBlockClientId:i,getSelectedBlockClientIds:l,getSettings:s,getBlockAttributes:c}=e(xr),{getActiveBlockVariation:u}=e(a.store),d=r(p),f=d&&n(d);return{firstParentClientId:d,isDistractionFree:s().isDistractionFree,onlyBlock:1===t(d),parentBlockType:d&&(u(f,c(d))||(0,a.getBlockType)(f)),previousBlockClientId:o(p),nextBlockClientId:i(p),selectedBlockClientIds:l()}}),[p]),S=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Pp.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")}}),[]),{selectBlock:w,toggleBlockHighlight:C}=(0,m.useDispatch)(xr),I=(0,u.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:Vg,[n]),A=cy({clientId:p,maximumLength:25}),x=(0,u.useCallback)(n?()=>{const e=b||k||d;e&&E.includes(p)&&!E.includes(e)&&n(e)}:Vg,[n,b,k,d,E]),B=(0,_.sprintf)((0,_.__)("Remove %s"),A),P=1===s?B:(0,_.__)("Remove blocks"),T=(0,u.useRef)(),{gestures:O}=Ty({ref:T,onChange(e){e&&y||C(d,e)}}),N=null==E?void 0:E.includes(d);return(0,u.createElement)(kg,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:l,canMove:a,canRemove:m,onDuplicate:y,onInsertAfter:b,onInsertBefore:k,onRemove:E,onCopy:C,onPasteStyles:A,onMoveTo:B,blocks:M}=e;return(0,u.createElement)(g.DropdownMenu,c({icon:dm,label:(0,_.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Gg,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Ag.Slot,{fillProps:{onClose:i}}),!N&&!!d&&(0,u.createElement)(g.MenuItem,c({},O,{ref:T,icon:(0,u.createElement)(hp,{icon:v.icon}),onClick:()=>w(d)}),(0,_.sprintf)((0,_.__)("Select parent block (%s)"),v.title)),1===s&&(0,u.createElement)(wg,{clientId:p}),(0,u.createElement)(Hg,{blocks:M,onCopy:C}),n&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,y,I),shortcut:S.duplicate},(0,_.__)("Duplicate")),l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,k),shortcut:S.insertBefore},(0,_.__)("Insert before")),(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,b),shortcut:S.insertAfter},(0,_.__)("Insert after"))),a&&!h&&(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,B)},(0,_.__)("Move to")),1===s&&(0,u.createElement)(Sg,{clientId:p,onToggle:i})),(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(Hg,{blocks:M,onCopy:C,label:(0,_.__)("Copy styles")}),(0,u.createElement)(g.MenuItem,{onClick:A},(0,_.__)("Paste styles"))),(0,u.createElement)(zg.Slot,{fillProps:{onClose:i},clientIds:t,__unstableDisplayLocation:o}),"function"==typeof r?r({onClose:i}):u.Children.map((e=>(0,u.cloneElement)(e,{onClose:i}))),m&&(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItem,{onClick:(0,f.pipe)(i,E,x),shortcut:S.remove},P)))}))}))};var $g=function(e){let{clientIds:t,...n}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarItem,null,(e=>(0,u.createElement)(Wg,c({clientIds:t,toggleProps:e},n)))))};function Kg(e){let{clientId:t}=e;const n=sy(t),{canEdit:r,canMove:o,canRemove:i,canLock:l}=Pg(t),[a,s]=(0,u.useReducer)((e=>!e),!1);return l?r&&o&&i?null:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,u.createElement)(g.ToolbarButton,{icon:Ng,label:(0,_.sprintf)((0,_.__)("Unlock %s"),n.title),onClick:s})),a&&(0,u.createElement)(Fg,{clientId:t,onClose:s})):null}var qg=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var Jg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var Yg=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const Qg={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var Zg=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=xg(),{replaceBlocks:o}=(0,m.useDispatch)(xr),{canRemove:i,variations:l}=(0,m.useSelect)((e=>{const{canRemoveBlocks:r}=e(xr),{getBlockVariations:o}=e(a.store);return{canRemove:r(t),variations:o(n,"transform")}}),[t,n]),s=r=>{const i=(0,a.switchToBlockType)(e,n);"string"!=typeof r&&(r="group"),i&&i.length>0&&(i[0].attributes.layout=Qg[r],o(t,i))};if(!r||!i)return null;const c=!!l.find((e=>{let{name:t}=e;return"group-row"===t})),p=!!l.find((e=>{let{name:t}=e;return"group-stack"===t}));return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{icon:qg,label:(0,_._x)("Group","verb"),onClick:s}),c&&(0,u.createElement)(g.ToolbarButton,{icon:Jg,label:(0,_._x)("Row","single horizontal line"),onClick:()=>s("row")}),p&&(0,u.createElement)(g.ToolbarButton,{icon:Yg,label:(0,_._x)("Stack","verb"),onClick:()=>s("stack")}))};function Xg(e){let{clientIds:t}=e;const n=1===t.length?t[0]:void 0,r=(0,m.useSelect)((e=>!!n&&"html"===e(xr).getBlockMode(n)),[n]),{toggleBlockMode:o}=(0,m.useDispatch)(xr);return r?(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{onClick:()=>{o(n)}},(0,_.__)("Edit visually"))):null}var eh=(0,u.createContext)("");var th=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:o,hasFixedToolbar:i,isDistractionFree:l,isValid:s,isVisual:p,isContentLocked:y}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:o,getBlockRootClientId:i,getSettings:l,__unstableGetContentLockingParent:s}=e(xr),c=r(),u=c[0],p=i(u),d=l();return{blockClientIds:c,blockClientId:u,blockType:u&&(0,a.getBlockType)(t(u)),hasFixedToolbar:d.hasFixedToolbar,isDistractionFree:d.isDistractionFree,rootClientId:p,isValid:c.every((e=>o(e))),isVisual:c.every((e=>"visual"===n(e))),isContentLocked:!!s(u)}}),[]),{toggleBlockHighlight:h}=(0,m.useDispatch)(xr),v=(0,u.useRef)(),{showMovers:b,gestures:_}=Ty({ref:v,onChange(e){e&&l||h(r,e)}}),k=(0,f.useViewportMatch)("medium","<")||i;if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const E=k||b;if(0===n.length)return null;const S=s&&p,w=n.length>1,C=(0,a.isReusableBlock)(o)||(0,a.isTemplatePart)(o),I=d()("block-editor-block-toolbar",{"is-showing-movers":E,"is-synced":C});return(0,u.createElement)("div",{className:I},!w&&!k&&!y&&(0,u.createElement)(Oy,null),(0,u.createElement)("div",c({ref:v},_),(S||w)&&!y&&(0,u.createElement)(g.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,u.createElement)(tg,{clientIds:n}),!w&&(0,u.createElement)(Kg,{clientId:n[0]}),(0,u.createElement)(ky,{clientIds:n,hideDragHandle:t}))),S&&w&&(0,u.createElement)(Zg,null),S&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ur.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(Ur.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,u.createElement)(eh.Provider,{value:null==o?void 0:o.name},(0,u.createElement)(og.Slot,null))),(0,u.createElement)(Xg,{clientIds:n}),!y&&(0,u.createElement)($g,{clientIds:n}))};var nh=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:o,hasParents:i,showParentSelector:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r,__unstableGetContentLockingParent:o}=e(xr),{getBlockType:i}=e(a.store),l=r(),s=l[0],c=n(s),u=i(t(c[c.length-1]));return{blockType:s&&i(t(s)),hasParents:c.length,showParentSelector:u&&(0,a.hasBlockSupport)(u,"__experimentalParentSelector",!0)&&l.length<=1&&!o(s)}}),[]);if(o&&!(0,a.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;const s=d()("block-editor-block-contextual-toolbar",{"has-parent":i&&l,"is-fixed":n});return(0,u.createElement)(Cy,c({focusOnMount:t,className:s,"aria-label":(0,_.__)("Block tools")},r),(0,u.createElement)(th,{hideDragHandle:n}))};const{CustomSelectControl:rh}=Ir(g.privateApis),oh="position",ih="block-editor-hooks__position-selection__select-control__option",lh={key:"default",value:"",name:(0,_.__)("Default"),className:ih},ah={key:"sticky",value:"sticky",name:(0,_._x)("Sticky","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will stick to the top of the window instead of scrolling.")},sh={key:"fixed",value:"fixed",name:(0,_._x)("Fixed","Name for the value of the CSS position property"),className:ih,__experimentalHint:(0,_.__)("The block will not move when the page is scrolled.")},ch=["top","right","bottom","left"],uh=["sticky","fixed"];function ph(e){return!!(0,a.getBlockSupport)(e,oh)}function dh(e){var t,n;const r=null===(t=e.style)||void 0===t||null===(n=t.position)||void 0===n?void 0:n.type;return"sticky"===r||"fixed"===r}function fh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("position.fixed"),n=yo("position.sticky"),r=!t&&!n;return!ph(e)||r}function mh(e){var t;const{attributes:{style:n={}},clientId:r,name:o,setAttributes:i}=e,l=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.fixed)}(o),s=function(e){const t=(0,a.getBlockSupport)(e,oh);return!!(!0===t||null!=t&&t.sticky)}(o),c=null==n||null===(t=n.position)||void 0===t?void 0:t.type,{hasParents:p}=(0,m.useSelect)((e=>{const{getBlockParents:t}=e(xr);return{hasParents:t(r).length}}),[r]),d=(0,u.useMemo)((()=>{const e=[lh];return(s&&!p||c===ah.value)&&e.push(ah),(l||c===sh.value)&&e.push(sh),e}),[l,s,p,c]),f=c&&d.find((e=>e.value===c))||lh;return u.Platform.select({web:d.length>1?(0,u.createElement)(Wo,{group:"position"},(0,u.createElement)(g.BaseControl,{className:"block-editor-hooks__position-selection"},(0,u.createElement)(rh,{__nextUnconstrainedWidth:!0,__next36pxDefaultSize:!0,className:"block-editor-hooks__position-selection__select-control",label:(0,_.__)("Position"),hideLabelFromVision:!0,describedBy:(0,_.sprintf)((0,_.__)("Currently selected position: %s"),f.name),options:d,value:f,__experimentalShowSelectedHint:!0,onChange:e=>{let{selectedItem:t}=e;(e=>{const t={...n,position:{...null==n?void 0:n.position,type:e,top:"sticky"===e||"fixed"===e?"0px":void 0}};i({style:Ro(t)})})(t.value)},size:"__unstable-large"}))):null,native:null})}const yh=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,oh)&&!fh(t)&&(0,u.createElement)(mh,c({key:"position"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),gh=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i;const{name:l,attributes:s}=t,p=(0,a.hasBlockSupport)(l,oh)&&!fh(t),m=(0,f.useInstanceId)(e),y=(0,u.useContext)(Jh.__unstableElementContext);let g;p&&(g=function(e){let{selector:t,style:n}=e,r="";const{type:o}=(null==n?void 0:n.position)||{};return uh.includes(o)?(r+=`${t} {`,r+=`position: ${o};`,ch.forEach((e=>{var t;void 0!==(null==n||null===(t=n.position)||void 0===t?void 0:t[e])&&(r+=`${e}: ${n.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(r+="z-index: 10"),r+="}",r):r}({selector:`.wp-container-${m}.wp-container-${m}`,style:null==s?void 0:s.style})||"");const h=d()(null==t?void 0:t.className,{[`wp-container-${m}`]:p&&!!g,[`is-position-${null==s||null===(n=s.style)||void 0===n||null===(r=n.position)||void 0===r?void 0:r.type}`]:p&&!!g&&!(null==s||null===(o=s.style)||void 0===o||null===(i=o.position)||void 0===i||!i.type)});return(0,u.createElement)(u.Fragment,null,p&&y&&!!g&&(0,u.createPortal)((0,u.createElement)("style",null,g),y),(0,u.createElement)(e,c({},t,{className:h})))}));(0,s.addFilter)("editor.BlockListBlock","core/editor/position/with-position-styles",gh),(0,s.addFilter)("editor.BlockEdit","core/editor/position/with-inspector-controls",yh);const hh={placement:"top-start"},vh={...hh,flip:!1,shift:!0},bh={...hh,flip:!0,shift:!1};function _h(e,t,n,r,o){if(!e||!t)return vh;const i=(null==n?void 0:n.scrollTop)||0,l=t.getBoundingClientRect(),a=i+e.getBoundingClientRect().top,s=e.ownerDocument.documentElement.clientHeight,c=a+r,u=l.top>c,p=l.height>s-r;return o||!u&&!p?bh:vh}function kh(e){const{__unstableGetEditorMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isBlockInterfaceHidden:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=Ir(e(xr));return{editorMode:t(),hasMultiSelection:r(),isMultiSelecting:n(),isTyping:o(),isBlockInterfaceHidden:i(),hasFixedToolbar:l().hasFixedToolbar,isDistractionFree:l().isDistractionFree,lastClientId:r()?a():null}}function Eh(e){let{clientId:t,rootClientId:n,isEmptyDefaultBlock:r,showContents:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:a}=e;const{editorMode:s,hasMultiSelection:p,isMultiSelecting:y,isTyping:g,isBlockInterfaceHidden:h,hasFixedToolbar:v,isDistractionFree:b,lastClientId:_}=(0,m.useSelect)(kh,[]),k=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(xr);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),E=(0,f.useViewportMatch)("medium"),S=(0,u.useRef)(!1),{stopTyping:w}=(0,m.useDispatch)(xr),C=!g&&"edit"===s&&r,I=!p&&("navigation"===s||"zoom-out"===s),A="edit"===s&&!v&&E&&!y&&!C&&!g&&!h,x=!("edit"!==s||A||v||b||r);(0,Pp.useShortcut)("core/block-editor/focus-toolbar",(()=>{S.current=!0,w(!0)}),{isDisabled:!x}),(0,u.useEffect)((()=>{S.current=!1}));const B=(0,u.useRef)(),P=function(e){let{contentElement:t,clientId:n}=e;const r=eo(n),[o,i]=(0,u.useState)(0),{blockIndex:l,isSticky:a}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockAttributes:r}=e(xr);return{blockIndex:t(n),isSticky:dh(r(n))}}),[n]),s=(0,u.useMemo)((()=>{if(t)return(0,Ml.getScrollContainer)(t)}),[t]),[c,p]=(0,u.useState)((()=>_h(t,r,s,o,a))),d=(0,f.useRefEffect)((e=>{i(e.offsetHeight)}),[]),y=(0,u.useCallback)((()=>p(_h(t,r,s,o,a))),[t,r,s,o]);return(0,u.useLayoutEffect)(y,[l,y]),(0,u.useLayoutEffect)((()=>{var e,n,o;if(!t||!r)return;const i=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView;let l;null==i||null===(n=i.addEventHandler)||void 0===n||n.call(i,"resize",y);const a=null==r||null===(o=r.ownerDocument)||void 0===o?void 0:o.defaultView;return a.ResizeObserver&&(l=new a.ResizeObserver(y),l.observe(r)),()=>{var e;null==i||null===(e=i.removeEventHandler)||void 0===e||e.call(i,"resize",y),l&&l.disconnect()}}),[y,t,r]),{...c,ref:d}}({contentElement:null==a?void 0:a.current,clientId:t});return C?(0,u.createElement)(Yo,c({clientId:i||t,__unstableCoverTarget:!0,bottomClientId:_,className:d()("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1,shift:!1},P),(0,u.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,u.createElement)(Wm,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0}))):I||A?(0,u.createElement)(Yo,c({clientId:i||t,bottomClientId:_,className:d()("block-editor-block-list__block-popover",{"is-insertion-point-visible":k}),__unstablePopoverSlot:l,__unstableContentRef:a,resize:!1},P),A&&o&&(0,u.createElement)(nh,{focusOnMount:S.current,__experimentalInitialIndex:B.current,__experimentalOnIndexChange:e=>{B.current=e},key:t}),I&&(0,u.createElement)(Ey,{clientId:t,rootClientId:n})):null}function Sh(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:o,getBlockParents:i,getSettings:l,isNavigationMode:s,__experimentalGetBlockListSettingsForBlocks:c}=e(xr),u=t()||n();if(!u)return;const{name:p,attributes:d={}}=o(u)||{},f=i(u),m=c(f),y=f.find((e=>{var t;return null===(t=m[e])||void 0===t?void 0:t.__experimentalCaptureToolbars})),g=l();return{clientId:u,rootClientId:r(u),name:p,isDistractionFree:g.isDistractionFree,isNavigationMode:s(),isEmptyDefaultBlock:p&&(0,a.isUnmodifiedDefaultBlock)({name:p,attributes:d}),capturingClientId:y}}function wh(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,m.useSelect)(Sh,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isEmptyDefaultBlock:a,capturingClientId:s,isDistractionFree:c,isNavigationMode:p}=r;return l?(0,u.createElement)(Eh,{clientId:o,rootClientId:i,isEmptyDefaultBlock:a,showContents:!c||p,capturingClientId:s,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Ch(e){let{children:t}=e;const n=(0,u.useContext)(ny),r=(0,u.useContext)(g.Disabled.Context);return n||r?t:($()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8",version:"6.3"}),(0,u.createElement)(oy,{__unstablePopoverSlot:"block-toolbar"},(0,u.createElement)(wh,{__unstablePopoverSlot:"block-toolbar"}),t))}var Ih=(0,f.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Nr();return(0,u.createElement)(e,c({},t,{clientId:n}))}),"withClientId");var Ah=Ih((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,u.createElement)(Jm,{className:d()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var xh=(0,f.compose)([Ih,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(xr),o=r(n);return{lastBlockClientId:o[o.length-1]}}))])((e=>{let{clientId:t}=e;return(0,u.createElement)($m,{rootClientId:t})}));const Bh=new WeakMap;function Ph(e,t,n,r,o,i,l){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,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"===p){l();const e=d.map((e=>(0,a.cloneBlock)(e)));i(e,!0,null)}if("block"===p){const i=n(u[0]);if(c===e&&i===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;o(u,c,l&&i{if(!n)return;const l=(0,a.findTransform)((0,a.getBlockTransforms)("from"),(n=>"files"===n.type&&o(n.blockName,e)&&n.isMatch(t)));if(l){const e=l.transform(t,r);i(e)}}}function Oh(e,t,n){return e=>{const t=(0,a.pasteHandler)({HTML:e,mode:"BLOCKS"});t.length&&n(t)}}function Nh(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{operation:r="insert"}=n,o=(0,m.useSelect)((e=>e(xr).getSettings().mediaUpload),[]),{canInsertBlockType:i,getBlockIndex:l,getClientIdsOfDescendants:a,getBlockOrder:s,getBlocksByClientId:c}=(0,m.useSelect)(xr),{insertBlocks:p,moveBlocksToPosition:d,updateBlockAttributes:f,clearSelectedBlock:y,replaceBlocks:g,removeBlocks:h}=(0,m.useDispatch)(xr),v=(0,m.useRegistry)(),b=(0,u.useCallback)((function(n){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("replace"===r){const r=s(e)[t];g(r,n,void 0,i)}else p(n,t,e,o,i)}),[r,s,p,g,t,e]),_=(0,u.useCallback)(((n,o,i)=>{if("replace"===r){const r=c(n),o=s(e)[t];v.batch((()=>{h(n,!1),g(o,r,void 0,0)}))}else d(n,o,e,i)}),[r,s,c,p,d,h,t,e]),k=Ph(e,t,l,a,_,b,y),E=Th(e,0,o,f,i,b),S=Oh(0,0,b);return e=>{const t=(0,Ml.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?S(n):t.length?E(t):k(e)}}function Mh(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=Mh(e,t,o);(void 0===n||i=e.x&&t.top<=e.y&&t.bottom>=e.y}function Lh(e,t){var n,r;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i="horizontal"===o?["left","right"]:["top","bottom"],l=(0,_.isRTL)();let a=0,s="before",c=1/0;e.forEach((e=>{let{isUnmodifiedDefaultBlock:n,getBoundingClientRect:r,blockIndex:o}=e;const u=r();let[p,d]=Rh(t,u,i);n&&Fh(t,u)&&(p=0),p0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,u.useState)({index:null,operation:"insert"}),r=(0,m.useSelect)((t=>{const{getTemplateLock:n,__unstableIsWithinBlockOverlay:r,__unstableHasActiveBlockOverlayActive:o}=t(xr),i=n(e);return["all","contentOnly"].some((e=>e===i))||o(e)||r(e)}),[e]),{getBlockListSettings:o,getBlocks:i,getBlockIndex:l}=(0,m.useSelect)(xr),{showInsertionPoint:s,hideInsertionPoint:c}=(0,m.useDispatch)(xr),p=Nh(e,t.index,{operation:t.operation}),d=(0,f.useThrottle)((0,u.useCallback)(((t,r)=>{var c;const u=i(e);if(0===u.length)return void n({index:0,operation:"insert"});const p=u.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,a.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>r.getElementById(`block-${t}`).getBoundingClientRect(),blockIndex:l(t)}})),[d,f]=Lh(p,{x:t.clientX,y:t.clientY},null===(c=o(e))||void 0===c?void 0:c.orientation);n({index:d,operation:f}),s(e,d,{operation:f})}),[e]),200);return(0,f.__experimentalUseDropZone)({isDisabled:r,onDrop:p,onDragOver(e){d(e,e.currentTarget.ownerDocument)},onDragLeave(){d.cancel(),c()},onDragEnd(){d.cancel(),c()}})}const Uh={};function jh(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:o,template:i,templateLock:l,wrapperRef:s,templateInsertUpdatesSelection:c,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:d,renderAppender:f,orientation:y,placeholder:g,layout:h}=e;!function(e,t,n,r,o,i,l,a){const{updateBlockListSettings:s}=(0,m.useDispatch)(xr),c=(0,m.useRegistry)(),{blockListSettings:p,parentLock:d}=(0,m.useSelect)((t=>{const n=t(xr).getBlockRootClientId(e);return{blockListSettings:t(xr).getBlockListSettings(e),parentLock:t(xr).getTemplateLock(n)}}),[e]),f=(0,u.useMemo)((()=>t),t);(0,u.useLayoutEffect)((()=>{const t={allowedBlocks:f,templateLock:void 0===o||"contentOnly"===d?d:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=il(null==a?void 0:a.type);t.orientation=e.getOrientation(a)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),Ko()(p,t)||(Bh.get(c)||Bh.set(c,[]),Bh.get(c).push([e,t]),window.queueMicrotask((()=>{var e;null!==(e=Bh.get(c))&&void 0!==e&&e.length&&c.batch((()=>{Bh.get(c).forEach((e=>{s(...e)})),Bh.set(c,[])}))})))}),[e,p,f,n,r,o,d,i,l,s,a,c])}(t,n,r,o,l,p,y,h),function(e,t,n,r){const{getBlocks:o,getSelectedBlocksInitialCaretPosition:i,isBlockSelected:l}=(0,m.useSelect)(xr),{replaceInnerBlocks:s,__unstableMarkNextChangeAsNotPersistent:c}=(0,m.useDispatch)(xr),{innerBlocks:p}=(0,m.useSelect)((t=>({innerBlocks:t(xr).getBlocks(e)})),[e]),d=(0,u.useRef)(null);(0,u.useLayoutEffect)((()=>{let u=!1;return window.queueMicrotask((()=>{if(u)return;const p=o(e),f=0===p.length||"all"===n||"contentOnly"===n,m=!b()(t,d.current);if(!f||!m)return;d.current=t;const y=(0,a.synchronizeBlocksWithTemplate)(p,t);b()(y,p)||(c(),s(e,y,0===p.length&&r&&0!==y.length&&l(e),i()))})),()=>{u=!0}}),[p,t,n,e])}(t,i,l,c);const v=function(e){return(0,m.useSelect)((t=>{const n=t(xr).getBlock(e);if(!n)return;const r=t(a.store).getBlockType(n.name);return r&&0!==Object.keys(r.providesContext).length?Object.fromEntries(Object.entries(r.providesContext).map((e=>{let[t,r]=e;return[t,n.attributes[r]]}))):void 0}),[e])}(t),_=(0,m.useSelect)((e=>{var n;return null===(n=e(xr).getBlock(t))||void 0===n?void 0:n.name}),[t]),k=(0,a.getBlockSupport)(_,"__experimentalLayout")||Uh,{allowSizingOnChildren:E=!1}=k,S=yo("layout")||Uh,w=h||k,C=(0,u.useMemo)((()=>({...S,...w,...E&&{allowSizingOnChildren:!0}})),[S,w,E]);return(0,u.createElement)(Fl,{value:v},(0,u.createElement)(Qh,{rootClientId:t,renderAppender:f,__experimentalAppenderTagName:d,__experimentalLayout:C,wrapperRef:s,placeholder:g}))}function zh(e){return kp(e),(0,u.createElement)(jh,e)}const Vh=(0,u.forwardRef)(((e,t)=>{const n=Gh({ref:t},e);return(0,u.createElement)("div",{className:"block-editor-inner-blocks"},(0,u.createElement)("div",n))}));function Gh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:r}=t,{clientId:o,layout:i=null,__unstableLayoutClassNames:l=""}=Nr(),s=(0,f.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:p,hasOverlay:y}=(0,m.useSelect)((e=>{if(!o)return{};const{getBlockName:t,isBlockSelected:n,hasSelectedInnerBlock:r,__unstableGetEditorMode:i}=e(xr),l=t(o),c="navigation"===i()||s;return{__experimentalCaptureToolbars:e(a.store).hasBlockSupport(l,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==l&&!n(o)&&!r(o,!0)&&c}}),[o,s]),g=Dh({rootClientId:o}),h=(0,f.useMergeRefs)([e.ref,r?null:g]),v={__experimentalCaptureToolbars:p,layout:i,...t},b=v.value&&v.onChange?zh:jh;return{...e,ref:h,className:d()(e.className,"block-editor-block-list__layout",n?"":l,{"has-overlay":y}),children:o?(0,u.createElement)(b,c({},v,{clientId:o})):(0,u.createElement)(Qh,t)}}Gh.save=a.__unstableGetInnerBlocksProps,Vh.DefaultBlockAppender=xh,Vh.ButtonBlockAppender=Ah,Vh.Content=()=>Gh.save().children;var Hh=Vh;const Wh=(0,u.createContext)(),$h=(0,u.createContext)(),Kh=new WeakMap;function qh(e){let{className:t,...n}=e;const[r,o]=(0,u.useState)(),i=(0,f.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:a,editorMode:s}=(0,m.useSelect)((e=>{const{getSettings:t,__unstableGetEditorMode:n}=e(xr),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,editorMode:n()}}),[]),c=(0,m.useRegistry)(),{setBlockVisibility:p}=(0,m.useDispatch)(xr),y=(0,f.useDebounce)((0,u.useCallback)((()=>{const e={};Kh.get(c).forEach((t=>{let[n,r]=t;e[n]=r})),p(e)}),[c]),300,{trailing:!0}),g=(0,u.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{Kh.get(c)||Kh.set(c,[]);for(const t of e){const e=t.target.getAttribute("data-block");Kh.get(c).push([e,t.isIntersecting])}y()}))}),[]),h=Gh({ref:(0,f.useMergeRefs)([wp(),iy(),o]),className:d()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":a&&i,"is-navigate-mode":"navigation"===s})},n);return(0,u.createElement)(Wh.Provider,{value:r},(0,u.createElement)($h.Provider,{value:g},(0,u.createElement)("div",h)))}function Jh(e){return function(){const{patterns:e,isPreviewMode:t}=(0,m.useSelect)((e=>{const{__experimentalBlockPatterns:t,__unstableIsPreviewMode:n}=e(xr).getSettings();return{patterns:t,isPreviewMode:n}}),[]);(0,u.useEffect)((()=>{if(t)return;if(null==e||!e.length)return;let n,r=-1;const o=()=>{r++,r>=e.length||((0,m.select)(xr).__experimentalGetParsedPattern(e[r].name),n=ly(o))};return n=ly(o),()=>ay(n)}),[e,t])}(),(0,u.createElement)(Ch,null,(0,u.createElement)(Or,{value:Pr},(0,u.createElement)(qh,e)))}function Yh(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=ll}=e;const{order:l,selectedBlocks:a,visibleBlocks:s}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:o}=e(xr);return{order:t(n),selectedBlocks:r(),visibleBlocks:o()}}),[n]);return(0,u.createElement)(sl,{value:i},l.map((e=>(0,u.createElement)(m.AsyncModeProvider,{key:e,value:!s.has(e)&&!a.includes(e)},(0,u.createElement)(cp,{rootClientId:n,clientId:e})))),l.length<1&&t,(0,u.createElement)(Qm,{tagName:o,rootClientId:n,renderAppender:r}))}function Qh(e){return(0,u.createElement)(m.AsyncModeProvider,{value:!1},(0,u.createElement)(Yh,e))}function Zh(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Xh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{flat:t,...n}=e;return t||Zh(Object.values(n).filter(Boolean))||"px"}function ev(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,g.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=Zh(r),l=0===o||o?`${o}${i}`:void 0;return l}function tv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=ev(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function nv(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function rv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e,l=ev(o);void 0===l&&(l=Xh(n));const a=nv(o)&&tv(o),s=a?(0,_.__)("Mixed"):null;return(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":(0,_.__)("Border radius"),disableUnits:a,isOnly:!0,value:l,onChange:e=>{const n=!isNaN(parseFloat(e));t(n?e:void 0)},onUnitChange:e=>{r({topLeft:e,topRight:e,bottomLeft:e,bottomRight:e})},placeholder:s,size:"__unstable-large"}))}Jh.__unstableElementContext=Wh;const ov={topLeft:(0,_.__)("Top left"),topRight:(0,_.__)("Top right"),bottomLeft:(0,_.__)("Bottom left"),bottomRight:(0,_.__)("Bottom right")};function iv(e){let{onChange:t,selectedUnits:n,setSelectedUnits:r,values:o,...i}=e;const l=e=>n=>{if(!t)return;const r=!isNaN(parseFloat(n))?n:void 0;t({...a,[e]:r})},a="string"!=typeof o?o:{topLeft:o,topRight:o,bottomLeft:o,bottomRight:o};return(0,u.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(ov).map((e=>{let[t,o]=e;const[s,p]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(a[t]),d=a[t]?p:n[t]||n.flat;return(0,u.createElement)(g.Tooltip,{text:o,position:"top",key:t},(0,u.createElement)("div",{className:"components-border-radius-control__tooltip-wrapper"},(0,u.createElement)(g.__experimentalUnitControl,c({},i,{"aria-label":o,value:[s,d].join(""),onChange:l(t),onUnitChange:(f=t,e=>{const t={...n};t[f]=e,r(t)}),size:"__unstable-large"}))));var f})))}function lv(e){let{isLinked:t,...n}=e;const r=t?(0,_.__)("Unlink radii"):(0,_.__)("Link radii");return(0,u.createElement)(g.Tooltip,{text:r},(0,u.createElement)("span",null,(0,u.createElement)(g.Button,c({},n,{className:"component-border-radius-control__linked-button",isSmall:!0,icon:t?Eo:So,iconSize:24,"aria-label":r}))))}const av={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},sv={px:100,em:20,rem:20};function cv(e){let{onChange:t,values:n}=e;const[r,o]=(0,u.useState)(!nv(n)||!tv(n)),[i,l]=(0,u.useState)({flat:"string"==typeof n?(0,g.__experimentalParseQuantityAndUnitFromRawValue)(n)[1]:void 0,topLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topLeft)[1],topRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.topRight)[1],bottomLeft:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomLeft)[1],bottomRight:(0,g.__experimentalParseQuantityAndUnitFromRawValue)(null==n?void 0:n.bottomRight)[1]}),a=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"]}),s=Xh(i),c=a&&a.find((e=>e.value===s)),p=(null==c?void 0:c.step)||1,[d]=(0,g.__experimentalParseQuantityAndUnitFromRawValue)(ev(n));return(0,u.createElement)("fieldset",{className:"components-border-radius-control"},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Radius")),(0,u.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,u.createElement)(u.Fragment,null,(0,u.createElement)(rv,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,units:a}),(0,u.createElement)(g.RangeControl,{label:(0,_.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:null!=d?d:"",min:0,max:sv[s],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${s}`:void 0)},step:p,__nextHasNoMarginBottom:!0})):(0,u.createElement)(iv,{min:0,onChange:t,selectedUnits:i,setSelectedUnits:l,values:n||av,units:a}),(0,u.createElement)(lv,{onClick:()=>o(!r),isLinked:r})))}function uv(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(cv,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{const t=Ro({...n,border:{...null==n?void 0:n.border,radius:e}});r({style:t})}})}hd([vd,kd]);const pv=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>e.slug===t));if(n)return n}return{color:n}},dv=(e,t)=>null==e?void 0:e.find((e=>e.color===t));function fv(e,t){if(e&&t)return`has-${(0,y.kebabCase)(t)}-${e}`}function mv(){const e={disableCustomColors:!yo("color.custom"),disableCustomGradients:!yo("color.customGradient")},t=yo("color.palette.custom"),n=yo("color.palette.theme"),r=yo("color.palette.default"),o=yo("color.defaultPalette");e.colors=(0,u.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,_._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=yo("color.gradients.custom"),l=yo("color.gradients.theme"),a=yo("color.gradients.default"),s=yo("color.defaultGradients");return e.gradients=(0,u.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,_._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),s&&a&&a.length&&e.push({name:(0,_._x)("Default","Indicates this palette comes from WordPress."),gradients:a}),i&&i.length&&e.push({name:(0,_._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,a]),e}const yv="__experimentalBorder",gv=["top","right","bottom","left"],hv=e=>{var t,n;return{...e,borderColor:void 0,style:{...e.style,border:{radius:null===(t=e.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius}}}},vv=(e,t,n)=>{let r;return e.some((e=>e.colors.some((e=>e[t]===n&&(r=e,!0))))),r},bv=e=>{let{colors:t,namedColor:n,customColor:r}=e;if(n){const e=vv(t,"slug",n);if(e)return e}if(!r)return{color:void 0};const o=vv(t,"color",r);return o||{color:r}};function _v(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function kv(e){const{attributes:t,clientId:n,setAttributes:r}=e,{style:o}=t,{colors:i}=mv(),l=Ev(e.name),s=yo("border.color")&&Ev(e.name,"color"),c=yo("border.radius")&&Ev(e.name,"radius"),p=yo("border.style")&&Ev(e.name,"style"),d=yo("border.width")&&Ev(e.name,"width");if([!s,!c,!p,!d].every(Boolean)||!l)return null;const f=(0,a.getBlockSupport)(e.name,[yv,"__experimentalDefaultControls"]),m=(null==f?void 0:f.color)||(null==f?void 0:f.width),y=((e,t)=>{const{borderColor:n,style:r}=e,{border:o}=r||{};if(n){const{color:e}=bv({colors:t,namedColor:n});return e?{...o,color:e}:o}if(!o)return o;const i={...o};return gv.forEach((e=>{var n;const r=_v(null===(n=i[e])||void 0===n?void 0:n.color);if(r){const{color:n}=bv({colors:t,namedColor:r});i[e]={...i[e],color:n}}})),i})(t,i);return(0,u.createElement)(Wo,{group:"border"},(d||s)&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>(e=>{const{borderColor:t,style:n}=e.attributes;return(0,g.__experimentalIsDefinedBorder)(null==n?void 0:n.border)||!!t})(e),label:(0,_.__)("Border"),onDeselect:()=>(e=>{var t;let{attributes:n={},setAttributes:r}=e;const{style:o}=n;r({borderColor:void 0,style:{...o,border:Ro({radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius})}})})(e),isShownByDefault:m,resetAllFilter:hv,panelId:n},(0,u.createElement)(g.__experimentalBorderBoxControl,{colors:i,enableAlpha:!0,enableStyle:p,onChange:e=>{var t;let n,l={...e};if((0,g.__experimentalHasSplitBorders)(e))l={top:{...e.top},right:{...e.right},bottom:{...e.bottom},left:{...e.left}},gv.forEach((t=>{var n;if(null!==(n=e[t])&&void 0!==n&&n.color){var r;const n=bv({colors:i,customColor:null===(r=e[t])||void 0===r?void 0:r.color});n.slug&&(l[t].color=`var:preset|color|${n.slug}`)}}));else if(null!=e&&e.color){const t=null==e?void 0:e.color,r=bv({colors:i,customColor:t});r.slug&&(n=r.slug,l.color=void 0)}const a=Ro({...o,border:{radius:null==o||null===(t=o.border)||void 0===t?void 0:t.radius,...l}});r({style:a,borderColor:n})},popoverOffset:40,popoverPlacement:"left-start",size:"__unstable-large",value:y,__experimentalIsRenderedInSidebar:!0})),c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,_.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Sv(r,"radius")})}(e),isShownByDefault:null==f?void 0:f.radius,resetAllFilter:e=>{var t;return{...e,style:{...e.style,border:{...null===(t=e.style)||void 0===t?void 0:t.border,radius:void 0}}}},panelId:n},(0,u.createElement)(uv,e)))}function Ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==u.Platform.OS)return!1;const n=(0,a.getBlockSupport)(e,yv);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 Sv(e,t){return Ro({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function wv(e,t,n){if(!Ev(t,"color")||Uo(t,yv,"color"))return e;const r=Cv(n),o=d()(e.className,r);return e.className=o||void 0,e}function Cv(e){var t;const{borderColor:n,style:r}=e,o=fv("border-color",n);return d()({"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color),[o]:!!o})}const Iv=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o,i,l,a,s,p,d;const{name:f,attributes:m}=t,{borderColor:y,style:g}=m,{colors:h}=mv();if(!Ev(f,"color")||Uo(f,yv,"color"))return(0,u.createElement)(e,t);const{color:v}=bv({colors:h,namedColor:y}),{color:b}=bv({colors:h,namedColor:_v(null==g||null===(n=g.border)||void 0===n||null===(r=n.top)||void 0===r?void 0:r.color)}),{color:_}=bv({colors:h,namedColor:_v(null==g||null===(o=g.border)||void 0===o||null===(i=o.right)||void 0===i?void 0:i.color)}),{color:k}=bv({colors:h,namedColor:_v(null==g||null===(l=g.border)||void 0===l||null===(a=l.bottom)||void 0===a?void 0:a.color)}),{color:E}=bv({colors:h,namedColor:_v(null==g||null===(s=g.border)||void 0===s||null===(p=s.left)||void 0===p?void 0:p.color)}),S={borderTopColor:b||v,borderRightColor:_||v,borderBottomColor:k||v,borderLeftColor:E||v};let w=t.wrapperProps;return w={...t.wrapperProps,style:{...null===(d=t.wrapperProps)||void 0===d?void 0:d.style,...S}},(0,u.createElement)(e,c({},t,{wrapperProps:w}))}));function Av(e){if(e)return`has-${e}-gradient-background`}function xv(e,t){const n=null==e?void 0:e.find((e=>e.slug===t));return n&&n.gradient}function Bv(e,t){const n=null==e?void 0:e.find((e=>e.gradient===t));return n}function Pv(e,t){const n=Bv(e,t);return n&&n.slug}function Tv(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Nr(),r=yo("color.gradients.custom"),o=yo("color.gradients.theme"),i=yo("color.gradients.default"),l=(0,u.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:a,customGradient:s}=(0,m.useSelect)((r=>{const{getBlockAttributes:o}=r(xr),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,m.useDispatch)(xr),p=(0,u.useCallback)((r=>{const o=Pv(l,r);c(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,c]),d=Av(a);let f;return f=a?xv(l,a):s,{gradientClass:d,gradientValue:f,setGradient:p}}(0,s.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ev(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",wv),(0,s.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ev(e,"color")||Uo(e,yv,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),wv(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Iv);const Ov=["colors","disableCustomColors","gradients","disableCustomGradients"],Nv={name:"color",title:"Solid",value:"color"},Mv={name:"gradient",title:"Gradient",value:"gradient"},Rv=[Nv,Mv];function Fv(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,className:l,label:a,onColorChange:s,onGradientChange:c,colorValue:p,gradientValue:f,clearable:m,showTitle:h=!0,enableAlpha:v}=e;const b=s&&(!(0,y.isEmpty)(t)||!r),_=c&&(!(0,y.isEmpty)(n)||!o);if(!b&&!_)return null;const k={[Nv.value]:(0,u.createElement)(g.ColorPalette,{value:p,onChange:_?e=>{s(e),c()}:s,colors:t,disableCustomColors:r,__experimentalIsRenderedInSidebar:i,clearable:m,enableAlpha:v}),[Mv.value]:(0,u.createElement)(g.GradientPicker,{__nextHasNoMargin:!0,value:f,onChange:b?e=>{c(e),s()}:c,gradients:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:i,clearable:m})},E=e=>(0,u.createElement)("div",{className:"block-editor-color-gradient-control__panel"},k[e]);return(0,u.createElement)(g.BaseControl,{__nextHasNoMarginBottom:!0,className:d()("block-editor-color-gradient-control",l)},(0,u.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,u.createElement)(g.__experimentalVStack,{spacing:1},h&&(0,u.createElement)("legend",null,(0,u.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,u.createElement)(g.BaseControl.VisualLabel,null,a))),b&&_&&(0,u.createElement)(g.TabPanel,{className:"block-editor-color-gradient-control__tabs",tabs:Rv,initialTabName:f?Mv.value:!!b&&Nv.value},(e=>E(e.value))),!_&&E(Nv.value),!b&&E(Mv.value))))}function Lv(e){const t={};return t.colors=yo("color.palette"),t.gradients=yo("color.gradients"),t.disableCustomColors=!yo("color.custom"),t.disableCustomGradients=!yo("color.customGradient"),(0,u.createElement)(Fv,c({},t,e))}var Dv=function(e){return Ov.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(Fv,e):(0,u.createElement)(Lv,e)};const Uv=e=>{let{setting:t,children:n,panelId:r,...o}=e;return(0,u.createElement)(g.__experimentalToolsPanelItem,c({hasValue:()=>!!t.colorValue||!!t.gradientValue,label:t.label,onDeselect:()=>{t.colorValue?t.onColorChange():t.gradientValue&&t.onGradientChange()},isShownByDefault:void 0===t.isShownByDefault||t.isShownByDefault},o,{className:"block-editor-tools-panel-color-gradient-settings__item",panelId:r,resetAllFilter:t.resetAllFilter}),n)},jv=e=>{let{colorValue:t,label:n}=e;return(0,u.createElement)(g.__experimentalHStack,{justify:"flex-start"},(0,u.createElement)(g.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:t}),(0,u.createElement)(g.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:n},n))},zv=e=>t=>{let{onToggle:n,isOpen:r}=t;const{colorValue:o,label:i}=e,l={onClick:n,className:d()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r};return(0,u.createElement)(g.Button,l,(0,u.createElement)(jv,{colorValue:o,label:i}))};function Vv(e){let t,{colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradients:l,settings:a,__experimentalIsRenderedInSidebar:s,...p}=e;return s&&(t={placement:"left-start",offset:36,shift:!0}),(0,u.createElement)(u.Fragment,null,a.map(((e,a)=>{var d;const f={clearable:!1,colorValue:e.colorValue,colors:n,disableCustomColors:r,disableCustomGradients:o,enableAlpha:i,gradientValue:e.gradientValue,gradients:l,label:e.label,onColorChange:e.onColorChange,onGradientChange:e.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...e},m={colorValue:null!==(d=e.gradientValue)&&void 0!==d?d:e.colorValue,label:e.label};return e&&(0,u.createElement)(Uv,c({key:a,setting:e},p),(0,u.createElement)(g.Dropdown,{popoverProps:t,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:zv(m),renderContent:()=>(0,u.createElement)(g.__experimentalDropdownContentWrapper,{paddingSize:"none"},(0,u.createElement)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content"},(0,u.createElement)(Dv,f)))}))})))}hd([vd,kd]);var Gv=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:a,linkColor:s,enableAlphaChecker:c=!1}=e;const p=t||n;if(!p)return null;const d=a||r,f=s||o;if(!d&&!f)return null;const m=[{color:d,description:(0,_.__)("text color")},{color:f,description:(0,_.__)("link color")}],y=yd(p),h=y.alpha()<1,v=y.brightness(),b={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",E="";for(const e of m){if(!e.color)continue;const t=yd(e.color),n=t.isReadable(y,b),r=t.alpha()<1;if(!n){if(h||r)continue;k=vnull==e?void 0:e.colorValue));(0,u.useEffect)((()=>{var e;if(!o)return;if(!m.length)return i&&l(),a&&s(),void(p&&s());if(!f.current)return;s(Hv(f.current).color);const t=null===(e=f.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(Hv(t).color);let n=f.current,r=Hv(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=Hv(n).backgroundColor;l(r)}));const y=mv();return(0,u.createElement)(Wo,{group:"color"},(0,u.createElement)(Vv,c({enableAlpha:t,panelId:r,settings:n,__experimentalIsItemGroup:!1,__experimentalIsRenderedInSidebar:!0},y)),o&&(0,u.createElement)(Gv,{backgroundColor:i,textColor:a,enableAlphaChecker:t,linkColor:p}))}const $v="color",Kv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},qv=e=>{if("web"!==u.Platform.OS)return!1;const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.link},Jv=e=>{const t=(0,a.getBlockSupport)(e,$v);return null!==t&&"object"==typeof t&&!!t.gradients},Yv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.background},Qv=e=>{const t=(0,a.getBlockSupport)(e,$v);return t&&!1!==t.text},Zv=(e,t)=>Ro(Lo(t,e,void 0)),Xv=e=>({textColor:void 0,style:Zv(["color","text"],e.style)}),eb=e=>({style:Zv(["elements","link","color","text"],e.style)}),tb=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function nb(e,t,n){var r,o,i,l,a,s;if(!Kv(t)||Uo(t,$v))return e;const c=Jv(t),{backgroundColor:u,textColor:p,gradient:f,style:m}=n,y=e=>!Uo(t,$v,e),g=y("text")?fv("color",p):void 0,h=y("gradients")?Av(f):void 0,v=y("background")?fv("background-color",u):void 0,b=y("background")||y("gradients"),_=u||(null==m||null===(r=m.color)||void 0===r?void 0:r.background)||c&&(f||(null==m||null===(o=m.color)||void 0===o?void 0:o.gradient)),k=d()(e.className,g,h,{[v]:!(c&&null!=m&&null!==(i=m.color)&&void 0!==i&&i.gradient||!v),"has-text-color":y("text")&&(p||(null==m||null===(l=m.color)||void 0===l?void 0:l.text)),"has-background":b&&_,"has-link-color":y("link")&&(null==m||null===(a=m.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const rb=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?pv(e,n[1]).color:t};function ob(e){var t,n,r,o,i,l;const{name:s,attributes:c}=e,p=yo("color.palette.custom"),d=yo("color.palette.theme"),f=yo("color.palette.default"),m=(0,u.useMemo)((()=>[...p||[],...d||[],...f||[]]),[p,d,f]),y=yo("color.gradients.custom"),g=yo("color.gradients.theme"),h=yo("color.gradients.default"),v=(0,u.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),b=yo("color.custom"),k=yo("color.customGradient"),E=yo("color.background"),S=yo("color.link"),w=yo("color.text"),C=b||!d||(null==d?void 0:d.length)>0,I=k||!g||(null==g?void 0:g.length)>0,A=(0,u.useRef)(c);if((0,u.useEffect)((()=>{A.current=c}),[c]),!Kv(s))return null;const x=qv(s)&&S&&C,B=Qv(s)&&w&&C,P=Yv(s)&&E&&C,T=Jv(s)&&I;if(!(x||B||P||T))return null;const{style:O,textColor:N,backgroundColor:M,gradient:R}=c;let F;if(T&&R)F=xv(v,R);else if(T){var L;F=null==O||null===(L=O.color)||void 0===L?void 0:L.gradient}const D=t=>n=>{var r,o;const i=dv(m,n),l=t+"Color",a={...A.current.style,color:{...null===(r=A.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:Ro(a),[l]:s};e.setAttributes(c),A.current={...A.current,...c}},U=(0,a.getBlockSupport)(e.name,[$v,"__experimentalDefaultControls"]),j="web"===u.Platform.OS&&!R&&!(null!=O&&null!==(t=O.color)&&void 0!==t&&t.gradient)&&P&&(x||B)&&!1!==(0,a.getBlockSupport)(e.name,[$v,"enableContrastChecker"]);return(0,u.createElement)(Wv,{enableContrastChecking:j,clientId:e.clientId,enableAlpha:!0,settings:[...B?[{label:(0,_.__)("Text"),onColorChange:D("text"),colorValue:pv(m,N,null==O||null===(n=O.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==U?void 0:U.text,resetAllFilter:Xv}]:[],...P||T?[{label:(0,_.__)("Background"),onColorChange:P?D("background"):void 0,colorValue:pv(m,M,null==O||null===(r=O.color)||void 0===r?void 0:r.background).color,gradientValue:F,onGradientChange:T?t=>{const n=Pv(v,t);let r;if(n){var o,i,l;const e={...null===(o=A.current)||void 0===o?void 0:o.style,color:{...null===(i=A.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:Ro(e),gradient:n}}else{var a,s,c;const e={...null===(a=A.current)||void 0===a?void 0:a.style,color:{...null===(s=A.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Ro(e),gradient:void 0}}e.setAttributes(r),A.current={...A.current,...r}}:void 0,isShownByDefault:null==U?void 0:U.background,resetAllFilter:tb}]:[],...x?[{label:(0,_.__)("Link"),onColorChange:t=>{var n;const r=dv(m,t),o=null!=r&&r.slug?`var:preset|color|${r.slug}`:t,i=Ro(Lo(null===(n=A.current)||void 0===n?void 0:n.style,["elements","link","color","text"],o));e.setAttributes({style:i}),A.current={...A.current,style:i}},colorValue:rb(m,null==O||null===(o=O.elements)||void 0===o||null===(i=o.link)||void 0===i||null===(l=i.color)||void 0===l?void 0:l.text),isShownByDefault:null==U?void 0:U.link,resetAllFilter:eb}]:[]]})}const ib=(0,f.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:l}=o,a=yo("color.palette.custom"),s=yo("color.palette.theme"),p=yo("color.palette.default"),d=(0,u.useMemo)((()=>[...a||[],...s||[],...p||[]]),[a,s,p]);if(!Kv(r)||Uo(r,$v))return(0,u.createElement)(e,t);const f={};var m,y;l&&!Uo(r,$v,"text")&&(f.color=null===(m=pv(d,l))||void 0===m?void 0:m.color);i&&!Uo(r,$v,"background")&&(f.backgroundColor=null===(y=pv(d,i))||void 0===y?void 0:y.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,u.createElement)(e,c({},t,{wrapperProps:g}))})),lb={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,s.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Kv(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Jv(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",nb),(0,s.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Kv(e)||Uo(e,$v))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),nb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",ib),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return Do({linkColor:qv(o),textColor:Qv(o),backgroundColor:Yv(o),gradient:Jv(o)},lb,e,t,n,r)}));const ab=[{name:(0,_._x)("Regular","font style"),value:"normal"},{name:(0,_._x)("Italic","font style"),value:"italic"}],sb=[{name:(0,_._x)("Thin","font weight"),value:"100"},{name:(0,_._x)("Extra Light","font weight"),value:"200"},{name:(0,_._x)("Light","font weight"),value:"300"},{name:(0,_._x)("Regular","font weight"),value:"400"},{name:(0,_._x)("Medium","font weight"),value:"500"},{name:(0,_._x)("Semi Bold","font weight"),value:"600"},{name:(0,_._x)("Bold","font weight"),value:"700"},{name:(0,_._x)("Extra Bold","font weight"),value:"800"},{name:(0,_._x)("Black","font weight"),value:"900"}],cb=(e,t)=>e?t?(0,_.__)("Appearance"):(0,_.__)("Font style"):(0,_.__)("Font weight");function ub(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i},...l}=e,a=n||r,s=cb(n,r),p={key:"default",name:(0,_.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},d=(0,u.useMemo)((()=>n&&r?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;sb.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,_.sprintf)((0,_.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[p];return ab.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[p];return sb.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),f=d.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||d[0];return a&&(0,u.createElement)(g.CustomSelectControl,c({},l,{className:"components-font-appearance-control",label:s,describedBy:f?n?r?(0,_.sprintf)((0,_.__)("Currently selected font appearance: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font style: %s"),f.name):(0,_.sprintf)((0,_.__)("Currently selected font weight: %s"),f.name):(0,_.__)("No selected font appearance"),options:d,value:f,onChange:e=>{let{selectedItem:n}=e;return t(n.style)},__nextUnconstrainedWidth:!0}))}const pb=1.5,db=.1;var fb=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px",...i}=e;const l=function(e){return void 0!==e&&""!==e}(t),a=l?t:"";r||$()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const s=r?void 0:{marginBottom:24};return(0,u.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,u.createElement)(g.__experimentalNumberControl,c({},i,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return pb;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,_.__)("Line height"),placeholder:pb,step:db,value:a,min:0,spinControls:"custom"})))};const mb="typography.lineHeight";function yb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(fb,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Ro(t)})},size:"__unstable-large"})}function gb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!yo("typography.lineHeight");return!(0,a.hasBlockSupport)(e,mb)||t}const hb="typography.__experimentalFontStyle",vb="typography.__experimentalFontWeight";function bb(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!_b(e),l=!kb(e),a=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,s=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,u.createElement)(ub,{onChange:e=>{o({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:a,fontWeight:s},size:"__unstable-large"})}function _b(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,hb),n=yo("typography.fontStyle");return!t||!n}function kb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,a.hasBlockSupport)(e,vb),n=yo("typography.fontWeight");return!t||!n}function Eb(e){const t=_b(e),n=kb(e);return t&&n}function Sb(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=yo("typography.fontFamilies");if(r||(r=i),!r||0===r.length)return null;const l=[{value:"",label:(0,_.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,u.createElement)(g.SelectControl,c({label:(0,_.__)("Font"),options:l,value:t,onChange:n,labelPosition:"top"},o))}const wb="typography.__experimentalFontFamily";function Cb(e,t,n){if(!(0,a.hasBlockSupport)(t,wb))return e;if(Uo(t,p_,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(jy())(e.className);r.add(`has-${(0,y.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const o=r.value;return e.className=o||void 0,e}function Ib(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=yo("typography.fontFamilies"),i=null==o||null===(t=o.find((e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,u.createElement)(Sb,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=null==o?void 0:o.find((t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})},size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Ab(e){let{name:t}=e;const n=yo("typography.fontFamilies");return!n||0===n.length||!(0,a.hasBlockSupport)(t,wb)}(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,wb)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",Cb),(0,s.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,wb))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Cb(r,e,n)},e}));const xb=(e,t,n)=>{if(t){const n=null==e?void 0:e.find((e=>{let{slug:n}=e;return n===t}));if(n)return n}return{size:n}};function Bb(e,t){const n=null==e?void 0:e.find((e=>{let{size:n}=e;return n===t}));return n||{size:t}}function Pb(e){if(e)return`has-${(0,y.kebabCase)(e)}-font-size`}var Tb=function(e){const t=yo("typography.fontSizes"),n=!yo("typography.customFontSize");return(0,u.createElement)(g.FontSizePicker,c({},e,{fontSizes:t,disableCustomFontSizes:n}))};const Ob="1600px",Nb="768px",Mb=1,Rb=.75;function Fb(e){let{minimumFontSize:t,maximumFontSize:n,fontSize:r,minimumViewPortWidth:o=Nb,maximumViewPortWidth:i=Ob,scaleFactor:l=Mb,minimumFontSizeFactor:a=Rb,minimumFontSizeLimit:s}=e;if(s=Lb(s)?s:"14px",r){const e=Lb(r);if(null==e||!e.unit)return null;const o=Lb(s,{coerceTo:e.unit});if(null!=o&&o.value&&!t&&!n&&(null==e?void 0:e.value)<=(null==o?void 0:o.value))return null;if(n||(n=`${e.value}${e.unit}`),!t){const n=Db(e.value*a,3);t=null!=o&&o.value&&n<(null==o?void 0:o.value)?`${o.value}${o.unit}`:`${n}${e.unit}`}}const c=Lb(t),u=(null==c?void 0:c.unit)||"rem",p=Lb(n,{coerceTo:u});if(!c||!p)return null;const d=Lb(t,{coerceTo:"rem"}),f=Lb(i,{coerceTo:u}),m=Lb(o,{coerceTo:u});if(!f||!m||!d)return null;const y=Db(m.value/100,3),g=Db(y,3)+u,h=Db(((p.value-c.value)/(f.value-m.value)*100||1)*l,3);return`clamp(${t}, ${`${d.value}${d.unit} + ((1vw - ${g}) * ${h})`}, ${n})`}function Lb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:r,acceptableUnits:o}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=null==o?void 0:o.join("|"),l=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),a=e.match(l);if(!a||a.length<3)return null;let[,s,c]=a,u=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(u*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=r,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Db(u,3),unit:c}}function Db(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}const Ub="typography.fontSize";function jb(e,t,n){if(!(0,a.hasBlockSupport)(t,Ub))return e;if(Uo(t,p_,"fontSize"))return e;const r=new(jy())(e.className);r.add(Pb(n.fontSize));const o=r.value;return e.className=o||void 0,e}function zb(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=yo("typography.fontSizes"),a=xb(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),s=(null==a?void 0:a.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,u.createElement)(Tb,{onChange:e=>{const t=Bb(l,e).slug;i({style:Ro({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:s,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}function Vb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=yo("typography.fontSizes"),n=!(null==t||!t.length);return!(0,a.hasBlockSupport)(e,Ub)||!n}const Gb=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=yo("typography.fontSizes"),{name:i,attributes:{fontSize:l,style:s},wrapperProps:c}=t;if(!(0,a.hasBlockSupport)(i,Ub)||Uo(i,p_,"fontSize")||!l||null!=s&&null!==(n=s.typography)&&void 0!==n&&n.fontSize)return(0,u.createElement)(e,t);const p=xb(o,l,null==s||null===(r=s.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...c,style:{fontSize:p,...null==c?void 0:c.style}}};return(0,u.createElement)(e,d)}),"withFontSizeInlineStyles"),Hb={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,s.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,a.hasBlockSupport)(e,Ub)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jb),(0,s.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,a.hasBlockSupport)(e,Ub))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),jb(r,e,n)},e})),(0,s.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Gb),(0,s.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const o=e.name;return Do({fontSize:(0,a.hasBlockSupport)(o,Ub)},Hb,e,t,n,r)})),(0,s.addFilter)("blocks.registerBlockType","core/font-size/addEditPropsForFluidCustomFontSizes",(function(e){if(!(0,a.hasBlockSupport)(e,Ub)||Uo(e,p_,"fontSize"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=e=>{var n,r,o;const i=t?t(e):{},l=null==i||null===(n=i.style)||void 0===n?void 0:n.fontSize,a=null===(r=(0,m.select)(xr).getSettings().__experimentalFeatures)||void 0===r||null===(o=r.typography)||void 0===o?void 0:o.fluid,s="object"==typeof a?a:{},c=l&&a?Fb({fontSize:l,minimumFontSizeLimit:null==s?void 0:s.minFontSize}):null;return null===c?i:{...i,style:{...null==i?void 0:i.style,fontSize:c}}},e}),11);var Wb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 11.5h10V13H7z"}));var $b=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var Kb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 qb=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Underline"),value:"underline",icon:$b},{name:(0,_.__)("Strikethrough"),value:"line-through",icon:Kb}];function Jb(e){let{value:t,onChange:n,className:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-decoration-control",r)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Decoration")),(0,u.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},qb.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===t,onClick:()=>{n(e.value===t?void 0:e.value)}})))))}const Yb="typography.__experimentalTextDecoration";function Qb(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(Jb,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})},size:"__unstable-large"})}function Zb(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,Yb),n=yo("typography.textDecoration");return t||!n}var Xb=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var e_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var t_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 n_=[{name:(0,_.__)("None"),value:"none",icon:Wb},{name:(0,_.__)("Uppercase"),value:"uppercase",icon:Xb},{name:(0,_.__)("Lowercase"),value:"lowercase",icon:e_},{name:(0,_.__)("Capitalize"),value:"capitalize",icon:t_}];function r_(e){let{className:t,value:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:d()("block-editor-text-transform-control",t)},(0,u.createElement)(g.BaseControl.VisualLabel,{as:"legend"},(0,_.__)("Letter case")),(0,u.createElement)("div",{className:"block-editor-text-transform-control__buttons"},n_.map((e=>(0,u.createElement)(g.Button,{key:e.value,icon:e.icon,label:e.name,isPressed:e.value===n,onClick:()=>{r(e.value===n?void 0:e.value)}})))))}const o_="typography.__experimentalTextTransform";function i_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(r_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})},size:"__unstable-large"})}function l_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,o_),n=yo("typography.textTransform");return t||!n}function a_(e){let{value:t,onChange:n,__unstableInputWidth:r="60px",...o}=e;const i=(0,g.__experimentalUseCustomUnits)({availableUnits:yo("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,u.createElement)(g.__experimentalUnitControl,c({},o,{label:(0,_.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:i,onChange:n}))}const s_="typography.__experimentalLetterSpacing";function c_(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,u.createElement)(a_,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Ro({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%",size:"__unstable-large"})}function u_(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,a.hasBlockSupport)(e,s_),n=yo("typography.letterSpacing");return t||!n}const p_="typography",d_=[mb,Ub,hb,vb,wb,Yb,o_,s_];function f_(e){const{clientId:t}=e,n=Ab(e),r=Vb(e),o=Eb(e),i=gb(e),l=Zb(e),s=l_(e),c=u_(e),p=!_b(e),d=!kb(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[Eb(e),Vb(e),gb(e),Ab(e),Zb(e),l_(e),u_(e)];return t.filter(Boolean).length===t.length}(e),m=m_(e.name);if(f||!m)return null;const y=(0,a.getBlockSupport)(e.name,[p_,"__experimentalDefaultControls"]),h=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,u.createElement)(Wo,{group:"typography"},!n&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,_.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==y?void 0:y.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,u.createElement)(Ib,e)),!r&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,_.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Ro({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,u.createElement)(zb,e)),!o&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:cb(p,d),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,u.createElement)(bb,e)),!i&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,_.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==y?void 0:y.lineHeight,resetAllFilter:h("lineHeight"),panelId:t},(0,u.createElement)(yb,e)),!c&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,_.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==y?void 0:y.letterSpacing,resetAllFilter:h("letterSpacing"),panelId:t},(0,u.createElement)(c_,e)),!l&&(0,u.createElement)(g.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,_.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textDecoration,resetAllFilter:h("textDecoration"),panelId:t},(0,u.createElement)(Qb,e)),!s&&(0,u.createElement)(g.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,_.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Ro({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==y?void 0:y.textTransform,resetAllFilter:h("textTransform"),panelId:t},(0,u.createElement)(i_,e)))}const m_=e=>d_.some((t=>(0,a.hasBlockSupport)(e,t)));const y_=[...d_,yv,$v,yi,gi],g_=e=>y_.some((t=>(0,a.hasBlockSupport)(e,t)));function h_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};return(0,nl.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const v_={"__experimentalBorder.__experimentalSkipSerialization":["border"],"color.__experimentalSkipSerialization":[$v],[`${p_}.__experimentalSkipSerialization`]:[p_],[`${yi}.__experimentalSkipSerialization`]:[yi],[`${gi}.__experimentalSkipSerialization`]:[gi]},b_={...v_,[`${gi}`]:["spacing.blockGap"]},__={gradients:"gradient"};function k_(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return e;let r=e;return n||(r=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;k_(r[t],[n],!0)}else 1===e.length&&delete r[e[0]]})),r}function E_(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b_;if(!g_(t))return e;let{style:o}=n;return Object.entries(r).forEach((e=>{let[n,r]=e;const i=(0,a.getBlockSupport)(t,n);!0===i&&(o=k_(o,r)),Array.isArray(i)&&i.forEach((e=>{const t=__[e]||e;o=k_(o,[[...r,t]])}))})),e.style={...h_(o),...e.style},e}const S_=(0,f.createHigherOrderComponent)((e=>t=>{const n=Mr();return(0,u.createElement)(u.Fragment,null,n&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ob,t),(0,u.createElement)(f_,t),(0,u.createElement)(kv,t),(0,u.createElement)(_i,t)),(0,u.createElement)(e,t))}),"withToolbarControls"),w_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r;const o=`wp-elements-${(0,f.useInstanceId)(e)}`,i=Uo(t.name,$v,"link"),l=(0,u.useMemo)((()=>{var e;const n=null===(e=t.attributes.style)||void 0===e?void 0:e.elements,r=[];if(n&&Object.keys(n).length>0){var l;const e={...n,link:{...n.link,color:i||null===(l=n.link)||void 0===l?void 0:l.color}};for(const[t,n]of Object.entries(e)){const e=(0,nl.compileCSS)(n,{selector:`.editor-styles-wrapper .${o} ${a.__EXPERIMENTAL_ELEMENTS[t]}`});e&&r.push(e)}}return r.length>0?r:void 0}),[null===(n=t.attributes.style)||void 0===n?void 0:n.elements]),s=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,l&&s&&(0,u.createPortal)((0,u.createElement)("style",{dangerouslySetInnerHTML:{__html:l}}),s),(0,u.createElement)(e,c({},t,{className:null!==(r=t.attributes.style)&&void 0!==r&&r.elements?d()(t.className,o):t.className})))}));(0,s.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return g_(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",E_),(0,s.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!g_(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),E_(r,e,n,v_)},e})),(0,s.addFilter)("editor.BlockEdit","core/style/with-block-controls",S_),(0,s.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",w_);(0,s.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){var t,n;return n=e,(0,a.hasBlockSupport)(n,"__experimentalSettings",!1)?(null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e}));var C_=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}));var I_=function(e){let t,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}=e;return t="unset"===l?(0,u.createElement)(g.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):l?(0,u.createElement)(g.DuotoneSwatch,{values:l}):(0,u.createElement)(Xi,{icon:C_}),(0,u.createElement)(g.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,_.__)("Duotone"),variant:"toolbar"},renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,u.createElement)(g.ToolbarButton,{showTooltip:!0,onClick:r,"aria-haspopup":"true","aria-expanded":n,onKeyDown:e=>{n||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},label:(0,_.__)("Apply duotone filter"),icon:t})},renderContent:()=>(0,u.createElement)(g.MenuGroup,{label:(0,_.__)("Duotone")},(0,u.createElement)("div",{className:"block-editor-duotone-control__description"},(0,_.__)("Create a two-tone color effect without losing your original image.")),(0,u.createElement)(g.DuotonePicker,{colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:l,onChange:a}))})};const A_=[];function x_(e){let{selector:t,id:n,colors:r}=e;return"unset"===r?(0,u.createElement)(qd,{selector:t}):(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Jd,{id:n,colors:r}),(0,u.createElement)(Kd,{id:n,selector:t}))}function B_(e){let{presetSetting:t,defaultSetting:n}=e;const r=!yo(n),o=yo(`${t}.custom`)||A_,i=yo(`${t}.theme`)||A_,l=yo(`${t}.default`)||A_;return(0,u.useMemo)((()=>[...o,...i,...r?A_:l]),[r,o,i,l])}function P_(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=B_({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),a=B_({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),s=!yo("color.custom"),c=!yo("color.customDuotone")||0===(null==a?void 0:a.length)&&s;return 0===(null==l?void 0:l.length)&&c?null:(0,u.createElement)(Ur,{group:"block",__experimentalShareWithChildBlocks:!0},(0,u.createElement)(I_,{duotonePalette:l,colorPalette:a,disableCustomDuotone:c,disableCustomColors:s,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}hd([vd]);const T_=(0,f.createHigherOrderComponent)((e=>t=>{const n=(0,a.hasBlockSupport)(t.name,"color.__experimentalDuotone"),r=(0,m.useSelect)((e=>e(xr).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(e,t),n&&!r&&(0,u.createElement)(P_,t))}),"withDuotoneControls");const O_=(0,f.createHigherOrderComponent)((e=>t=>{var n,r,o;const i=(0,a.getBlockSupport)(t.name,"color.__experimentalDuotone"),l=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(o=r.color)||void 0===o?void 0:o.duotone;if(!i||!l)return(0,u.createElement)(e,t);const s=`wp-duotone-${(0,f.useInstanceId)(e)}`,p=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${s}`,i),m=d()(null==t?void 0:t.className,s),y=(0,u.useContext)(Jh.__unstableElementContext);return(0,u.createElement)(u.Fragment,null,y&&(0,u.createPortal)((0,u.createElement)(x_,{selector:p,id:s,colors:l}),y),(0,u.createElement)(e,c({},t,{className:m})))}),"withDuotoneStyles");(0,s.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,a.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,s.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",T_),(0,s.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",O_);const N_="__experimentalLayout";function M_(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,m.useSelect)((e=>{var t;const{getSettings:n}=e(xr);return null===(t=n().__experimentalFeatures)||void 0===t?void 0:t.useRootPaddingAwareAlignments}),[]),o=yo("layout")||{},{attributes:i={},name:l}=n,{layout:s}=i,{default:c}=(0,a.getBlockSupport)(l,N_)||{},u=null!=s&&s.inherit||null!=s&&s.contentSize||null!=s&&s.wideSize?{...s,type:"constrained"}:s||c||{},p=[];var d,f;null!=o&&null!==(e=o.definitions)&&void 0!==e&&null!==(t=e[(null==u?void 0:u.type)||"default"])&&void 0!==t&&t.className&&p.push(null==o||null===(d=o.definitions)||void 0===d||null===(f=d[(null==u?void 0:u.type)||"default"])||void 0===f?void 0:f.className);return(null!=u&&u.inherit||null!=u&&u.contentSize||"constrained"===(null==u?void 0:u.type))&&r&&p.push("has-global-padding"),null!=u&&u.orientation&&p.push(`is-${(0,y.kebabCase)(u.orientation)}`),null!=u&&u.justifyContent&&p.push(`is-content-justification-${(0,y.kebabCase)(u.justifyContent)}`),null!=u&&u.flexWrap&&"nowrap"===u.flexWrap&&p.push("is-nowrap"),p}function R_(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const{attributes:r={},name:o}=t,{layout:i={},style:l={}}=r,a=null!=i&&i.inherit||null!=i&&i.contentSize||null!=i&&i.wideSize?{...i,type:"constrained"}:i||{},s=il((null==a?void 0:a.type)||"default"),c=yo("layout")||{},u=yo("spacing.blockGap"),p=null!==u,d=null==s||null===(e=s.getLayoutStyle)||void 0===e?void 0:e.call(s,{blockName:o,selector:n,layout:i,layoutDefinitions:null==c?void 0:c.definitions,style:l,hasBlockGapSupport:p});return d}function F_(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:o}=n,i=yo("layout"),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return t().supportsLayout}),[]),s=(0,a.getBlockSupport)(r,N_,{}),{allowSwitching:c,allowEditing:p=!0,allowInheriting:d=!0,default:f}=s;if(!p)return null;const y=!(!d||!i||null!=o&&o.type&&"default"!==(null==o?void 0:o.type)&&"constrained"!==(null==o?void 0:o.type)&&(null==o||!o.inherit)),h=o||f||{},{inherit:v=!1,type:b="default",contentSize:k=null}=h;if(("default"===b||"constrained"===b)&&!l)return null;const E=il(b),S=il("constrained"),w=!h.type&&(k||v),C=!!v||!!k,I=e=>t({layout:e});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Wo,null,(0,u.createElement)(g.PanelBody,{title:(0,_.__)("Layout")},y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.ToggleControl,{className:"block-editor-hooks__toggle-control",label:(0,_.__)("Inner blocks use content width"),checked:"constrained"===(null==E?void 0:E.name)||C,onChange:()=>t({layout:{type:"constrained"===(null==E?void 0:E.name)||C?"default":"constrained"}}),help:"constrained"===(null==E?void 0:E.name)||C?(0,_.__)("Nested blocks use content width with options for full and wide widths."):(0,_.__)("Nested blocks will fill the width of this container. Toggle to constrain.")})),!v&&c&&(0,u.createElement)(L_,{type:b,onChange:e=>t({layout:{type:e}})}),E&&"default"!==E.name&&(0,u.createElement)(E.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}),S&&w&&(0,u.createElement)(S.inspectorControls,{layout:h,onChange:I,layoutBlockSupport:s}))),!v&&E&&(0,u.createElement)(E.toolBarControls,{layout:h,onChange:I,layoutBlockSupport:s}))}function L_(e){let{type:t,onChange:n}=e;return(0,u.createElement)(g.ButtonGroup,null,ol.map((e=>{let{name:r,label:o}=e;return(0,u.createElement)(g.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const D_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,a.hasBlockSupport)(n,N_)&&(0,u.createElement)(F_,c({key:"layout"},t)),(0,u.createElement)(e,c({key:"edit"},t))]}),"withInspectorControls"),U_=(0,f.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r,block:o}=t,i=(0,a.hasBlockSupport)(n,N_),l=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=i&&!l,p=(0,f.useInstanceId)(e),y=yo("layout")||{},g=(0,u.useContext)(Jh.__unstableElementContext),{layout:h}=r,{default:v}=(0,a.getBlockSupport)(n,N_)||{},b=null!=h&&h.inherit||null!=h&&h.contentSize||null!=h&&h.wideSize?{...h,type:"constrained"}:h||v||{},_=i?M_(o):null,k=`.wp-container-${p}.wp-container-${p}`,E=null!==yo("spacing.blockGap");let S;if(s){var w;const e=il((null==b?void 0:b.type)||"default");S=null==e||null===(w=e.getLayoutStyle)||void 0===w?void 0:w.call(e,{blockName:n,selector:k,layout:b,layoutDefinitions:null==y?void 0:y.definitions,style:null==r?void 0:r.style,hasBlockGapSupport:E})}const C=d()({[`wp-container-${p}`]:s&&!!S},_);return(0,u.createElement)(u.Fragment,null,s&&g&&!!S&&(0,u.createPortal)((0,u.createElement)(ul,{blockName:n,selector:k,css:S,layout:b,style:null==r?void 0:r.style}),g),(0,u.createElement)(e,c({},t,{__unstableLayoutClassNames:C})))})),j_=(0,f.createHigherOrderComponent)((e=>t=>{const{attributes:n}=t,{style:{layout:r={}}={}}=n,{selfStretch:o,flexSize:i}=r,l=o||i,a=(0,m.useSelect)((e=>{const{getSettings:t}=e(xr);return!!t().disableLayoutStyles})),s=l&&!a,p=(0,u.useContext)(Jh.__unstableElementContext),y=(0,f.useInstanceId)(e),g=`.wp-container-content-${y}`;let h="";"fixed"===o&&i?h+=`${g} {\n\t\t\t\tflex-basis: ${i};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o&&(h+=`${g} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`);const v=d()(null==t?void 0:t.className,{[`wp-container-content-${y}`]:s&&!!h});return(0,u.createElement)(u.Fragment,null,s&&p&&!!h&&(0,u.createPortal)((0,u.createElement)("style",null,h),p),(0,u.createElement)(e,c({},t,{className:v})))}));function z_(e){let{clientId:t,stopEditingAsBlock:n}=e;const r=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e(xr);return n(t)||r(t,!0)}),[t]);return(0,u.useEffect)((()=>{r||n()}),[r]),null}(0,s.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.layout)&&void 0!==t?t:{})||(0,a.hasBlockSupport)(e,N_)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",U_),(0,s.addFilter)("editor.BlockListBlock","core/editor/layout/with-child-layout-styles",j_),(0,s.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",D_);const V_=(0,f.createHigherOrderComponent)((e=>t=>{const{getBlockListSettings:n,getSettings:r}=(0,m.useSelect)(xr),o=(0,u.useRef)(),{templateLock:i,isLockedByParent:l,isEditingAsBlocks:a}=(0,m.useSelect)((e=>{const{__unstableGetContentLockingParent:n,getTemplateLock:r,__unstableGetTemporarilyEditingAsBlocks:o}=e(xr);return{templateLock:r(t.clientId),isLockedByParent:!!n(t.clientId),isEditingAsBlocks:o()===t.clientId}}),[t.clientId]),{updateSettings:s,updateBlockListSettings:p,__unstableSetTemporarilyEditingAsBlocks:f}=(0,m.useDispatch)(xr),y=!l&&"contentOnly"===i,{__unstableMarkNextChangeAsNotPersistent:h,updateBlockAttributes:v}=(0,m.useDispatch)(xr),b=(0,u.useCallback)((()=>{h(),v(t.clientId,{templateLock:"contentOnly"}),p(t.clientId,{...n(t.clientId),templateLock:"contentOnly"}),s({focusMode:o.current}),f()}),[t.clientId,o,s,p,n,h,v,f]);return y||a?(0,u.createElement)(u.Fragment,null,a&&!y&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(z_,{clientId:t.clientId,stopEditingAsBlock:b}),(0,u.createElement)(Ur,{group:"other"},(0,u.createElement)(g.ToolbarButton,{onClick:()=>{b()}},(0,_.__)("Done")))),!a&&y&&t.isSelected&&(0,u.createElement)(zg,null,(e=>{let{onClose:i}=e;return(0,u.createElement)(g.MenuItem,{onClick:()=>{h(),v(t.clientId,{templateLock:void 0}),p(t.clientId,{...n(t.clientId),templateLock:!1}),o.current=r().focusMode,s({focusMode:!0}),f(t.clientId),i()}},(0,_.__)("Modify"))})),(0,u.createElement)(e,c({},t,{className:d()(t.className,a&&"is-content-locked-editing-as-blocks")}))):(0,u.createElement)(e,t)}),"withToolbarControls");(0,s.addFilter)("editor.BlockEdit","core/content-lock-ui/with-block-controls",V_);const G_="metadata";function H_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.name.startsWith("core/"))return!1;const n=(0,a.getBlockSupport)(e,"__experimentalMetadata");return!!(!0===n||null!=n&&n[t])}function W_(e){var t;const n=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:Cv(e)||void 0,style:h_({border:n})}}function $_(e){const{colors:t}=mv(),n=W_(e),{borderColor:r}=e;if(r){const e=bv({colors:t,namedColor:r});n.style.borderColor=e.color}return n}function K_(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:c,style:u}=e,p=fv("background-color",a),f=fv("color",s),m=Av(c),y=m||(null==u||null===(t=u.color)||void 0===t?void 0:t.gradient);return{className:d()(f,m,{[p]:!y&&!!p,"has-text-color":s||(null==u||null===(n=u.color)||void 0===n?void 0:n.text),"has-background":a||(null==u||null===(r=u.color)||void 0===r?void 0:r.background)||c||(null==u||null===(o=u.color)||void 0===o?void 0:o.gradient),"has-link-color":null==u||null===(i=u.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:h_({color:(null==u?void 0:u.color)||{}})}}(0,s.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.metadata)&&void 0!==n&&n.type||H_(e,"name")&&(e.attributes={...e.attributes,[G_]:{type:"object"}}),e})),(0,s.addFilter)("blocks.getSaveContent.extraProps","core/metadata/save-props",(function(e,t,n){return H_(t)&&(e.metadata=n.metadata),e})),(0,s.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||H_(e,"name",!1)&&(e.__experimentalLabel=(e,t)=>{let{context:n}=t;const{metadata:r}=e;if("list-view"===n&&null!=r&&r.name)return r.name}),e}));const q_={};function J_(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=yo("color.palette.custom"),i=yo("color.palette.theme"),l=yo("color.palette.default"),a=yo("color.gradients")||q_,s=(0,u.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),c=(0,u.useMemo)((()=>[...(null==a?void 0:a.custom)||[],...(null==a?void 0:a.theme)||[],...(null==a?void 0:a.default)||[]]),[a]),p=K_(e);if(t){const e=pv(s,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=xv(c,r)),n){const e=pv(s,n);p.style.color=e.color}return p}function Y_(e){const{style:t}=e;return{style:h_({spacing:(null==t?void 0:t.spacing)||{}})}}function Q_(e,t){var n;let r=(null==e||null===(n=e.style)||void 0===n?void 0:n.typography)||{};if(t&&(!0===t||0!==Object.keys(t).length)){var o,i,l,a;const n=Fb({fontSize:null==e||null===(o=e.style)||void 0===o||null===(i=o.typography)||void 0===i?void 0:i.fontSize,minimumFontSizeLimit:null==t?void 0:t.minFontSize})||(null==e||null===(l=e.style)||void 0===l||null===(a=l.typography)||void 0===a?void 0:a.fontSize);r={...r,fontSize:n}}const s=h_({typography:r}),c=null!=e&&e.fontFamily?`has-${(0,y.kebabCase)(e.fontFamily)}-font-family`:"";return{className:d()(c,Pb(null==e?void 0:e.fontSize)),style:s}}function Z_(e){const[t,n]=(0,u.useState)(e);return(0,u.useEffect)((()=>{e&&n(e)}),[e]),t}const X_=e=>{let[t,...n]=e;return t.toUpperCase()+n.join("")},ek=e=>(0,f.createHigherOrderComponent)((t=>n=>(0,u.createElement)(t,c({},n,{colors:e}))),"withCustomColorPalette"),tk=()=>(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette.custom"),r=yo("color.palette.theme"),o=yo("color.palette.default"),i=(0,u.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,u.createElement)(e,c({},t,{colors:i}))}),"withEditorColorPalette");function nk(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:(0,y.kebabCase)(t)}:t})),{});return(0,f.compose)([t,e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=yd(t),r=e=>{let{color:t}=e;return n.contrast(t)},o=Math.max(...e.map(r));return e.find((e=>r(e)===o)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=X_(t),r=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,r),e}),{})}createSetColor(e,t){return n=>{const r=dv(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return Object.entries(n).reduce(((e,n)=>{let[i,l]=n;const a=pv(o,r[i],r[`custom${X_(i)}`]),s=t[i];return(null==s?void 0:s.color)===a.color&&s?e[i]=s:e[i]={...a,class:fv(l,a.slug)},e}),{})}render(){return(0,u.createElement)(e,c({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function rk(e){return function(){const t=ek(e);for(var n=arguments.length,r=new Array(n),o=0;o{let[t,...n]=e;return t.toUpperCase()+n.join("")};var ak=function(){for(var e=arguments.length,t=new Array(e),n=0;n(e[t]=`custom${lk(t)}`,e)),{});return(0,f.createHigherOrderComponent)((0,f.compose)([(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("typography.fontSizes")||ik;return(0,u.createElement)(e,c({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends u.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(r).reduce(((e,t)=>{let[n,r]=t;return e[`set${lk(n)}`]=this.createSetFontSize(n,r),e}),{})}createSetFontSize(e,t){return n=>{var r;const o=null===(r=this.props.fontSizes)||void 0===r?void 0:r.find((e=>{let{size:t}=e;return t===Number(n)}));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!Object.values(r).some(i))return null;const l=Object.entries(r).filter((e=>{let[t,n]=e;return i(n,t)})).reduce(((e,t)=>{let[r,i]=t;const l=n[r],a=xb(o,l,n[i]);return e[r]={...a,class:Pb(l)},e}),{});return{...t,...l}}render(){return(0,u.createElement)(e,c({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var sk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var ck=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var uk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const pk=[{icon:sk,title:(0,_.__)("Align text left"),align:"left"},{icon:ck,title:(0,_.__)("Align text center"),align:"center"},{icon:uk,title:(0,_.__)("Align text right"),align:"right"}],dk={position:"bottom right",variant:"toolbar"};var fk=function(e){let{value:t,onChange:n,alignmentControls:r=pk,label:o=(0,_.__)("Align text"),describedBy:i=(0,_.__)("Change text alignment"),isCollapsed:l=!0,isToolbar:a}=e;function s(e){return()=>n(t===e?void 0:e)}const p=r.find((e=>e.align===t)),d=a?g.ToolbarGroup:g.ToolbarDropdownMenu,f=a?{isCollapsed:l}:{toggleProps:{describedBy:i},popoverProps:dk};return(0,u.createElement)(d,c({icon:p?p.icon:(0,_.isRTL)()?uk:sk,label:o,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:l?"menuitemradio":void 0,onClick:s(n)}}))},f))};const mk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!1})),yk=e=>(0,u.createElement)(fk,c({},e,{isToolbar:!0})),gk=()=>{};var hk={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(xr),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=yf(t,gk),l=(0,u.useMemo)((()=>(e.trim()?Kf(r,o,i,e):J(r,"frecency","desc")).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),a=(0,u.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,u.createElement)(u.Fragment,null,(0,u.createElement)(hp,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[a]},allowContext(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,a.createBlock)(t,n,(0,a.createBlocksFromInnerBlocksTemplate)(r))}}},vk=window.wp.apiFetch,bk=n.n(vk);var _k=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var kk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var Ek={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await bk()({path:(0,sm.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords(e){return[...e.title.split(/\s+/)]},getOptionLabel(e){return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Xi,{key:"icon",icon:"page"===e.subtype?_k:kk}),e.title)},getOptionCompletion(e){return(0,u.createElement)("a",{href:e.url},e.title)}};const Sk=[];function wk(e){let{completers:t=Sk}=e;const{name:n}=Nr();return(0,u.useMemo)((()=>{let e=[...t,Ek];return(n===(0,a.getDefaultBlockName)()||(0,a.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=[...e,hk]),(0,s.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map((e=>({...e})))),e=(0,s.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Ck=function(e){return(0,u.createElement)(g.Autocomplete,c({},e,{completers:wk(e)}))};var Ik=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var Ak=function(e){let{isActive:t,label:n=(0,_.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,u.createElement)(g.ToolbarButton,{isActive:t,icon:Ik,label:n,onClick:()=>r(!t),disabled:o})};const xk=()=>{};var Bk=function(e){const{label:t=(0,_.__)("Change matrix alignment"),onChange:n=xk,value:r="center",isDisabled:o}=e,i=(0,u.createElement)(g.__experimentalAlignmentMatrixControl.Icon,{value:r});return(0,u.createElement)(g.Dropdown,{popoverProps:{variant:"toolbar",placement:"bottom-start"},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,u.createElement)(g.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==Xu.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,u.createElement)(g.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var Pk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var Tk=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,m.useDispatch)(xr),{clientId:o,parents:i,hasSelection:l}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(xr),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),a=t||(0,_.__)("Document");return(0,u.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,_.__)("Block breadcrumb")},(0,u.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},a),!l&&a,!!o&&(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,u.createElement)("li",{key:e},(0,u.createElement)(g.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,u.createElement)(uy,{clientId:e,maximumLength:35})),(0,u.createElement)(Xi,{icon:Pk,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,u.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,u.createElement)(uy,{clientId:o,maximumLength:35})))};const Ok=()=>(0,u.createElement)(g.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,u.createElement)(g.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"})),Nk=e=>{let{style:t,className:n}=e;return(0,u.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,u.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,u.createElement)(Ok,null)))},Mk=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,u.createElement)(g.ToolbarGroup,null,(0,u.createElement)(g.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,_.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==Xu.DOWN||(e.preventDefault(),r())},icon:(0,u.createElement)(n,null,(0,u.createElement)(t,null,(0,u.createElement)(Nk,null)))}))}};var Rk=e=>{let{children:t,...n}=e;return $()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,u.createElement)(g.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:Mk(n),renderContent:()=>t})};var Fk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const Lk=Fu(g.__experimentalTreeGridRow);var Dk=(0,u.forwardRef)(((e,t)=>{let{isSelected:n,position:r,level:o,rowCount:i,children:l,className:a,path:s,...p}=e;const m=Uu({isSelected:n,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:s}),y=(0,f.useMergeRefs)([t,m]);return(0,u.createElement)(Lk,c({ref:y,className:d()("block-editor-list-view-leaf",a),level:o,positionInSet:r,setSize:i},p),l)}));var Uk=(0,u.createElement)(V.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(V.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"}));var jk=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}));function zk(e){let{onClick:t}=e;return(0,u.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,u.createElement)(Xi,{icon:(0,_.isRTL)()?jk:Pk}))}var Vk=(0,u.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:a,onDragStart:s,onDragEnd:c,draggable:p}=e;const f=sy(r),m=cy({clientId:r,context:"list-view"}),{isLocked:y}=Pg(r);return(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.Button,{className:d()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==Xu.ENTER&&e.keyCode!==Xu.SPACE||o(e)},ref:t,tabIndex:l,onFocus:a,onDragStart:e=>{e.dataTransfer.clearData(),null==s||s(e)},onDragEnd:c,draggable:p,href:`#block-${r}`,"aria-hidden":!0},(0,u.createElement)(zk,{onClick:i}),(0,u.createElement)(hp,{icon:null==f?void 0:f.icon,showColors:!0}),(0,u.createElement)(g.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1},(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,u.createElement)(g.__experimentalTruncate,{ellipsizeMode:"auto"},m)),(null==f?void 0:f.anchor)&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper"},(0,u.createElement)(g.__experimentalTruncate,{className:"block-editor-list-view-block-select-button__anchor",ellipsizeMode:"auto"},f.anchor)),y&&(0,u.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,u.createElement)(Xi,{icon:Uk})))))}));const Gk=(0,u.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:l,siblingBlockCount:a,level:s,isExpanded:p,selectedClientIds:f,...y}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:v}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(xr);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),b=h&&v===g,_=d()("block-editor-list-view-block-contents",{"is-dropping-before":b}),k=f.includes(g)?f:[g];return(0,u.createElement)(py,{clientIds:k},(e=>{let{draggable:d,onDragStart:f,onDragEnd:m}=e;return(0,u.createElement)(Vk,c({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:l,siblingBlockCount:a,level:s,draggable:d,onDragStart:f,onDragEnd:m,isExpanded:p},y))}))}));var Hk=Gk;const Wk=(0,u.createContext)({}),$k=()=>(0,u.useContext)(Wk);var Kk=(0,u.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:c,rowCount:p,siblingBlockCount:y,showBlockMovers:h,path:v,isExpanded:b,selectedClientIds:k,preventAnnouncement:E,isSyncedBranch:S}=t;const w=(0,u.useRef)(null),C=(0,u.useRef)(null),[I,A]=(0,u.useState)(!1),{clientId:x}=n,{isLocked:B,isContentLocked:P,canEdit:T}=Pg(x),O=(0,m.useSelect)((e=>!o&&(!!P&&e(xr).hasSelectedInnerBlock(x,!0))),[P,x,o]),N=!P&&T,M=O||o&&k[0]===x,R=O||o&&k[k.length-1]===x,{toggleBlockHighlight:F}=(0,m.useDispatch)(xr),L=sy(x),D=(0,m.useSelect)((e=>e(xr).getBlockName(x)),[x]),U=(0,a.hasBlockSupport)(D,"__experimentalToolbar",!0),j=`list-view-block-select-button__${(0,f.useInstanceId)(e)}`,z=((e,t,n)=>(0,_.sprintf)((0,_.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,y,c);let V=(0,_.__)("Link");L&&(V=B?(0,_.sprintf)((0,_.__)("%s link (locked)"),L.title):(0,_.sprintf)((0,_.__)("%s link"),L.title));const G=L?(0,_.sprintf)((0,_.__)("Options for %s block"),L.title):(0,_.__)("Options"),{isTreeGridMounted:H,expand:W,collapse:$}=$k(),K=h&&y>0,q=d()("block-editor-list-view-block__mover-cell",{"is-visible":I||o}),J=d()("block-editor-list-view-block__menu-cell",{"is-visible":I||M});(0,u.useEffect)((()=>{!H&&o&&w.current.focus()}),[]);const Y=(0,u.useCallback)((()=>{A(!0),F(x,!0)}),[x,A,F]),Q=(0,u.useCallback)((()=>{A(!1),F(x,!1)}),[x,A,F]),Z=(0,u.useCallback)((e=>{l(e,x),e.preventDefault()}),[x,l]),X=(0,u.useCallback)((e=>{l(void 0,e)}),[l]),ee=(0,u.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===b?$(x):!1===b&&W(x)}),[x,W,$,b]);let te;K?te=2:U||(te=3);const ne=d()({"is-selected":o||O,"is-first-selected":M,"is-last-selected":R,"is-branch-selected":i,"is-synced-branch":S,"is-dragging":r,"has-single-cell":!U,"is-synced":null==L?void 0:L.isSynced}),re=k.includes(x)?k:[x];return function(e){let{isSelected:t,selectedClientIds:n,rowItemRef:r}=e;const o=1===n.length;(0,u.useLayoutEffect)((()=>{if(!t||!o||!r.current)return;const e=(0,Ml.getScrollContainer)(r.current),{ownerDocument:n}=r.current;if(e===n.body||e===n.documentElement||!e)return;const i=r.current.getBoundingClientRect(),l=e.getBoundingClientRect();(i.topl.bottom)&&r.current.scrollIntoView()}),[t,o,r])}({isSelected:o,rowItemRef:C,selectedClientIds:k}),(0,u.createElement)(Dk,{className:ne,onMouseEnter:Y,onMouseLeave:Q,onFocus:Y,onBlur:Q,level:c,position:s,rowCount:p,path:v,id:`list-view-block-${x}`,"data-block":x,isExpanded:N?b:void 0,"aria-selected":!!o||O,ref:C},(0,u.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:te,ref:w,"aria-label":V,"aria-selected":!!o||O,"aria-expanded":N?b:void 0,"aria-describedby":j},(e=>{let{ref:t,tabIndex:r,onFocus:i}=e;return(0,u.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,u.createElement)(Hk,{block:n,onClick:Z,onToggleExpanded:ee,isSelected:o,position:s,siblingBlockCount:y,level:c,ref:t,tabIndex:r,onFocus:i,isExpanded:b,selectedClientIds:k,preventAnnouncement:E}),(0,u.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:j},z))})),K&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalTreeGridCell,{className:q,withoutGridItem:!0},(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(by,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})),(0,u.createElement)(g.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(_y,{orientation:"vertical",clientIds:[x],ref:t,tabIndex:n,onFocus:r})})))),U&&(0,u.createElement)(g.__experimentalTreeGridCell,{className:J,"aria-selected":!!o||O},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,u.createElement)(Wg,{clientIds:re,icon:dm,label:G,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:X})})))}));function qk(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(Jk(t,n,r),0):1}const Jk=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+qk(o,e,t,n):r+1},Yk=()=>{};var Qk=(0,u.memo)((function e(t){const{blocks:n,selectBlock:r=Yk,showBlockMovers:o,selectedClientIds:i,level:l=1,path:a="",isBranchSelected:s=!1,listPosition:c=0,fixedListWindow:p,isExpanded:d,parentId:f,shouldShowInnerBlocks:y=!0,isSyncedBranch:g=!1}=t,h=sy(f),v=g||!(null==h||!h.isSynced),b=(0,m.useSelect)((e=>{if(!f)return!0;const t="contentOnly"===e(xr).getTemplateLock(f),n=e(xr).canEditBlock(f);return!t&&n}),[f]),{expandedState:_,draggedClientIds:k}=$k();if(!b)return null;const E=n.filter(Boolean),S=E.length;let w=c;return(0,u.createElement)(u.Fragment,null,E.map(((t,n)=>{var c;const{clientId:f,innerBlocks:g}=t;n>0&&(w+=qk(E[n-1],_,k,d));const{itemInView:h}=p,b=h(w),C=n+1,I=a.length>0?`${a}_${C}`:`${C}`,A=!(null==g||!g.length),x=A&&y?null!==(c=_[f])&&void 0!==c?c:d:void 0,B=!(null==k||!k.includes(f)),P=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(f,i),T=s||P&&A,O=B||b||P;return(0,u.createElement)(m.AsyncModeProvider,{key:f,value:!P},O&&(0,u.createElement)(Kk,{block:t,selectBlock:r,isSelected:P,isBranchSelected:T,isDragged:B,level:l,position:C,rowCount:S,siblingBlockCount:S,showBlockMovers:o,path:I,isExpanded:x,listPosition:w,selectedClientIds:i,isSyncedBranch:v}),!O&&(0,u.createElement)("tr",null,(0,u.createElement)("td",{className:"block-editor-list-view-placeholder"})),A&&x&&!B&&(0,u.createElement)(e,{parentId:f,blocks:g,selectBlock:r,showBlockMovers:o,level:l+1,path:I,listPosition:w+1,fixedListWindow:p,isBranchSelected:T,selectedClientIds:i,isExpanded:d,isSyncedBranch:v}))})))}));function Zk(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,a]=(0,u.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),s=a||l,c=(0,u.useCallback)((()=>{if(!l)return 0;const e=s.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,s]),p=(0,u.useMemo)((()=>{if(!s)return{};const e=c();return{width:s.offsetWidth-e}}),[c,s]),d=(0,u.useMemo)((()=>{if(s&&("top"===i||"bottom"===i||"inside"===i))return{ownerDocument:s.ownerDocument,getBoundingClientRect(){const e=s.getBoundingClientRect(),t=c(),n=e.left+t,r=e.right;let o=0,l=0;"top"===i?(o=e.top,l=e.top):(o=e.bottom,l=e.bottom);const a=r-n,u=l-o;return new window.DOMRect(n,o,a,u)}}}),[s,i,c]);return s?(0,u.createElement)(g.Popover,{animate:!1,anchor:d,focusOnMount:!1,className:"block-editor-list-view-drop-indicator",variant:"unstyled"},(0,u.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function Xk(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(xr),{getBlockName:r,getBlockParents:o,getBlockSelectionStart:i,getBlockSelectionEnd:l,getSelectedBlockClientIds:s,hasMultiSelection:c,hasSelectedBlock:p}=(0,m.useSelect)(xr),{getBlockType:d}=(0,m.useSelect)(a.store),f=(0,u.useCallback)((async(l,a,u)=>{if(null==l||!l.shiftKey)return void n(a);l.preventDefault();const f="keydown"===l.type&&(l.keyCode===Xu.UP||l.keyCode===Xu.DOWN||l.keyCode===Xu.HOME||l.keyCode===Xu.END);if(!f&&!p()&&!c())return void n(a,null);const m=s(),y=[...o(a),a];f&&!m.some((e=>y.includes(e)))&&await e();let g=i(),h=a;f&&(p()||c()||(g=a),u&&(h=u));const v=o(g),b=o(h),{start:k,end:E}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(g,h,v,b);await t(k,E,null);const S=s();if((l.keyCode===Xu.HOME||l.keyCode===Xu.END)&&S.length>1)return;const w=m.filter((e=>!S.includes(e)));let C;if(1===w.length){var I;const e=null===(I=d(r(w[0])))||void 0===I?void 0:I.title;e&&(C=(0,_.sprintf)((0,_.__)("%s deselected."),e))}else w.length>1&&(C=(0,_.sprintf)((0,_.__)("%s blocks deselected."),w.length));C&&(0,dn.speak)(C)}),[e,r,d,o,i,l,s,c,p,t,n]);return{updateBlockSelection:f}}const eE=["top","bottom"];function tE(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,m.useSelect)(xr),[i,l]=(0,u.useState)(),{rootClientId:a,blockIndex:s}=i||{},c=Nh(a,s),p=r(),d=(0,f.useThrottle)((0,u.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==p||!p.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Rh(t,a,eE),u=Fh(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&p.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(p,l),canInsertDraggedBlocksAsChild:!s||o(p,i)}})),a);c&&l(c)}),[p]),200);return{ref:(0,f.__experimentalUseDropZone)({onDrop:c,onDragOver(e){d(e,e.currentTarget)},onDragEnd(){d.cancel(),l(null)}}),target:i}}const nE=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var rE=(0,u.forwardRef)((function(e,t){let{id:n,blocks:r,showBlockMovers:o=!1,isExpanded:i=!1}=e;const{clientIdsTree:l,draggedClientIds:a,selectedClientIds:s}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(xr);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(r),{visibleBlockCount:c,shouldShowInnerBlocks:p}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n,__unstableGetEditorMode:r}=e(xr),o=(null==a?void 0:a.length)>0?n(a).length+1:0;return{visibleBlockCount:t()-o,shouldShowInnerBlocks:"zoom-out"!==r()}}),[a]),{updateBlockSelection:d}=Xk(),[y,h]=(0,u.useReducer)(nE,{}),{ref:v,target:b}=tE(),k=(0,u.useRef)(),E=(0,f.useMergeRefs)([k,v,t]),S=(0,u.useRef)(!1),{setSelectedTreeId:w}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,u.useState)(null),{selectedBlockParentClientIds:i}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(xr);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,u.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:s[0],setExpandedState:h}),C=(0,u.useCallback)(((e,t)=>{d(e,t),w(t)}),[w,d]);(0,u.useEffect)((()=>{S.current=!0}),[]);const[I]=(0,f.__experimentalUseFixedWindowList)(k,36,c,{useWindowing:!0,windowOverscan:40}),A=(0,u.useCallback)((e=>{e&&h({type:"expand",clientIds:[e]})}),[h]),x=(0,u.useCallback)((e=>{e&&h({type:"collapse",clientIds:[e]})}),[h]),B=(0,u.useCallback)((e=>{var t;A(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[A]),P=(0,u.useCallback)((e=>{var t;x(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[x]),T=(0,u.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&d(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[d]),O=(0,u.useMemo)((()=>({isTreeGridMounted:S.current,draggedClientIds:a,expandedState:y,expand:A,collapse:x})),[S.current,a,y,A,x]);return(0,u.createElement)(m.AsyncModeProvider,{value:!0},(0,u.createElement)(Zk,{listViewRef:k,blockDropTarget:b}),(0,u.createElement)(g.__experimentalTreeGrid,{id:n,className:"block-editor-list-view-tree","aria-label":(0,_.__)("Block navigation structure"),ref:E,onCollapseRow:P,onExpandRow:B,onFocusRow:T,applicationAriaLabel:(0,_.__)("Block navigation structure")},(0,u.createElement)(Wk.Provider,{value:O},(0,u.createElement)(Qk,{blocks:l,selectBlock:C,showBlockMovers:o,fixedListWindow:I,selectedClientIds:s,isExpanded:i,shouldShowInnerBlocks:p}))))}));function oE(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,u.createElement)(g.Button,c({},i,{ref:o,icon:Fk,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,_.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var iE=(0,u.forwardRef)((function(e,t){let{isDisabled:n,...r}=e;$()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,m.useSelect)((e=>!!e(xr).getBlockCount()),[])&&!n;return(0,u.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:e=>{let{isOpen:n,onToggle:i}=e;return(0,u.createElement)(oE,c({},r,{innerRef:t,isOpen:n,onToggle:i,isEnabled:o}))},renderContent:()=>(0,u.createElement)("div",{className:"block-editor-block-navigation__container"},(0,u.createElement)("p",{className:"block-editor-block-navigation__label"},(0,_.__)("List view")),(0,u.createElement)(rE,null))})}));function lE(e){var t;let{genericPreviewBlock:n,style:r,className:o,activeStyle:i}=e;const l=null===(t=(0,a.getBlockType)(n.name))||void 0===t?void 0:t.example,s=zy(o,i,r),c=(0,u.useMemo)((()=>({...n,title:r.label||r.name,description:r.description,initialAttributes:{...n.attributes,className:s+" block-editor-block-styles__block-preview-container"},example:l})),[n,s]);return(0,u.createElement)(rf,{item:c,isStylePreview:!0})}const aE=()=>{};function sE(e){let{clientId:t,onSwitch:n=aE,onHoverClassName:r=aE}=e;const{onSelect:o,stylesToRender:i,activeStyle:l,genericPreviewBlock:a,className:s}=Gy({clientId:t,onSwitch:n}),[c,p]=(0,u.useState)(null),m=(0,f.useViewportMatch)("medium","<");if(!i||0===i.length)return null;const y=(0,f.debounce)(p,250),h=e=>{var t;c!==e?(y(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):y.cancel()};return(0,u.createElement)("div",{className:"block-editor-block-styles"},(0,u.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.isDefault?(0,_.__)("Default"):e.label||e.name;return(0,u.createElement)(g.Button,{className:d()("block-editor-block-styles__item",{"is-active":l.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>h(e),onFocus:()=>h(e),onMouseLeave:()=>h(null),onBlur:()=>h(null),onClick:()=>(e=>{o(e),r(null),p(null),y.cancel()})(e),"aria-current":l.name===e.name},(0,u.createElement)(g.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),c&&!m&&(0,u.createElement)(g.Popover,{placement:"left-start",offset:20},(0,u.createElement)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>h(null)},(0,u.createElement)(lE,{activeStyle:l,className:s,genericPreviewBlock:a,style:c}))))}var cE=sE;sE.Slot=()=>($()("BlockStyles.Slot",{version:"6.4",since:"6.2"}),null);var uE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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"}));var pE=function(e){let{icon:t=uE,label:n=(0,_.__)("Choose variation"),instructions:r=(0,_.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const a=d()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,u.createElement)(g.Placeholder,{icon:t,label:n,instructions:r,className:a},(0,u.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,_.__)("Block variations")},o.map((e=>(0,u.createElement)("li",{key:e.name},(0,u.createElement)(g.Button,{variant:"secondary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,u.createElement)("span",{className:"block-editor-block-variation-picker__variation-label"},e.title))))),l&&(0,u.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,u.createElement)(g.Button,{variant:"link",onClick:()=>i()},(0,_.__)("Skip"))))};var dE=(0,u.createElement)(V.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(V.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 fE={carousel:"carousel",grid:"grid"},mE=e=>{let{onBlockPatternSelect:t}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},(0,u.createElement)(g.Button,{variant:"primary",onClick:t},(0,_.__)("Choose")))},yE=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,u.createElement)(g.Button,{icon:yp,label:(0,_.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,u.createElement)(g.Button,{icon:mp,label:(0,_.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var gE=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:a}=e;const s=t===fE.carousel,c=(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,u.createElement)(g.Button,{icon:vl,label:(0,_.__)("Carousel view"),onClick:()=>n(fE.carousel),isPressed:s}),(0,u.createElement)(g.Button,{icon:dE,label:(0,_.__)("Grid view"),onClick:()=>n(fE.grid),isPressed:t===fE.grid}));return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},s&&(0,u.createElement)(yE,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),c,s&&(0,u.createElement)(mE,{onBlockPatternSelect:a}))};var hE=function(e,t,n){return(0,m.useSelect)((r=>{const{getBlockRootClientId:o,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(xr),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const vE=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,showTitles:i}=e;const l=(0,g.__unstableUseCompositeState)(),a="block-editor-block-pattern-setup__container";if(t===fE.carousel){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__carousel"},(0,u.createElement)("div",{className:a},(0,u.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,u.createElement)(_E,{className:e.get(n)||"",key:t.name,pattern:t}))))))}return(0,u.createElement)("div",{className:"block-editor-block-pattern-setup__grid"},(0,u.createElement)(g.__unstableComposite,c({},l,{role:"listbox",className:a,"aria-label":(0,_.__)("Patterns list")}),r.map((e=>(0,u.createElement)(bE,{key:e.name,pattern:e,onSelect:o,composite:l,showTitles:i})))))};function bE(e){let{pattern:t,onSelect:n,composite:r,showTitles:o}=e;const i="block-editor-block-pattern-setup-list",{blocks:l,description:a,viewportWidth:s=700}=t,p=(0,f.useInstanceId)(bE,`${i}__item-description`);return(0,u.createElement)("div",{className:`${i}__list-item`,"aria-label":t.title,"aria-describedby":t.description?p:void 0},(0,u.createElement)(g.__unstableCompositeItem,c({role:"option",as:"div"},r,{className:`${i}__item`,onClick:()=>n(l)}),(0,u.createElement)(tf,{blocks:l,viewportWidth:s}),o&&(0,u.createElement)("div",{className:`${i}__item-title`},t.title),!!a&&(0,u.createElement)(g.VisuallyHidden,{id:p},a)))}function _E(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,a=(0,f.useInstanceId)(_E,"block-editor-block-pattern-setup-list__item-description");return(0,u.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?a:void 0},(0,u.createElement)(tf,{blocks:o,minHeight:r}),!!l&&(0,u.createElement)(g.VisuallyHidden,{id:a},l))}var kE=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,onBlockPatternSelect:o,initialViewMode:i=fE.carousel,showTitles:l=!1}=e;const[s,c]=(0,u.useState)(i),[p,d]=(0,u.useState)(0),{replaceBlock:f}=(0,m.useDispatch)(xr),y=hE(t,n,r);if(null==y||!y.length)return null;const g=o||(e=>{const n=e.map((e=>(0,a.cloneBlock)(e)));f(t,n)});return(0,u.createElement)(u.Fragment,null,(0,u.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,u.createElement)(vE,{viewMode:s,activeSlide:p,patterns:y,onBlockPatternSelect:g,showTitles:l}),(0,u.createElement)(gE,{viewMode:s,setViewMode:c,activeSlide:p,totalSlides:y.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{g(y[p].blocks)}})))};function EE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,u.createElement)("fieldset",{className:t},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Transform to variation")),o.map((e=>(0,u.createElement)(g.Button,{key:e.name,icon:(0,u.createElement)(hp,{icon:e.icon,showColors:!0}),isPressed:r===e.name,label:r===e.name?e.title:(0,_.sprintf)((0,_.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function SE(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,u.createElement)(g.DropdownMenu,{className:t,label:(0,_.__)("Transform to variation"),text:(0,_.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:fy,toggleProps:{iconPosition:"right"}},(()=>(0,u.createElement)("div",{className:`${t}__container`},(0,u.createElement)(g.MenuGroup,null,(0,u.createElement)(g.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var wE=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,m.useDispatch)(xr),{activeBlockVariation:r,variations:o}=(0,m.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(a.store),{getBlockName:o,getBlockAttributes:i}=e(xr),l=t&&o(t);return{activeBlockVariation:n(l,i(t)),variations:l&&r(l,"transform")}}),[t]),i=null==r?void 0:r.name,l=(0,u.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{var n;t.icon&&e.add((null===(n=t.icon)||void 0===n?void 0:n.src)||t.icon)})),e.size===o.length)}),[o]);if(null==o||!o.length)return null;const s=l?EE:SE;return(0,u.createElement)(s,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...o.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:o})},CE=(0,f.createHigherOrderComponent)((e=>t=>{const n=yo("color.palette"),r=!yo("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,l=!(0,y.isEmpty)(o)||!i;return(0,u.createElement)(e,c({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:l}))}),"withColorContext"),IE=CE(g.ColorPalette);function AE(e){let{onChange:t,value:n,...r}=e;return(0,u.createElement)(Dv,c({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var xE=window.wp.date;const BE=new Date(2022,0,25);function PE(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,u.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,u.createElement)(g.VisuallyHidden,{as:"legend"},(0,_.__)("Date format")),(0,u.createElement)(g.ToggleControl,{label:(0,u.createElement)(u.Fragment,null,(0,_.__)("Default format"),(0,u.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,xE.dateI18n)(n,BE))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,u.createElement)(TE,{format:t,onChange:r}))}function TE(e){var t;let{format:n,onChange:r}=e;const o=[...new Set(["Y-m-d",(0,_._x)("n/j/Y","short date format"),(0,_._x)("n/j/Y g:i A","short date format with time"),(0,_._x)("M j, Y","medium date format"),(0,_._x)("M j, Y g:i A","medium date format with time"),(0,_._x)("F j, Y","long date format"),(0,_._x)("M j","short date format without the year")])],i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,xE.dateI18n)(e,BE),format:e}))),l={key:"custom",name:(0,_.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,_.__)("Enter your own date format")},[a,s]=(0,u.useState)((()=>!!n&&!o.includes(n)));return(0,u.createElement)(g.__experimentalVStack,null,(0,u.createElement)(g.CustomSelectControl,{__nextUnconstrainedWidth:!0,label:(0,_.__)("Choose a format"),options:[...i,l],value:a?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?s(!0):(s(!1),r(t.format))}}),a&&(0,u.createElement)(g.TextControl,{__nextHasNoMarginBottom:!0,label:(0,_.__)("Custom format"),hideLabelFromVision:!0,help:(0,u.createInterpolateElement)((0,_.__)("Enter a date or time format string."),{Link:(0,u.createElement)(g.ExternalLink,{href:(0,_.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const OE=["colors","disableCustomColors","gradients","disableCustomGradients"],NE=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:l,settings:a,title:s,showTitle:c=!0,__experimentalIsRenderedInSidebar:p,enableAlpha:h}=e;const v=(0,f.useInstanceId)(NE),{batch:b}=(0,m.useRegistry)();return(0,y.isEmpty)(n)&&(0,y.isEmpty)(r)&&o&&i&&null!=a&&a.every((e=>(0,y.isEmpty)(e.colors)&&(0,y.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?null:(0,u.createElement)(g.__experimentalToolsPanel,{className:d()("block-editor-panel-color-gradient-settings",t),label:c?s:void 0,resetAll:()=>{b((()=>{a.forEach((e=>{let{colorValue:t,gradientValue:n,onColorChange:r,onGradientChange:o}=e;t?r():n&&o()}))}))},panelId:v,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,u.createElement)(Vv,{settings:a,panelId:v,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalIsRenderedInSidebar:p,enableAlpha:h}),!!l&&(0,u.createElement)(u.Fragment,null,(0,u.createElement)(g.__experimentalSpacer,{marginY:4})," ",l))},ME=e=>{const t=mv();return(0,u.createElement)(NE,c({},t,e))};var RE=e=>OE.every((t=>e.hasOwnProperty(t)))?(0,u.createElement)(NE,e):(0,u.createElement)(ME,e);const FE=(0,u.createContext)({}),LE=()=>(0,u.useContext)(FE);function DE(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,onFinishEditing:i,onSaveImage:l,children:a}=e;const c=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,i]=(0,u.useState)(),[l,a]=(0,u.useState)(),[c,p]=(0,u.useState)({x:0,y:0}),[d,f]=(0,u.useState)(100),[m,y]=(0,u.useState)(0),g=n/r,[h,v]=(0,u.useState)(g),b=(0,u.useCallback)((()=>{const e=(m+90)%360;let n=g;if(m%180==90&&(n=1/g),0===e)return i(),y(e),v(g),void p({x:-c.y*n,y:c.x*n});const r=new window.Image;r.src=t,r.onload=function(t){const r=document.createElement("canvas");let o=0,l=0;e%180?(r.width=t.target.height,r.height=t.target.width):(r.width=t.target.width,r.height=t.target.height),90!==e&&180!==e||(o=r.width),270!==e&&180!==e||(l=r.height);const a=r.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),r.toBlob((t=>{i(URL.createObjectURL(t)),y(e),v(r.width/r.height),p({x:-c.y*n,y:c.x*n})}))};const o=(0,s.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof o&&(r.crossOrigin=o)}),[m,g]);return(0,u.useMemo)((()=>({editedUrl:o,setEditedUrl:i,crop:l,setCrop:a,position:c,setPosition:p,zoom:d,setZoom:f,rotation:m,setRotation:y,rotateClockwise:b,aspect:h,setAspect:v,defaultAspect:g})),[o,l,c,d,m,b,h,g])}({url:n,naturalWidth:r,naturalHeight:o}),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:a,onSaveImage:s,onFinishEditing:c}=e;const{createErrorNotice:p}=(0,m.useDispatch)(bf.store),[d,f]=(0,u.useState)(!1),y=(0,u.useCallback)((()=>{f(!1),c()}),[f,c]),g=(0,u.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,bk()({path:`/wp/v2/media/${a}/edit`,method:"POST",data:e}).then((e=>{s({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,_.sprintf)((0,_.__)("Could not edit image. %s"),(0,Ml.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),c()}))}),[f,t,n,r,o,i,l,s,p,f,c]);return(0,u.useMemo)((()=>({isInProgress:d,apply:g,cancel:y})),[d,g,y])}({id:t,url:n,onSaveImage:l,onFinishEditing:i,...c}),d=(0,u.useMemo)((()=>({...c,...p})),[c,p]);return(0,u.createElement)(FE.Provider,{value:d},a)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. diff --git a/wp-includes/js/dist/block-library.js b/wp-includes/js/dist/block-library.js index a49c2a9703..c61e8d3801 100644 --- a/wp-includes/js/dist/block-library.js +++ b/wp-includes/js/dist/block-library.js @@ -2152,19 +2152,15 @@ const commentAuthorAvatar = (0,external_wp_element_namespaceObject.createElement ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function _extends() { - _extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } + return _extends = Object.assign ? Object.assign.bind() : function (n) { + for (var e = 1; e < arguments.length; e++) { + var t = arguments[e]; + for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } - return target; - }; - return _extends.apply(this, arguments); + return n; + }, _extends.apply(null, arguments); } + // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(7153); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js index 13325914c6..139f77eaed 100644 --- a/wp-includes/js/dist/block-library.min.js +++ b/wp-includes/js/dist/block-library.min.js @@ -9,6 +9,6 @@ Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;tn({displayAsDropdown:!a})}),a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show label"),checked:o,onChange:()=>n({showLabel:!o})}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:()=>n({showPostCounts:!r})}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Group by:"),options:[{label:(0,Ze.__)("Year"),value:"yearly"},{label:(0,Ze.__)("Month"),value:"monthly"},{label:(0,Ze.__)("Week"),value:"weekly"},{label:(0,Ze.__)("Day"),value:"daily"}],value:l,onChange:e=>n({type:e})}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)(),(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:t}))))}},tt=()=>je({name:Xe,metadata:Je,settings:et});var nt=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}));function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{getSettings:t}=e(Qe.store),{__experimentalDiscussionSettings:n}=t();return n}));return e}const mt={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var dt=function(e){let{value:t,onChange:n}=e;const[o,r]=(0,Oe.useState)(),a=(0,st.useSelect)((e=>{const{getUsers:t}=e(it.store);return t(mt)}),[]);if(!a)return null;const l=a.map((e=>({label:e.name,value:e.id})));return(0,Oe.createElement)(We.ComboboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("User"),help:(0,Ze.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:t,onChange:n,options:o||l,onFilterValueChange:e=>r(l.filter((t=>t.label.toLowerCase().startsWith(e.toLowerCase()))))})};const pt=e=>{let{setAttributes:t,avatar:n,attributes:o,selectUser:r}=e;return(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Image size"),onChange:e=>t({size:e}),min:n.minSize,max:n.maxSize,initialPosition:null==o?void 0:o.size,value:null==o?void 0:o.size}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Link to user profile"),onChange:()=>t({isLink:!o.isLink}),checked:o.isLink}),o.isLink&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o.linkTarget}),r&&(0,Oe.createElement)(dt,{value:null==o?void 0:o.userId,onChange:e=>{t({userId:e})}})))},gt=e=>{let{setAttributes:t,attributes:n,avatar:o,blockProps:r,isSelected:a}=e;const l=(0,Qe.__experimentalUseBorderProps)(n),i=(0,lt.addQueryArgs)((0,lt.removeQueryArgs)(null==o?void 0:o.src,["s"]),{s:2*(null==n?void 0:n.size)});return(0,Oe.createElement)("div",r,(0,Oe.createElement)(We.ResizableBox,{size:{width:n.size,height:n.size},showHandle:a,onResizeStop:(e,o,r,a)=>{t({size:parseInt(n.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,Ze.isRTL)(),bottom:!0,left:(0,Ze.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize},(0,Oe.createElement)("img",ot({src:i,alt:o.alt},l,{className:at()("avatar","avatar-"+n.size,"photo","wp-block-avatar__image",l.className),style:{...l.style}}))))},ht=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{commentId:a}=n,l=(0,Qe.useBlockProps)(),i=function(e){let{commentId:t}=e;const[n]=(0,it.useEntityProp)("root","comment","author_avatar_urls",t),[o]=(0,it.useEntityProp)("root","comment","author_name",t),r=n?Object.values(n):null,a=n?Object.keys(n):null,{minSize:l,maxSize:i}=ct(a),s=ut();return{src:r?r[r.length-1]:s,minSize:l,maxSize:i,alt:o?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),o):(0,Ze.__)("Default Avatar")}}({commentId:a});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{avatar:i,setAttributes:o,attributes:t,selectUser:!1}),t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:l,isSelected:r,setAttributes:o}))},vt=e=>{let{attributes:t,context:n,setAttributes:o,isSelected:r}=e;const{postId:a,postType:l}=n,i=function(e){let{userId:t,postId:n,postType:o}=e;const{authorDetails:r}=(0,st.useSelect)((e=>{var r;const{getEditedEntityRecord:a,getUser:l}=e(it.store);if(t)return{authorDetails:l(t)};const i=null===(r=a("postType",o,n))||void 0===r?void 0:r.author;return{authorDetails:i?l(i):null}}),[o,n,t]),a=null!=r&&r.avatar_urls?Object.values(r.avatar_urls):null,l=null!=r&&r.avatar_urls?Object.keys(r.avatar_urls):null,{minSize:i,maxSize:s}=ct(l),c=ut();return{src:a?a[a.length-1]:c,minSize:i,maxSize:s,alt:r?(0,Ze.sprintf)((0,Ze.__)("%s Avatar"),null==r?void 0:r.name):(0,Ze.__)("Default Avatar")}}({userId:null==t?void 0:t.userId,postId:a,postType:l}),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(pt,{selectUser:!0,attributes:t,avatar:i,setAttributes:o}),(0,Oe.createElement)("div",null,t.isLink?(0,Oe.createElement)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault()},(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})):(0,Oe.createElement)(gt,{attributes:t,avatar:i,blockProps:s,isSelected:r,setAttributes:o})))};const bt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/avatar",title:"Avatar",category:"theme",description:"Add a user’s avatar.",textdomain:"default",attributes:{userId:{type:"number"},size:{type:"number",default:96},isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},usesContext:["postType","postId","commentId"],supports:{html:!1,align:!0,alignWide:!1,spacing:{margin:!0,padding:!0},__experimentalBorder:{__experimentalSkipSerialization:!0,radius:!0,width:!0,color:!0,style:!0,__experimentalDefaultControls:{radius:!0}},color:{text:!1,background:!1,__experimentalDuotone:"img"}},editorStyle:"wp-block-avatar",style:"wp-block-avatar"},{name:_t}=bt,ft={icon:nt,edit:function(e){var t,n;return null!=e&&null!==(t=e.context)&&void 0!==t&&t.commentId||null===(null==e||null===(n=e.context)||void 0===n?void 0:n.commentId)?(0,Oe.createElement)(ht,e):(0,Oe.createElement)(vt,e)}},yt=()=>je({name:_t,metadata:bt,settings:ft});var kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"})),xt=[{attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src"},caption:{type:"string",source:"html",selector:"figcaption"},id:{type:"number"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{align:!0},save(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return(0,Oe.createElement)("figure",null,(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o}))}}],wt=window.wp.blob;var Et=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})),Ct=window.wp.notices,St=window.wp.compose;const Bt=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],Tt="wp-embed";var Nt=window.lodash,Pt=n(4526),It=n.n(Pt),zt=n(9756),Mt=n.n(zt);const{name:Rt}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/embed",title:"Embed",category:"embed",description:"Add a block that displays content pulled from other sites, like Twitter or YouTube.",textdomain:"default",attributes:{url:{type:"string",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},type:{type:"string",__experimentalRole:"content"},providerNameSlug:{type:"string",__experimentalRole:"content"},allowResponsive:{type:"boolean",default:!0},responsive:{type:"boolean",default:!1,__experimentalRole:"content"},previewable:{type:"boolean",default:!0,__experimentalRole:"content"}},supports:{align:!0},editorStyle:"wp-block-embed-editor",style:"wp-block-embed"},Lt=e=>{var t;return null===(t=(0,Ge.getBlockVariations)(Rt))||void 0===t?void 0:t.find((t=>{let{patterns:n}=t;return function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((t=>e.match(t)))}(e,n)}))},Ht=e=>e&&e.includes('class="wp-embedded-content"'),At=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{preview:o,attributes:r={}}=e,{url:a,providerNameSlug:l,type:i,...s}=r;if(!a||!(0,Ge.getBlockType)(Rt))return;const c=Lt(a),u="wordpress"===l||i===Tt,m=!u&&c&&(c.attributes.providerNameSlug!==l||!l);if(m)return(0,Ge.createBlock)(Rt,{url:a,...s,...c.attributes});const d=null===(t=(0,Ge.getBlockVariations)(Rt))||void 0===t?void 0:t.find((e=>{let{name:t}=e;return"wordpress"===t}));return d&&o&&Ht(o.html)&&!u?(0,Ge.createBlock)(Rt,{url:a,...d.attributes,...n}):void 0},Vt=e=>{if(!e)return e;const t=Bt.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return It()(e,t)};function Ft(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!n)return Vt(t);const o=document.implementation.createHTMLDocument("");o.body.innerHTML=e;const r=o.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n=o.ratio){return e-o.ratio>.1?Vt(t):It()(Vt(t),o.className,"wp-has-aspect-ratio")}}}return t}const Dt=Mt()((function(e,t,n,o){let r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(!e)return{};const a={};let{type:l="rich"}=e;const{html:i,provider_name:s}=e,c=(0,Nt.kebabCase)((s||t).toLowerCase());return Ht(i)&&(l=Tt),(i||"photo"===l)&&(a.type=l,a.providerNameSlug=c),a.className=Ft(i,n,o&&r),a})),$t=function(e,t,n,o){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{allowResponsive:a,className:l}=e;return{...e,...Dt(t,n,r?void 0:l,o,a)}},Gt=["audio"];var Ot=function(e){let{attributes:t,className:n,setAttributes:o,onReplace:r,isSelected:a,insertBlocksAfter:l}=e;const{id:i,autoplay:s,caption:c,loop:u,preload:m,src:d}=t,p=(0,St.usePrevious)(c),[g,h]=(0,Oe.useState)(!!c),v=!i&&(0,wt.isBlobURL)(d),b=(0,st.useSelect)((e=>{const{getSettings:t}=e(Qe.store);return t().mediaUpload}),[]);(0,Oe.useEffect)((()=>{if(!i&&(0,wt.isBlobURL)(d)){const e=(0,wt.getBlobByURL)(d);e&&b({filesList:[e],onFileChange:e=>{let[t]=e;return w(t)},onError:e=>x(e),allowedTypes:Gt})}}),[]),(0,Oe.useEffect)((()=>{c&&!p&&h(!0)}),[c,p]);const _=(0,Oe.useCallback)((e=>{e&&!c&&e.focus()}),[c]);function f(e){return t=>{o({[e]:t})}}function y(e){if(e!==d){const t=At({attributes:{url:e}});if(void 0!==t&&r)return void r(t);o({src:e,id:void 0})}}(0,Oe.useEffect)((()=>{a||c||h(!1)}),[a,c]);const{createErrorNotice:k}=(0,st.useDispatch)(Ct.store);function x(e){k(e,{type:"snackbar"})}function w(e){e&&e.url?o({src:e.url,id:e.id,caption:e.caption}):o({src:void 0,id:void 0,caption:void 0})}const E=at()(n,{"is-transient":v}),C=(0,Qe.useBlockProps)({className:E});return d?(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>{h(!g),g&&c&&o({caption:void 0})},icon:Et,isPressed:g,label:g?(0,Ze.__)("Remove caption"):(0,Ze.__)("Add caption")})),(0,Oe.createElement)(Qe.BlockControls,{group:"other"},(0,Oe.createElement)(Qe.MediaReplaceFlow,{mediaId:i,mediaURL:d,allowedTypes:Gt,accept:"audio/*",onSelect:w,onSelectURL:y,onError:x})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Autoplay"),onChange:f("autoplay"),checked:s,help:function(e){return e?(0,Ze.__)("Autoplay may cause usability issues for some users."):null}}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Loop"),onChange:f("loop"),checked:u}),(0,Oe.createElement)(We.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,Ze._x)("Preload","noun; Audio block parameter"),value:m||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,Ze.__)("Browser default")},{value:"auto",label:(0,Ze.__)("Auto")},{value:"metadata",label:(0,Ze.__)("Metadata")},{value:"none",label:(0,Ze._x)("None","Preload value")}]}))),(0,Oe.createElement)("figure",C,(0,Oe.createElement)(We.Disabled,{isDisabled:!a},(0,Oe.createElement)("audio",{controls:"controls",src:d})),v&&(0,Oe.createElement)(We.Spinner,null),g&&(!Qe.RichText.isEmpty(c)||a)&&(0,Oe.createElement)(Qe.RichText,{identifier:"caption",tagName:"figcaption",className:(0,Qe.__experimentalGetElementClassName)("caption"),ref:_,"aria-label":(0,Ze.__)("Audio caption text"),placeholder:(0,Ze.__)("Add caption"),value:c,onChange:e=>o({caption:e}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>l((0,Ge.createBlock)((0,Ge.getDefaultBlockName)()))}))):(0,Oe.createElement)("div",C,(0,Oe.createElement)(Qe.MediaPlaceholder,{icon:(0,Oe.createElement)(Qe.BlockIcon,{icon:kt}),onSelect:w,onSelectURL:y,accept:"audio/*",allowedTypes:Gt,value:t,onError:x}))};const Ut={from:[{type:"files",isMatch(e){return 1===e.length&&0===e[0].type.indexOf("audio/")},transform(e){const t=e[0];return(0,Ge.createBlock)("core/audio",{src:(0,wt.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:e=>{let{named:{src:t,mp3:n,m4a:o,ogg:r,wav:a,wma:l}}=e;return t||n||o||r||a||l}},loop:{type:"string",shortcode:e=>{let{named:{loop:t}}=e;return t}},autoplay:{type:"string",shortcode:e=>{let{named:{autoplay:t}}=e;return t}},preload:{type:"string",shortcode:e=>{let{named:{preload:t}}=e;return t}}}}]};var qt=Ut;const jt={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/audio",title:"Audio",category:"media",description:"Embed a simple audio player.",keywords:["music","sound","podcast","recording"],textdomain:"default",attributes:{src:{type:"string",source:"attribute",selector:"audio",attribute:"src",__experimentalRole:"content"},caption:{type:"string",source:"html",selector:"figcaption",__experimentalRole:"content"},id:{type:"number",__experimentalRole:"content"},autoplay:{type:"boolean",source:"attribute",selector:"audio",attribute:"autoplay"},loop:{type:"boolean",source:"attribute",selector:"audio",attribute:"loop"},preload:{type:"string",source:"attribute",selector:"audio",attribute:"preload"}},supports:{anchor:!0,align:!0,spacing:{margin:!0,padding:!0}},editorStyle:"wp-block-audio-editor",style:"wp-block-audio"},{name:Wt}=jt,Zt={icon:kt,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:qt,deprecated:xt,edit:Ot,save:function(e){let{attributes:t}=e;const{autoplay:n,caption:o,loop:r,preload:a,src:l}=t;return l&&(0,Oe.createElement)("figure",Qe.useBlockProps.save(),(0,Oe.createElement)("audio",{controls:"controls",src:l,autoPlay:n,loop:r,preload:a}),!Qe.RichText.isEmpty(o)&&(0,Oe.createElement)(Qe.RichText.Content,{tagName:"figcaption",value:o,className:(0,Qe.__experimentalGetElementClassName)("caption")}))}},Qt=()=>je({name:Wt,metadata:jt,settings:Zt});var Kt=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));const Yt=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.fromEntries(Object.entries((0,Nt.mapValues)(e,Yt)).filter((e=>{let[,t]=e;return Boolean(t)})));return(0,Nt.isEmpty)(t)?void 0:t};var Jt=Yt;function Xt(e){var t,n;if(null==e||null===(t=e.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.fontFamily)return e;const{fontFamily:o,...r}=e.style.typography;return{...e,style:Jt({...e.style,typography:r}),fontFamily:o.split("|").pop()}}const en=e=>{var t,n,o;const{borderRadius:r,...a}=e,l=[r,null===(t=a.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius].find((e=>"number"==typeof e&&0!==e));return l?{...a,style:{...a.style,border:{...null===(o=a.style)||void 0===o?void 0:o.border,radius:`${l}px`}}}:a};const tn=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customGradient)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customGradient&&(t.color.gradient=e.customGradient);const{customTextColor:n,customBackgroundColor:o,customGradient:r,...a}=e;return{...a,style:t}},nn=e=>{const{color:t,textColor:n,...o}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return tn(o)},on={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"}},rn={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))}},an={attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0},__experimentalSelector:".wp-block-button__link"},save(e){var t,n;let{attributes:o,className:r}=e;const{fontSize:a,linkTarget:l,rel:i,style:s,text:c,title:u,url:m,width:d}=o;if(!c)return null;const p=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),g=(0,Qe.__experimentalGetColorClassesAndStyles)(o),h=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),v=at()("wp-block-button__link",g.className,p.className,{"no-border-radius":0===(null==s||null===(t=s.border)||void 0===t?void 0:t.radius)}),b={...p.style,...g.style,...h.style},_=at()(r,{[`has-custom-width wp-block-button__width-${d}`]:d,"has-custom-font-size":a||(null==s||null===(n=s.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:m,title:u,style:b,value:c,target:l,rel:i}))},migrate:Xt,isEligible(e){var t;let{style:n}=e;return null==n||null===(t=n.typography)||void 0===t?void 0:t.fontFamily}},ln=[rn,an,{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},isEligible(e){var t;let{style:n}=e;return"number"==typeof(null==n||null===(t=n.border)||void 0===t?void 0:t.radius)},save(e){var t,n,o;let{attributes:r,className:a}=e;const{fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=r;if(!u)return null;const g=null==c||null===(t=c.border)||void 0===t?void 0:t.radius,h=(0,Qe.__experimentalGetColorClassesAndStyles)(r),v=at()("wp-block-button__link",h.className,{"no-border-radius":0===(null==c||null===(n=c.border)||void 0===n?void 0:n.radius)}),b={borderRadius:g||void 0,...h.style},_=at()(a,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:_}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:v,href:d,title:m,style:b,value:u,target:i,rel:s}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{anchor:!0,align:!0,alignWide:!1,color:{__experimentalSkipSerialization:!0},reusable:!1,__experimentalSelector:".wp-block-button__link"},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},width:{type:"number"}},save(e){let{attributes:t,className:n}=e;const{borderRadius:o,linkTarget:r,rel:a,text:l,title:i,url:s,width:c}=t,u=(0,Qe.__experimentalGetColorClassesAndStyles)(t),m=at()("wp-block-button__link",u.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...u.style},p=at()(n,{[`has-custom-width wp-block-button__width-${c}`]:c});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:p}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:s,title:i,style:d,value:l,target:r,rel:a}))},migrate:(0,St.compose)(Xt,en)},{supports:{align:!0,alignWide:!1,color:{gradients:!0}},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"}},save(e){let{attributes:t}=e;const{borderRadius:n,linkTarget:o,rel:r,text:a,title:l,url:i}=t,s=at()("wp-block-button__link",{"no-border-radius":0===n}),c={borderRadius:n?n+"px":void 0};return(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:s,href:i,title:l,style:c,value:a,target:o,rel:r})},migrate:en},{supports:{align:!0,alignWide:!1},attributes:{...on,linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},borderRadius:{type:"number"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},customGradient:{type:"string"},gradient:{type:"string"}},isEligible:e=>!!(e.customTextColor||e.customBackgroundColor||e.customGradient||e.align),migrate:(0,St.compose)(en,tn,(function(e){if(!e.align)return e;const{align:t,...n}=e;return{...n,className:at()(n.className,`align${e.align}`)}})),save(e){let{attributes:t}=e;const{backgroundColor:n,borderRadius:o,customBackgroundColor:r,customTextColor:a,customGradient:l,linkTarget:i,gradient:s,rel:c,text:u,textColor:m,title:d,url:p}=t,g=(0,Qe.getColorClassName)("color",m),h=!l&&(0,Qe.getColorClassName)("background-color",n),v=(0,Qe.__experimentalGetGradientClass)(s),b=at()("wp-block-button__link",{"has-text-color":m||a,[g]:g,"has-background":n||r||l||s,[h]:h,"no-border-radius":0===o,[v]:v}),_={background:l||void 0,backgroundColor:h||l||s?void 0:r,color:g?void 0:a,borderRadius:o?o+"px":void 0};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:p,title:d,style:_,value:u,target:i,rel:c}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"}},isEligible(e){return e.className&&e.className.includes("is-style-squared")},migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),en(tn({...e,className:t||void 0,borderRadius:0}))},save(e){let{attributes:t}=e;const{backgroundColor:n,customBackgroundColor:o,customTextColor:r,linkTarget:a,rel:l,text:i,textColor:s,title:c,url:u}=t,m=(0,Qe.getColorClassName)("color",s),d=(0,Qe.getColorClassName)("background-color",n),p=at()("wp-block-button__link",{"has-text-color":s||r,[m]:m,"has-background":n||o,[d]:d}),g={backgroundColor:d?void 0:o,color:m?void 0:r};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:p,href:u,title:c,style:g,value:i,target:a,rel:l}))}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:nn,save(e){let{attributes:t}=e;const{url:n,text:o,title:r,backgroundColor:a,textColor:l,customBackgroundColor:i,customTextColor:s}=t,c=(0,Qe.getColorClassName)("color",l),u=(0,Qe.getColorClassName)("background-color",a),m=at()("wp-block-button__link",{"has-text-color":l||s,[c]:c,"has-background":a||i,[u]:u}),d={backgroundColor:u?void 0:i,color:c?void 0:s};return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:m,href:n,title:r,style:d,value:o}))}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t,s={backgroundColor:l,color:i};return(0,Oe.createElement)("div",{className:`align${a}`},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:n,title:r,style:s,value:o}))},migrate:nn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save(e){let{attributes:t}=e;const{url:n,text:o,title:r,align:a,color:l,textColor:i}=t;return(0,Oe.createElement)("div",{className:`align${a}`,style:{backgroundColor:l}},(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",href:n,title:r,style:{color:i},value:o}))},migrate:nn}];var sn=ln,cn=window.wp.keycodes;var un=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.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"}));var mn=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.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"}));const dn="noreferrer noopener";function pn(e){let{selectedWidth:t,setAttributes:n}=e;return(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Width settings")},(0,Oe.createElement)(We.ButtonGroup,{"aria-label":(0,Ze.__)("Button width")},[25,50,75,100].map((e=>(0,Oe.createElement)(We.Button,{key:e,isSmall:!0,variant:e===t?"primary":void 0,onClick:()=>{var o;n({width:t===(o=e)?void 0:o})}},e,"%")))))}var gn=function(e){var t;const{attributes:n,setAttributes:o,className:r,isSelected:a,onReplace:l,mergeBlocks:i}=e,{textAlign:s,linkTarget:c,placeholder:u,rel:m,style:d,text:p,url:g,width:h}=n,[v,b]=(0,Oe.useState)(null),_=(0,Qe.__experimentalUseBorderProps)(n),f=(0,Qe.__experimentalUseColorProps)(n),y=(0,Qe.__experimentalGetSpacingClassesAndStyles)(n),k=(0,Oe.useRef)(),x=(0,Oe.useRef)(),w=(0,Qe.useBlockProps)({ref:(0,St.useMergeRefs)([b,k]),onKeyDown:function(e){if(cn.isKeyboardEvent.primary(e,"k"))T(e);else if(cn.isKeyboardEvent.primaryShift(e,"k")){var t;N(),null===(t=x.current)||void 0===t||t.focus()}}}),[E,C]=(0,Oe.useState)(!1),S=!!g,B="_blank"===c;function T(e){e.preventDefault(),C(!0)}function N(){o({url:void 0,linkTarget:void 0,rel:void 0}),C(!1)}return(0,Oe.useEffect)((()=>{a||C(!1)}),[a]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",ot({},w,{className:at()(w.className,{[`has-custom-width wp-block-button__width-${h}`]:h,"has-custom-font-size":w.style.fontSize})}),(0,Oe.createElement)(Qe.RichText,{ref:x,"aria-label":(0,Ze.__)("Button text"),placeholder:u||(0,Ze.__)("Add text…"),value:p,onChange:e=>{o({text:e.replace(/<\/?a[^>]*>/g,"")})},withoutInteractiveFormatting:!0,className:at()(r,"wp-block-button__link",f.className,_.className,{[`has-text-align-${s}`]:s,"no-border-radius":0===(null==d||null===(t=d.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),style:{..._.style,...f.style,...y.style},onSplit:e=>(0,Ge.createBlock)("core/button",{...n,text:e}),onReplace:l,onMerge:i,identifier:"text"})),(0,Oe.createElement)(Qe.BlockControls,{group:"block"},(0,Oe.createElement)(Qe.AlignmentControl,{value:s,onChange:e=>{o({textAlign:e})}}),!S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:un,title:(0,Ze.__)("Link"),shortcut:cn.displayShortcut.primary("k"),onClick:T}),S&&(0,Oe.createElement)(We.ToolbarButton,{name:"link",icon:mn,title:(0,Ze.__)("Unlink"),shortcut:cn.displayShortcut.primaryShift("k"),onClick:N,isActive:!0})),a&&(E||S)&&(0,Oe.createElement)(We.Popover,{placement:"bottom",onClose:()=>{var e;C(!1),null===(e=x.current)||void 0===e||e.focus()},anchor:v,focusOnMount:!!E&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,Oe.createElement)(Qe.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:g,opensInNewTab:B},onChange:e=>{let{url:t="",opensInNewTab:n}=e;o({url:t}),B!==n&&function(e){const t=e?"_blank":void 0;let n=m;t&&!m?n=dn:t||m!==dn||(n=void 0),o({linkTarget:t,rel:n})}(n)},onRemove:()=>{var e;N(),null===(e=x.current)||void 0===e||e.focus()},forceIsEditingLink:E})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(pn,{selectedWidth:h,setAttributes:o})),(0,Oe.createElement)(Qe.InspectorControls,{group:"advanced"},(0,Oe.createElement)(We.TextControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Link rel"),value:m||"",onChange:e=>o({rel:e})})))};const hn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/button",title:"Button",category:"design",parent:["core/buttons"],description:"Prompt visitors to take action with a button-style link.",keywords:["link"],textdomain:"default",attributes:{textAlign:{type:"string"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"string",source:"html",selector:"a"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel"},placeholder:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},width:{type:"number"}},supports:{anchor:!0,align:!1,alignWide:!1,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:!0,spacing:{__experimentalSkipSerialization:!0,padding:["horizontal","vertical"],__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}},__experimentalSelector:".wp-block-button .wp-block-button__link"},styles:[{name:"fill",label:"Fill",isDefault:!0},{name:"outline",label:"Outline"}],editorStyle:"wp-block-button-editor",style:"wp-block-button"},{name:vn}=hn,bn={icon:Kt,example:{attributes:{className:"is-style-fill",text:(0,Ze.__)("Call to Action")}},edit:gn,save:function(e){var t,n;let{attributes:o,className:r}=e;const{textAlign:a,fontSize:l,linkTarget:i,rel:s,style:c,text:u,title:m,url:d,width:p}=o;if(!u)return null;const g=(0,Qe.__experimentalGetBorderClassesAndStyles)(o),h=(0,Qe.__experimentalGetColorClassesAndStyles)(o),v=(0,Qe.__experimentalGetSpacingClassesAndStyles)(o),b=at()("wp-block-button__link",h.className,g.className,{[`has-text-align-${a}`]:a,"no-border-radius":0===(null==c||null===(t=c.border)||void 0===t?void 0:t.radius)},(0,Qe.__experimentalGetElementClassName)("button")),_={...g.style,...h.style,...v.style},f=at()(r,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":l||(null==c||null===(n=c.typography)||void 0===n?void 0:n.fontSize)});return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:f}),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"a",className:b,href:d,title:m,style:_,value:u,target:i,rel:s}))},deprecated:sn,merge:(e,t)=>{let{text:n=""}=t;return{...e,text:(e.text||"")+n}}},_n=()=>je({name:vn,metadata:hn,settings:bn});var fn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z"}));const yn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:n,...o}=e;return(t||n)&&Object.assign(o,{layout:{type:"flex",...t&&{justifyContent:t},...n&&{orientation:n}}}),o},kn=[{attributes:{contentJustification:{type:"string"},orientation:{type:"string",default:"horizontal"}},supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}}},isEligible:e=>{let{contentJustification:t,orientation:n}=e;return!!t||!!n},migrate:yn,save(e){let{attributes:{contentJustification:t,orientation:n}}=e;return(0,Oe.createElement)("div",Qe.useBlockProps.save({className:at()({[`is-content-justification-${t}`]:t,"is-vertical":"vertical"===n})}),(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{supports:{align:["center","left","right"],anchor:!0},save(){return(0,Oe.createElement)("div",null,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))},isEligible(e){let{align:t}=e;return t&&["center","left","right"].includes(t)},migrate(e){return yn({...e,align:void 0,contentJustification:e.align})}}];var xn=kn,wn=window.wp.richText;const{name:En}={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},Cn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>(0,Ge.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,Ge.createBlock)(En,{},e.map((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelector("a"),r=null==o?void 0:o.getAttribute("href");return(0,Ge.createBlock)("core/button",{text:n,url:r})}))),isMatch:e=>e.every((e=>{const t=(0,wn.__unstableCreateElement)(document,e.content),n=t.innerText||"",o=t.querySelectorAll("a");return n.length<=30&&o.length<=1}))}]};var Sn=Cn;const Bn=[vn],Tn={name:vn,attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Nn=function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=(0,Qe.useBlockProps)({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=(0,st.useSelect)((e=>{var t;const n=e(Qe.store).getSettings().__experimentalPreferredStyleVariations;return null==n||null===(t=n.value)||void 0===t?void 0:t[vn]}),[]),s=(0,Qe.useInnerBlocksProps)(l,{allowedBlocks:Bn,__experimentalDefaultBlock:Tn,__experimentalDirectInsert:!0,template:[[vn,{className:i&&`is-style-${i}`}]],templateInsertUpdatesSelection:!0});return(0,Oe.createElement)("div",s)};const Pn={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/buttons",title:"Buttons",category:"design",description:"Prompt visitors to take action with a group of button-style links.",keywords:["link"],textdomain:"default",supports:{anchor:!0,align:["wide","full"],__experimentalExposeControlsToChildren:!0,spacing:{blockGap:!0,margin:["top","bottom"],__experimentalDefaultControls:{blockGap:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},editorStyle:"wp-block-buttons-editor",style:"wp-block-buttons"},{name:In}=Pn,zn={icon:fn,example:{innerBlocks:[{name:"core/button",attributes:{text:(0,Ze.__)("Find out more")}},{name:"core/button",attributes:{text:(0,Ze.__)("Contact us")}}]},deprecated:xn,transforms:Sn,edit:Nn,save:function(e){var t;let{attributes:n,className:o}=e;const{fontSize:r,style:a}=n,l=Qe.useBlockProps.save({className:at()(o,{"has-custom-font-size":r||(null==a||null===(t=a.typography)||void 0===t?void 0:t.fontSize)})}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)}},Mn=()=>je({name:In,metadata:Pn,settings:zn});var Rn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.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.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}));const Ln=Mt()((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var Hn={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,Ge.createBlock)("core/archives")}]};const An={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/calendar",title:"Calendar",category:"widgets",description:"A calendar of your site’s posts.",keywords:["posts","archive"],textdomain:"default",attributes:{month:{type:"integer"},year:{type:"integer"}},supports:{align:!0,color:{link:!0,__experimentalSkipSerialization:["text","background"],__experimentalDefaultControls:{background:!0,text:!0},__experimentalSelector:"table, th"},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},style:"wp-block-calendar"},{name:Vn}=An,Fn={icon:Rn,example:{},edit:function(e){let{attributes:t}=e;const n=(0,Qe.useBlockProps)(),{date:o,hasPosts:r,hasPostsResolved:a}=(0,st.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:n}=e(it.store),o={status:"publish",per_page:1},r=t("postType","post",o),a=n("getEntityRecords",["postType","post",o]);let l;const i=e("core/editor");if(i){"post"===i.getEditedPostAttribute("type")&&(l=i.getEditedPostAttribute("date"))}return{date:l,hasPostsResolved:a,hasPosts:a&&1===(null==r?void 0:r.length)}}),[]);return r?(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Disabled,null,(0,Oe.createElement)(Ye(),{block:"core/calendar",attributes:{...t,...Ln(o)}}))):(0,Oe.createElement)("div",n,(0,Oe.createElement)(We.Placeholder,{icon:Rn,label:(0,Ze.__)("Calendar")},a?(0,Ze.__)("No published posts found."):(0,Oe.createElement)(We.Spinner,null)))},transforms:Hn},Dn=()=>je({name:Vn,metadata:An,settings:Fn});var $n=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})),Gn=window.wp.htmlEntities;var On=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"}));const Un={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/categories",title:"Categories List",category:"widgets",description:"Display a list of all categories.",textdomain:"default",attributes:{displayAsDropdown:{type:"boolean",default:!1},showHierarchy:{type:"boolean",default:!1},showPostCounts:{type:"boolean",default:!1},showOnlyTopLevel:{type:"boolean",default:!1},showEmpty:{type:"boolean",default:!1}},supports:{align:!0,html:!1,spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-categories-editor",style:"wp-block-categories"},{name:qn}=Un,jn={icon:$n,example:{},edit:function e(t){let{attributes:{displayAsDropdown:n,showHierarchy:o,showPostCounts:r,showOnlyTopLevel:a,showEmpty:l},setAttributes:i,className:s}=t;const c=(0,St.useInstanceId)(e,"blocks-category-select"),u={per_page:-1,hide_empty:!l,context:"view"};a&&(u.parent=0);const{records:m,isResolving:d}=(0,it.useEntityRecords)("taxonomy","category",u),p=e=>null!=m&&m.length?null===e?m:m.filter((t=>{let{parent:n}=t;return n===e})):[],g=e=>t=>i({[e]:t}),h=e=>e?(0,Gn.decodeEntities)(e).trim():(0,Ze.__)("(Untitled)"),v=e=>{const t=p(e.id),{id:n,link:a,count:l,name:i}=e;return(0,Oe.createElement)("li",{key:n,className:`cat-item cat-item-${n}`},(0,Oe.createElement)("a",{href:a,target:"_blank",rel:"noreferrer noopener"},h(i)),r&&` (${l})`,o&&!!t.length&&(0,Oe.createElement)("ul",{className:"children"},t.map((e=>v(e)))))},b=(e,t)=>{const{id:n,count:a,name:l}=e,i=p(n);return[(0,Oe.createElement)("option",{key:n,className:`level-${t}`},Array.from({length:3*t}).map((()=>" ")),h(l),r&&` (${a})`),o&&!!i.length&&i.map((e=>b(e,t+1)))]},_=null==m||!m.length||n||d?"div":"ul",f=at()(s,{"wp-block-categories-list":!(null==m||!m.length||n||d),"wp-block-categories-dropdown":!(null==m||!m.length)&&n&&!d}),y=(0,Qe.useBlockProps)({className:f});return(0,Oe.createElement)(_,y,(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Settings")},(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Display as dropdown"),checked:n,onChange:g("displayAsDropdown")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show post counts"),checked:r,onChange:g("showPostCounts")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show only top level categories"),checked:a,onChange:g("showOnlyTopLevel")}),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show empty categories"),checked:l,onChange:g("showEmpty")}),!a&&(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Show hierarchy"),checked:o,onChange:g("showHierarchy")}))),d&&(0,Oe.createElement)(We.Placeholder,{icon:On,label:(0,Ze.__)("Categories")},(0,Oe.createElement)(We.Spinner,null)),!d&&0===(null==m?void 0:m.length)&&(0,Oe.createElement)("p",null,(0,Ze.__)("Your site does not have any posts, so there is nothing to display here at the moment.")),!d&&(null==m?void 0:m.length)>0&&(n?(()=>{const e=p(o?0:null);return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(We.VisuallyHidden,{as:"label",htmlFor:c},(0,Ze.__)("Categories")),(0,Oe.createElement)("select",{id:c},(0,Oe.createElement)("option",null,(0,Ze.__)("Select Category")),e.map((e=>b(e,0)))))})():p(o?0:null).map((e=>v(e)))))}},Wn=()=>je({name:qn,metadata:Un,settings:jn});var Zn=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}));var Qn=e=>{let{clientId:t}=e;const{replaceBlocks:n}=(0,st.useDispatch)(Qe.store),o=(0,st.useSelect)((e=>e(Qe.store).getBlock(t)),[t]);return(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>n(o.clientId,(0,Ge.rawHandler)({HTML:(0,Ge.serialize)(o)}))},(0,Ze.__)("Convert to blocks"))};function Kn(e){const t=(0,st.useSelect)((e=>e(Qe.store).getSettings().styles));return(0,Oe.useEffect)((()=>{const{baseURL:n,suffix:o,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:n,suffix:o}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,height:500,setup(e){e.on("init",(()=>{const n=e.getDoc();t.forEach((e=>{let{css:t}=e;const o=n.createElement("style");o.innerHTML=t,n.head.appendChild(o)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,Oe.createElement)("textarea",e)}function Yn(e){const{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e,[a,l]=(0,Oe.useState)(!1),i=`editor-${t}`,s=(0,Ze.__)("Classic Edit");return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(We.ToolbarButton,{onClick:()=>l(!0)},s))),n&&(0,Oe.createElement)(Oe.RawHTML,null,n),(a||!n)&&(0,Oe.createElement)(We.Modal,{title:s,__experimentalHideHeader:!0},(0,Oe.createElement)("h2",{style:{display:"flex",justifyContent:"space-between"}},(0,Oe.createElement)("div",null,s),(0,Oe.createElement)("div",null,(0,Oe.createElement)(We.Button,{onClick:()=>n?l(!1):r([])},(0,Ze.__)("Cancel")),(0,Oe.createElement)(We.Button,{isPrimary:!0,onClick:()=>{o({content:window.wp.oldEditor.getContent(i)}),l(!1)}},(0,Ze.__)("Save")))),(0,Oe.createElement)(Kn,{id:i,defaultValue:n})))}const{wp:Jn}=window;function Xn(e){let{clientId:t,attributes:{content:n},setAttributes:o,onReplace:r}=e;const{getMultiSelectedBlockClientIds:a}=(0,st.useSelect)(Qe.store),l=(0,Oe.useRef)(!1);return(0,Oe.useEffect)((()=>{if(!l.current)return;const e=window.tinymce.get(`editor-${t}`);(null==e?void 0:e.getContent())!==n&&e.setContent(n||"")}),[n]),(0,Oe.useEffect)((()=>{const{baseURL:e,suffix:i}=window.wpEditorL10n.tinymce;function s(e){let t;n&&e.on("loadContent",(()=>e.setContent(n))),e.on("blur",(()=>{var n;t=e.selection.getBookmark(2,!0);const r=document.querySelector(".interface-interface-skeleton__content"),l=r.scrollTop;return null!==(n=a())&&void 0!==n&&n.length||o({content:e.getContent()}),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),r.scrollTop!==l&&(r.scrollTop=l))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const l=(0,St.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",l),e.on("remove",l.cancel),e.on("keydown",(t=>{cn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==cn.BACKSPACE&&t.keyCode!==cn.DELETE||!function(e){const t=e.getBody();return!(t.childNodes.length>1)&&(0===t.childNodes.length||!(t.childNodes[0].childNodes.length>1)&&/^\n?$/.test(t.innerText||t.textContent))}(e)||(r([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:n}=t;n&&t.keyCode===cn.F10&&t.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:e}=window.wpEditorL10n.tinymce;Jn.oldEditor.initialize(`editor-${t}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${t}`,setup:s}})}function u(){"complete"===document.readyState&&c()}return l.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:e,suffix:i}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),Jn.oldEditor.remove(`editor-${t}`)}}),[]),(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)("div",{key:"toolbar",id:`toolbar-${t}`,className:"block-library-classic__toolbar",onClick:function(){const e=window.tinymce.get(`editor-${t}`);e&&e.focus()},"data-placeholder":(0,Ze.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),(0,Oe.createElement)("div",{key:"editor",id:`editor-${t}`,className:"wp-block-freeform block-library-rich-text__tinymce"}))}const eo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/freeform",title:"Classic",category:"text",description:"Use the classic WordPress editor.",textdomain:"default",attributes:{content:{type:"string",source:"html"}},supports:{className:!1,customClassName:!1,reusable:!1},editorStyle:"wp-block-freeform-editor"},{name:to}=eo,no={icon:Zn,edit:function(e){const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).canRemoveBlock(t)),[t]),[o,r]=(0,Oe.useState)(!1),a=(0,St.useRefEffect)((e=>{r(e.ownerDocument!==document)}),[]);return(0,Oe.createElement)(Oe.Fragment,null,n&&(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(We.ToolbarGroup,null,(0,Oe.createElement)(Qn,{clientId:t}))),(0,Oe.createElement)("div",(0,Qe.useBlockProps)({ref:a}),o?(0,Oe.createElement)(Yn,e):(0,Oe.createElement)(Xn,e)))},save:function(e){let{attributes:t}=e;const{content:n}=t;return(0,Oe.createElement)(Oe.RawHTML,null,n)}},oo=()=>je({name:to,metadata:eo,settings:no});var ro=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));function ao(e){return e.replace(/\[/g,"[")}function lo(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}var io={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,Ge.createBlock)("core/code")},{type:"block",blocks:["core/html","core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/code",{content:t})}},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&1===e.children.length&&"CODE"===e.firstChild.nodeName,schema:{pre:{children:{code:{children:{"#text":{}}}}}}}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,Ge.createBlock)("core/paragraph",{content:t.replace(/\n/g,"
")})}}]};const so={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/code",title:"Code",category:"text",description:"Display code snippets that respect your spacing and tabs.",textdomain:"default",attributes:{content:{type:"string",source:"html",selector:"code"}},supports:{anchor:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{margin:["top","bottom"],padding:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{width:!0,color:!0}},color:{text:!0,background:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}}},style:"wp-block-code"},{name:co}=so,uo={icon:ro,example:{attributes:{content:(0,Ze.__)("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );")}},transforms:io,edit:function(e){let{attributes:t,setAttributes:n,onRemove:o}=e;const r=(0,Qe.useBlockProps)();return(0,Oe.createElement)("pre",r,(0,Oe.createElement)(Qe.RichText,{tagName:"code",value:t.content,onChange:e=>n({content:e}),onRemove:o,placeholder:(0,Ze.__)("Write code…"),"aria-label":(0,Ze.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0}))},save:function(e){let{attributes:t}=e;return(0,Oe.createElement)("pre",Qe.useBlockProps.save(),(0,Oe.createElement)(Qe.RichText.Content,{tagName:"code",value:(n=t.content,(0,St.pipe)(ao,lo)(n||""))}));var n}},mo=()=>je({name:co,metadata:so,settings:uo});var po=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));const go=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible(e){let{width:t}=e;return isFinite(t)},migrate(e){return{...e,width:`${e.width}%`}},save(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n}),a={flexBasis:o+"%"};return(0,Oe.createElement)("div",{className:r,style:a},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];var ho=go;var vo=function(e){let{attributes:{verticalAlignment:t,width:n,templateLock:o,allowedBlocks:r},setAttributes:a,clientId:l}=e;const i=at()("block-core-columns",{[`is-vertically-aligned-${t}`]:t}),s=(0,We.__experimentalUseCustomUnits)({availableUnits:(0,Qe.useSetting)("spacing.units")||["%","px","em","rem","vw"]}),{columnsIds:c,hasChildBlocks:u,rootClientId:m}=(0,st.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:n}=e(Qe.store),o=n(l);return{hasChildBlocks:t(l).length>0,rootClientId:o,columnsIds:t(o)}}),[l]),{updateBlockAttributes:d}=(0,st.useDispatch)(Qe.store),p=Number.isFinite(n)?n+"%":n,g=(0,Qe.useBlockProps)({className:i,style:p?{flexBasis:p}:void 0}),h=c.length,v=c.indexOf(l)+1,b=(0,Ze.sprintf)((0,Ze.__)("%1$s (%2$d of %3$d)"),g["aria-label"],v,h),_=(0,Qe.useInnerBlocksProps)({...g,"aria-label":b},{templateLock:o,allowedBlocks:r,renderAppender:u?void 0:Qe.InnerBlocks.ButtonBlockAppender});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:e=>{a({verticalAlignment:e}),d(m,{verticalAlignment:null})},value:t})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,{title:(0,Ze.__)("Column settings")},(0,Oe.createElement)(We.__experimentalUnitControl,{label:(0,Ze.__)("Width"),labelPosition:"edge",__unstableInputWidth:"80px",value:n||"",onChange:e=>{e=0>parseFloat(e)?"0":e,a({width:e})},units:s}))),(0,Oe.createElement)("div",_))};const bo={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/column",title:"Column",category:"text",parent:["core/columns"],description:"A single column within a columns block.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},width:{type:"string"},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert","contentOnly",!1]}},supports:{anchor:!0,reusable:!1,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:!0,padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalLayout:!0}},{name:_o}=bo,fo={icon:po,edit:vo,save:function(e){let{attributes:t}=e;const{verticalAlignment:n,width:o}=t,r=at()({[`is-vertically-aligned-${n}`]:n});let a;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&null!=o&&o.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}a={flexBasis:e}}const l=Qe.useBlockProps.save({className:r,style:a}),i=Qe.useInnerBlocksProps.save(l);return(0,Oe.createElement)("div",i)},deprecated:ho},yo=()=>je({name:_o,metadata:bo,settings:fo});var ko=(0,Oe.createElement)(Ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(Ue.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z"}));function xo(e){let t,{doc:n}=xo;n||(n=document.implementation.createHTMLDocument(""),xo.doc=n),n.body.innerHTML=e;for(const e of n.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var wo=[{attributes:{verticalAlignment:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>{if(!e.customTextColor&&!e.customBackgroundColor)return e;const t={color:{}};e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor);const{customTextColor:n,customBackgroundColor:o,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save(e){let{attributes:t}=e;const{verticalAlignment:n,backgroundColor:o,customBackgroundColor:r,textColor:a,customTextColor:l}=t,i=(0,Qe.getColorClassName)("background-color",o),s=(0,Qe.getColorClassName)("color",a),c=at()({"has-background":o||r,"has-text-color":a||l,[i]:i,[s]:s,[`are-vertically-aligned-${n}`]:n}),u={backgroundColor:i?void 0:r,color:s?void 0:l};return(0,Oe.createElement)("div",{className:c||void 0,style:u},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},isEligible(e,t){return!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==xo(e.originalContent)))},migrate(e,t){const n=t.reduce(((e,t)=>{const{originalContent:n}=t;let o=xo(n);return void 0===o&&(o=0),e[o]||(e[o]=[]),e[o].push(t),e}),[]).map((e=>(0,Ge.createBlock)("core/column",{},e))),{columns:o,...r}=e;return[{...r,isStackedOnMobile:!0},n]},save(e){let{attributes:t}=e;const{columns:n}=t;return(0,Oe.createElement)("div",{className:`has-${n}-columns`},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:n,...o}=e;return[e={...o,isStackedOnMobile:!0},t]},save(e){let{attributes:t}=e;const{verticalAlignment:n,columns:o}=t,r=at()(`has-${o}-columns`,{[`are-vertically-aligned-${n}`]:n});return(0,Oe.createElement)("div",{className:r},(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];const Eo=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Co(e,t){const{width:n=100/t}=e.attributes;return Eo(n)}function So(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>e+Co(n,t)),0)}function Bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return e.reduce(((e,n)=>{const o=Co(n,t);return Object.assign(e,{[n.clientId]:o})}),{})}function To(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const o=So(e,n);return(0,Nt.mapValues)(Bo(e,n),(e=>Eo(t*e/o)))}function No(e,t){return e.map((e=>(0,Nt.merge)({},e,{attributes:{width:`${t[e.clientId]}%`}})))}const Po=["core/column"];const Io=(0,st.withDispatch)(((e,t,n)=>({updateAlignment(o){const{clientId:r,setAttributes:a}=t,{updateBlockAttributes:l}=e(Qe.store),{getBlockOrder:i}=n.select(Qe.store);a({verticalAlignment:o});i(r).forEach((e=>{l(e,{verticalAlignment:o})}))},updateColumns(o,r){const{clientId:a}=t,{replaceInnerBlocks:l}=e(Qe.store),{getBlocks:i}=n.select(Qe.store);let s=i(a);const c=s.every((e=>{var t;const n=e.attributes.width;return Number.isFinite(null!=n&&null!==(t=n.endsWith)&&void 0!==t&&t.call(n,"%")?parseFloat(n):n)}));const u=r>o;if(u&&c){const e=Eo(100/r);s=[...No(s,To(s,100-e)),...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column",{width:`${e}%`})))]}else if(u)s=[...s,...Array.from({length:r-o}).map((()=>(0,Ge.createBlock)("core/column")))];else if(s=s.slice(0,-(o-r)),c){s=No(s,To(s,100))}l(a,s)}})))((function(e){let{attributes:t,setAttributes:n,updateAlignment:o,updateColumns:r,clientId:a}=e;const{isStackedOnMobile:l,verticalAlignment:i}=t,{count:s}=(0,st.useSelect)((e=>({count:e(Qe.store).getBlockCount(a)})),[a]),c=at()({[`are-vertically-aligned-${i}`]:i,"is-not-stacked-on-mobile":!l}),u=(0,Qe.useBlockProps)({className:c}),m=(0,Qe.useInnerBlocksProps)(u,{allowedBlocks:Po,orientation:"horizontal",renderAppender:!1});return(0,Oe.createElement)(Oe.Fragment,null,(0,Oe.createElement)(Qe.BlockControls,null,(0,Oe.createElement)(Qe.BlockVerticalAlignmentToolbar,{onChange:o,value:i})),(0,Oe.createElement)(Qe.InspectorControls,null,(0,Oe.createElement)(We.PanelBody,null,(0,Oe.createElement)(We.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,Ze.__)("Columns"),value:s,onChange:e=>r(s,e),min:1,max:Math.max(6,s)}),s>6&&(0,Oe.createElement)(We.Notice,{status:"warning",isDismissible:!1},(0,Ze.__)("This column count exceeds the recommended amount and may cause visual breakage.")),(0,Oe.createElement)(We.ToggleControl,{label:(0,Ze.__)("Stack on mobile"),checked:l,onChange:()=>n({isStackedOnMobile:!l})}))),(0,Oe.createElement)("div",m))}));function zo(e){let{clientId:t,name:n,setAttributes:o}=e;const{blockType:r,defaultVariation:a,variations:l}=(0,st.useSelect)((e=>{const{getBlockVariations:t,getBlockType:o,getDefaultBlockVariation:r}=e(Ge.store);return{blockType:o(n),defaultVariation:r(n,"block"),variations:t(n,"block")}}),[n]),{replaceInnerBlocks:i}=(0,st.useDispatch)(Qe.store),s=(0,Qe.useBlockProps)();return(0,Oe.createElement)("div",s,(0,Oe.createElement)(Qe.__experimentalBlockVariationPicker,{icon:(0,Nt.get)(r,["icon","src"]),label:(0,Nt.get)(r,["title"]),variations:l,onSelect:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;e.attributes&&o(e.attributes),e.innerBlocks&&i(t,(0,Ge.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0}))}var Mo=e=>{const{clientId:t}=e,n=(0,st.useSelect)((e=>e(Qe.store).getBlocks(t).length>0),[t])?Io:zo;return(0,Oe.createElement)(n,e)};var Ro=[{name:"one-column-full",title:(0,Ze.__)("100"),description:(0,Ze.__)("One column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z"})),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,Ze.__)("50 / 50"),description:(0,Ze.__)("Two columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"})),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,Ze.__)("33 / 66"),description:(0,Ze.__)("Two columns; one-third, two-thirds split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z"})),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,Ze.__)("66 / 33"),description:(0,Ze.__)("Two columns; two-thirds, one-third split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z"})),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,Ze.__)("33 / 33 / 33"),description:(0,Ze.__)("Three columns; equal split"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z"})),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,Ze.__)("25 / 50 / 25"),description:(0,Ze.__)("Three columns; wide center column"),icon:(0,Oe.createElement)(We.SVG,{width:"48",height:"48",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg"},(0,Oe.createElement)(We.Path,{fillRule:"evenodd",d:"M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z"})),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Lo={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),n=e.map((e=>{let{name:n,attributes:o,innerBlocks:r}=e;return["core/column",{width:`${t}%`},[[n,{...o},r]]]}));return(0,Ge.createBlock)("core/columns",{},(0,Ge.createBlocksFromInnerBlocksTemplate)(n))},isMatch:(e,t)=>{let{length:n}=e;return(1!==t.length||"core/columns"!==t[0].name)&&(n&&n<=6)}},{type:"block",blocks:["core/media-text"],priority:1,transform:(e,t)=>{const{align:n,backgroundColor:o,textColor:r,style:a,mediaAlt:l,mediaId:i,mediaPosition:s,mediaSizeSlug:c,mediaType:u,mediaUrl:m,mediaWidth:d,verticalAlignment:p}=e;let g;if("image"!==u&&u)g=["core/video",{id:i,src:m}];else{g=["core/image",{...{id:i,alt:l,url:m,sizeSlug:c},...{href:e.href,linkClass:e.linkClass,linkDestination:e.linkDestination,linkTarget:e.linkTarget,rel:e.rel}}]}const h=[["core/column",{width:`${d}%`},[g]],["core/column",{width:100-d+"%"},t]];return"right"===s&&h.reverse(),(0,Ge.createBlock)("core/columns",{align:n,backgroundColor:o,textColor:r,style:a,verticalAlignment:p},(0,Ge.createBlocksFromInnerBlocksTemplate)(h))}}],to:[{type:"block",blocks:["*"],transform:(e,t)=>t.flatMap((e=>e.innerBlocks))}]};var Ho=Lo;const Ao={$schema:"https://schemas.wp.org/trunk/block.json",apiVersion:2,name:"core/columns",title:"Columns",category:"design",description:"Display content in multiple columns, with blocks added to each column.",textdomain:"default",attributes:{verticalAlignment:{type:"string"},isStackedOnMobile:{type:"boolean",default:!0}},supports:{anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{blockGap:{__experimentalDefault:"2em",sides:["horizontal","vertical"]},margin:["top","bottom"],padding:!0,__experimentalDefaultControls:{padding:!0}},__experimentalLayout:{allowSwitching:!1,allowInheriting:!1,allowEditing:!1,default:{type:"flex",flexWrap:"nowrap"}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},editorStyle:"wp-block-columns-editor",style:"wp-block-columns"},{name:Vo}=Ao,Fo={icon:ko,variations:Ro,example:{viewportWidth:600,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg"}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,Ze.__)("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{content:(0,Ze.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:wo,edit:Mo,save:function(e){let{attributes:t}=e;const{isStackedOnMobile:n,verticalAlignment:o}=t,r=at()({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!n}),a=Qe.useBlockProps.save({className:r}),l=Qe.useInnerBlocksProps.save(a);return(0,Oe.createElement)("div",l)},transforms:Ho},Do=()=>je({name:Vo,metadata:Ao,settings:Fo});var $o=(0,Oe.createElement)(Ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Oe.createElement)(Ue.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"}));var Go=[{attributes:{tagName:{type:"string",default:"div"}},apiVersion:2,supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}}},save(e){let{attributes:{tagName:t}}=e;const n=Qe.useBlockProps.save(),{className:o}=n,r=(null==o?void 0:o.split(" "))||[],a=null==r?void 0:r.filter((e=>"wp-block-comments"!==e)),l={...n,className:a.join(" ")};return(0,Oe.createElement)(t,l,(0,Oe.createElement)(Qe.InnerBlocks.Content,null))}}];function Oo(e){let{attributes:{tagName:t},setAttributes:n}=e;const o={section:(0,Ze.__)("The
element should represent a standalone portion of the document that can't be better represented by another element."),aside:(0,Ze.__)("The